File tree Expand file tree Collapse file tree 16 files changed +425
-31
lines changed
Expand file tree Collapse file tree 16 files changed +425
-31
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ import {InputField} from './components/Canvas/InputField.js';
77import MainCanvas from './components/Canvas/MainCanvas' ;
88import SelectionSort from './components/Strategy/Algorithms/SelectionSort' ;
99
10- import Header from './partial/Header' ;
11- import Selection from './partial/Selection' ;
12- import Footer from './partial/Footer' ;
10+ import Header from './components/Page/ partial/Header' ;
11+ import Selection from './components/Page/ partial/Selection' ;
12+ import Footer from './components/Page/ partial/Footer' ;
1313import SplashScreen from './components/Page/Splash/SplashScreen' ;
1414import Box from './modals/cube/Box' ;
1515import AppRouter from './AppRouter' ;
@@ -19,11 +19,6 @@ import AppRouter from './AppRouter';
1919{ /* Placeholder for the About page */ }
2020
2121
22- function About ( ) {
23- return null ;
24- }
25-
26-
2722
2823class App extends Component {
2924
Original file line number Diff line number Diff line change 1+ import React , { useState } from 'react' ;
2+ import { DescriptorItems } from '../Navigation_Descriptor' ;
3+ import './dropdown.css' ;
4+ import { Link } from 'react-router-dom' ;
5+
6+
7+
8+ /**
9+ * @Description : This is the dropdown menu that is used in the navigation bar.
10+ * @briandesignz /react-dropdown-menu is used to create the dropdown menu.
11+ * @returns {JSX.Element }
12+ * @constructor
13+ */
14+ function Dropdown ( ) {
15+ const [ click , setClick ] = useState ( false ) ;
16+
17+ const handleClick = ( ) => setClick ( ! click ) ;
18+
19+ return (
20+ < >
21+ < ul
22+ onClick = { handleClick }
23+ className = { click ? 'dropdown-menu clicked' : 'dropdown-menu' }
24+ >
25+ { DescriptorItems . map ( ( item , index ) => {
26+ return (
27+ < li key = { index } >
28+ < Link
29+ className = { item . class }
30+ to = { item . path }
31+ onClick = { ( ) => setClick ( false ) }
32+ >
33+ { item . title }
34+ </ Link >
35+ </ li >
36+ ) ;
37+ } ) }
38+ </ ul >
39+ </ >
40+ ) ;
41+ }
42+
43+
44+ export default Dropdown ;
Original file line number Diff line number Diff line change 1+ .dropdown-menu {
2+ background : # dedada ;
3+ width : 165px ;
4+ position : absolute;
5+ text-align : center;
6+ top : 70px ;
7+ list-style : none;
8+ z-index : 10 ;
9+ }
10+
11+ .dropdown-menu li {
12+ background : # 565960 ;
13+ cursor : pointer;
14+ }
15+
16+ .dropdown-menu li : hover {
17+ background : # 5cabff ;
18+ }
19+
20+ .dropdown-menu .clicked {
21+ display : none;
22+ }
23+
24+ .dropdown-link {
25+ display : block;
26+ height : 100% ;
27+ width : 100% ;
28+ text-decoration : none;
29+ color : # d2d3ef ;
30+ padding : 16px ;
31+ }
32+
33+ @media screen and (max-width : 960px ) {
34+ .fa-caret-down {
35+ display : none;
36+ }
37+ }
Original file line number Diff line number Diff line change 1+ export const DescriptorItems = [
2+ {
3+ title : 'Alorithms' ,
4+ path : '/alorithms-Documentation' ,
5+ class : 'dropdown-link'
6+ } ,
7+ {
8+ title : 'Design' ,
9+ path : '/alorithms-design' ,
10+ class : 'dropdown-link'
11+ } ,
12+ {
13+ title : 'Code' ,
14+ path : '/alorithms-source' ,
15+ class : 'dropdown-link'
16+ } ,
17+ {
18+ title : '' ,
19+ path : '/' ,
20+ class : 'dropdown-link'
21+ }
22+ ] ;
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ import { Canvas } from './Canvas';
77import { InputField } from './InputField' ;
88import { Options } from './options/Options' ;
99import { CONSTANTS } from '../../Utility/config'
10+ import Navigation from '../Page/partial/Navbar/Navigation' ;
11+
1012
1113class MainCanvas extends Component {
1214 constructor ( props ) {
@@ -32,6 +34,7 @@ class MainCanvas extends Component {
3234 console . log ( options ) ;
3335 return (
3436 < >
37+ < Navigation />
3538 < InputField name = { [ 'generic-input' , 'instructions' ] } InputHandler = { this } />
3639 < Canvas generatedArray = { this . state . generatedArray } barColor = { options . defaultBarColor } />
3740 </ >
Original file line number Diff line number Diff line change 1- import React from 'react' ;
1+ import React from 'react' ;
22import './about.css' ;
33import '../Splash/splash.css' ;
4-
4+ import Navigation from '../partial/Navbar/Navigation' ;
55
66
77
88const AboutScreen = ( ) => {
99
1010 return (
11- < div className = "splash_background" >
12- < div className = "splash_overlay" >
13- < div className = "splash_content" >
14- < div className = "about-screen" >
15- < div className = "about-screen-text" >
16- < h1 > About</ h1 >
11+ < >
12+ < Navigation />
13+ < div className = "splash_background" >
14+ < div className = "splash_overlay" >
15+ < div className = "splash_content" >
16+ < div className = "about-screen" >
17+ < div className = "about-screen-text" >
18+ < h1 > About</ h1 >
19+ </ div >
1720 </ div >
1821 </ div >
1922 </ div >
2023 </ div >
21- </ div >
24+ </ >
2225 ) ;
2326} ;
2427
Original file line number Diff line number Diff line change 1- import React from 'react' ;
1+ import React from 'react' ;
22import './contact.css' ;
33import '../Splash/splash.css' ;
4-
4+ import Navigation from '../partial/Navbar/Navigation' ;
55
66
77
88const ContactScreen = ( ) => {
99
1010 return (
11- < div className = "splash_background" >
12- < div className = "splash_overlay" >
13- < div className = "splash_content" >
14- < div className = "contact-screen" >
15- < div className = "contact-screen-text" >
16- < h1 > Contact Us</ h1 >
11+ < >
12+ < Navigation />
13+
14+ < div className = "splash_background" >
15+ < div className = "splash_overlay" >
16+ < div className = "splash_content" >
17+ < div className = "contact-screen" >
18+ < div className = "contact-screen-text" >
19+ < h1 > Contact Us</ h1 >
20+ </ div >
1721 </ div >
1822 </ div >
1923 </ div >
2024 </ div >
21- </ div >
25+ </ >
2226 ) ;
2327} ;
2428
Original file line number Diff line number Diff line change 1- import React from 'react' ;
1+ import React from 'react' ;
22import './splash.css' ;
3-
3+ import Navigation from '../partial/Navbar/Navigation' ;
44
55
66
Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import '../App.css' ;
2+ import '../../../ App.css' ;
33
44
55
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import './button.css' ;
3+ import { Link } from 'react-router-dom' ;
4+
5+
6+
7+ export function Button ( props ) {
8+ return (
9+ < Link to = { props . ref } >
10+ < button className = "btn" > < span className = { props . style } > { props . value } </ span > </ button >
11+ </ Link >
12+ ) ;
13+ }
You can’t perform that action at this time.
0 commit comments