Skip to content
Snippets Groups Projects
Commit 0d0e38da authored by gseagren2's avatar gseagren2
Browse files

Update 43 files

- /algorithm-explorer/public/index.html
- /algorithm-explorer/public/logo.png
- /algorithm-explorer/public/logo.svg
- /algorithm-explorer/public/manifest.json
- /algorithm-explorer/src/components/AlgorithmSelection.css
- /algorithm-explorer/src/components/AlgorithmSelection.jsx
- /algorithm-explorer/src/components/BFS.jsx
- /algorithm-explorer/src/components/DAC.jsx
- /algorithm-explorer/src/components/DFS.jsx
- /algorithm-explorer/src/components/Dijkstra.jsx
- /algorithm-explorer/src/components/GreedyAlgorithm.jsx
- /algorithm-explorer/src/components/LandingPage.css
- /algorithm-explorer/src/components/LandingPage.jsx
- /algorithm-explorer/src/app.js
- /algorithm-explorer/src/index.css
- /algorithm-explorer/src/index.js
- /algorithm-explorer/src/store.js
- /algorithm-explorer/.gitignore
- /algorithm-explorer/package-lock.json
- /algorithm-explorer/package.json
- /react-redux-starter-code.code-workspace
- /package.json
- /package-lock.json
- /.gitmodules
- /.gitignore
- /.gitattributes
- /author_message_screen.py
- /bfs_exercise1.py
- /bfs_exercise2.py
- /bfs_screen.py
- /dac_exercise.py
- /dac_screen.py
- /dfs_exercise1.py
- /dfs_exercise2.py
- /dfs_screen.py
- /dijkstra_exercise1.py
- /dijkstra_exercise2.py
- /dijkstra_screen.py
- /greedy_exercise1.py
- /greedy_exercise2.py
- /greedy_screen.py
- /logo.png
- /main.py
parent 2d2c05e4
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 28496 deletions
# Disable line-ending conversions for this repository.
* -text
# dependencies
/node_modules
# testing
/coverage
# production
/build
# environments
.env.local
.env.development.local
.env.test.local
.env.production.local
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# misc
*~
.DS_Store
[submodule "stylelint-config"]
path = stylelint-config
url = git@git.unl.edu:soft-core/soft-260/stylelint-config.git
[submodule "eslint-config"]
path = eslint-config
url = git@git.unl.edu:soft-core/soft-260/eslint-config.git
# dependencies
/node_modules
# testing
/coverage
# production
/build
# environments
.env.local
.env.development.local
.env.test.local
.env.production.local
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# misc
*~
.DS_Store
This diff is collapsed.
{
"name": "@unlsoft/algorithm-explorer",
"version": "0.0.1",
"description": "An designed to help learn the difference in algorithms",
"private": true,
"license": "UNLICENSED",
"scripts": {
"lint:css": "stylelint \"**/*.css\" \"**/*.module.css\" \"!coverage/**\"",
"lint:js": "eslint --max-warnings 0 ./src",
"lint": "run-s --continue-on-error lint:**",
"test-once": "react-scripts test --watchAll=false --coverage",
"test": "react-scripts test --watchAll --coverage",
"start": "react-scripts start",
"build": "react-scripts build",
"eject": "react-scripts eject"
},
"homepage": ".",
"dependencies": {
"@reduxjs/toolkit": "^1.8.3",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^14.3.0",
"classnames": "^2.3.1",
"npm-run-all": "^4.1.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.0.2",
"react-router-dom": "^6.3.0",
"react-scripts": "^5.0.1",
"workbox-background-sync": "^6.5.3",
"workbox-broadcast-update": "^6.5.3",
"workbox-cacheable-response": "^6.5.3",
"workbox-core": "^6.5.3",
"workbox-expiration": "^6.5.3",
"workbox-navigation-preload": "^6.5.3",
"workbox-precaching": "^6.5.3",
"workbox-range-requests": "^6.5.3",
"workbox-routing": "^6.5.3",
"workbox-strategies": "^6.5.3",
"workbox-streams": "^6.5.3"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@unlsoft/eslint-config": "file:../eslint-config",
"@unlsoft/stylelint-config": "file:../stylelint-config",
"eslint-plugin-jest-dom": "^4.0.2",
"stylelint": "^14.9.1"
},
"stylelint": {
"extends": "@unlsoft/stylelint-config"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest",
"plugin:jest-dom/recommended",
"plugin:testing-library/react",
"@unlsoft/eslint-config/react"
]
},
"jest": {
"clearMocks": true,
"collectCoverageFrom": [
"src/features/**/*.js"
],
"resetMocks": false,
"restoreMocks": false
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Algorithm Explorer</title>
</head>
<body>
<div id="root"></div>
<script src="./bundle.js"></script>
</body>
</html>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 152 152">
<rect x="0" y="0" width="152" height="152" fill="rgba(0 0 0 / 100%)" />
<path d="M147,1H90V42h10V75.673L53.532,2.393,52.648,1H2V42H12v66H2v41H62V108H52V74.336l46.467,73.271L99.351,149H150V108H140V42h10V1Z" stroke-width="3" stroke="rgba(255 255 255 / 100%)" fill="rgba(208 0 0 / 100%)">
</path>
</svg>
{
"short_name": "Algorithm Explorer",
"name": "Algorithm Explorer App",
"description": "An app to help with the understanding of algorithms.",
"icons": [
{
"src": "logo.svg",
"type": "image/svg+xml",
"sizes": "192x192 512x512",
"purpose": "any maskable"
},
{
"src": "logo.png",
"type": "image/png",
"sizes": "512x512",
"purpose": "any maskable"
}
],
"start_url": ".",
"display": "standalone",
"orientation": "portrait",
"theme_color": "#d00000",
"background_color": "#ffffff"
}
import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import AlgorithmSelection from './components/AlgorithmSelection';
import BFS from './components/BFS';
import DFS from './components/DFS';
import Dijkstra from './components/Dijkstra';
import GreedyAlgorithm from './components/GreedyAlgorithm';
import DAC from './components/DAC';
const App = () =>
<Router>
<Routes>
{/* Default route: AlgorithmSelection */}
<Route path="/algorithm-selection" element={<AlgorithmSelection />} />
{/* Routes for individual algorithms */}
<Route path="/bfs" element={<BFS />} />
<Route path="/dfs" element={<DFS />} />
<Route path="/dijkstra" element={<Dijkstra />} />
<Route path="/greedy-algorithm" element={<GreedyAlgorithm />} />
<Route path="/dac" element={<DAC />} />
</Routes>
</Router>
;
export default App;
.algorithm-selection {
text-align: center;
margin-top: 50px;
color: rgb(218 218 218);
}
.algorithm-list {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 20px;
margin-top: 20px;
}
.algorithm-link {
text-decoration: none;
}
.algorithm-card {
width: 200px;
height: 100px;
background-color: rgb(240 240 240);
display: flex;
justify-content: center;
align-items: center;
border: 2px solid rgb(218 218 218);
border-radius: 8px;
font-size: 18px;
font-weight: bold;
color: rgb(51 51 51);
transition: 0.3s ease-in-out;
text-align: center;
box-shadow: 0 4px 6px rgba(0 0 0 10%);
}
.algorithm-card:hover {
background-color: rgb(224 224 224);
transform: scale(1.05);
cursor: pointer;
}
.algorithm-card a {
text-decoration: none;
color: inherit;
}
import React from 'react';
import { Link } from 'react-router-dom';
import './AlgorithmSelection.css';
const AlgorithmSelection = () =>
<div className="algorithm-selection">
<h1>Select an Algorithm to Explore</h1>
<div className="algorithm-list">
<Link to="/bfs" className="algorithm-link">
<div className="algorithm-card">Breadth-First Search (BFS)</div>
</Link>
<Link to="/dfs" className="algorithm-link">
<div className="algorithm-card">Depth-First Search (DFS)</div>
</Link>
<Link to="/dijkstra" className="algorithm-link">
<div className="algorithm-card">Dijkstra's Algorithm</div>
</Link>
<Link to="/greedy-algorithm" className="algorithm-link">
<div className="algorithm-card">Greedy Algorithm</div>
</Link>
<Link to="/dac" className="algorithm-link">
<div className="algorithm-card">Divide and Conquer</div>
</Link>
</div>
</div>
;
export default AlgorithmSelection;
import React from 'react';
const BFS = () =>
<div>
<h1>Breadth-First Search (BFS)</h1>
<p>This is where you can visualize the BFS algorithm.</p>
{/* Add your graph visualizer or algorithm logic here */}
</div>
;
export default BFS;
import React from 'react';
const DAC = () =>
<div>
<h1>Divide and Conquer Algorithm</h1>
<p>This is where you can visualize Divide and Conquer algorithm.</p>
{/* Add your graph visualizer or algorithm logic here */}
</div>
;
export default DAC;
import React from 'react';
const DFS = () =>
<div>
<h1>Depth-First Search (DFS)</h1>
<p>This is where you can visualize the DFS algorithm.</p>
{/* Add your graph visualizer or algorithm logic here */}
</div>
;
export default DFS;
import React from 'react';
const Dijkstra = () =>
<div>
<h1>Dijkstra's Algorithm</h1>
<p>This is where you can visualize Dijkstra's algorithm.</p>
{/* Add your graph visualizer or algorithm logic here */}
</div>
;
export default Dijkstra;
import React from 'react';
const GreedyAlgorithm = () =>
<div>
<h1>Greedy Algorithm</h1>
<p>This is where you can visualize Greedy algorithm.</p>
{/* Add your graph visualizer or algorithm logic here */}
</div>
;
export default GreedyAlgorithm;
:root {
/* Colors */
--letterbox-color: rgba(0 0 0 / 100%);
--app-background-color: rgba(239 239 239 / 100%);
--font-color: rgba(255 255 255 / 100%);
--highlight-color: rgba(115 168 254 / 100%);
--button-background-color: rgb(0 98 255);
--button-hover-color: rgb(0 86 230);
/* Sizes */
--minimum-app-size: 300px;
}
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: rgb(125 125 125);
}
.landing-page {
display: flex;
align-items: center; /* Center logo and text vertically */
justify-content: space-between; /* Push logo and text apart */
width: 90%;
max-width: 1200px;
height: auto;
background-color: transparent; /* Remove any background */
}
.image-container {
flex-shrink: 0; /* Prevent shrinking of the logo */
max-width: 40%; /* Limit the width of the logo */
text-align: left;
}
.image-container img {
max-width: 100%; /* Ensure the image fits within the container */
height: auto;
display: block;
border: none; /* Remove any borders from the image */
}
.content {
flex-grow: 1; /* Allow the text container to grow */
margin-left: 20px; /* Add spacing between the logo and text */
text-align: left;
}
.content h1 {
font-size: 48px;
margin-bottom: 20px;
color: var(--highlight-color); /* Highlight color for the title */
}
.start-button {
padding: 15px 30px;
font-size: 20px;
background-color: var(--button-background-color); /* Button background color */
color: var(--font-color); /* Button font color */
border: none;
border-radius: 5px;
cursor: pointer;
text-decoration: none;
transition: background-color 0.3s ease;
}
.start-button:hover {
background-color: var(--button-hover-color); /* Hover effect for button */
}
import React from 'react';
import { useNavigate } from 'react-router-dom';
import './LandingPage.css';
const LandingPage = () => {
const navigate = useNavigate();
const handleStart = () => {
navigate('/algorithm-selection');
};
return (
<div className="landing-page">
<div className="image-container">
<img src="logo.png" alt="Algorithm Explorer Logo" />
</div>
<div className="content">
<h1>Welcome to Algorithm Explorer</h1>
<button onClick={handleStart} className="start-button">Start</button>
</div>
</div>
);
};
export default LandingPage;
:root {
/* Colors */
--letterbox-color: rgba(0 0 0 / 100%);
--app-background-color: rgba(239 239 239 / 100%);
--font-color: rgba(255 255 255 / 100%);
--highlight-color: rgba(115 168 254 / 100%);
--button-background-color: rgb(0 98 255);
--button-hover-color: rgb(0 86 230);
/* Sizes */
--minimum-app-size: 300px;
}
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: rgb(125 125 125);
}
.landing-page {
display: flex;
align-items: center; /* Center logo and text vertically */
justify-content: space-between; /* Push logo and text apart */
width: 90%;
max-width: 1200px;
height: auto;
background-color: transparent; /* Remove any background */
}
.image-container {
flex-shrink: 0; /* Prevent shrinking of the logo */
max-width: 40%; /* Limit the width of the logo */
text-align: left;
}
.image-container img {
max-width: 100%; /* Ensure the image fits within the container */
height: auto;
display: block;
border: none; /* Remove any borders from the image */
}
.content {
flex-grow: 1; /* Allow the text container to grow */
margin-left: 20px; /* Add spacing between the logo and text */
text-align: left;
}
.content h1 {
font-size: 48px;
margin-bottom: 20px;
color: var(--highlight-color); /* Highlight color for the title */
}
.start-button {
padding: 15px 30px;
font-size: 20px;
background-color: var(--button-background-color);
color: var(--font-color);
border: none;
border-radius: 5px;
cursor: pointer;
text-decoration: none;
transition: background-color 0.3s ease;
}
.start-button:hover {
background-color: var(--button-hover-color);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment