Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navbar completed #83

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified backend_api/music_app/__pycache__/main.cpython-38.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified backend_api/music_app/modules/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file not shown.
Binary file added backend_api/music_app/music_club.db
Binary file not shown.
Binary file not shown.
Binary file modified backend_api/music_app/routers/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion backend_api/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ async-generator==1.10
bcrypt==3.1.7
cffi==1.14.0
click==7.1.2
dataclasses==0.7
dnspython==1.16.0
email-validator==1.1.1
fastapi==0.55.1
Expand Down
42 changes: 21 additions & 21 deletions music_club_website_base_template/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,30 +47,30 @@ class App extends Component {
//the <Nav/> goes above the Switch if navbar is at top
//add your component to this by Route path = "/{component name}"
<SimpleReactLightbox>
<Navbar />
<BrowserRouter>
<Navbar />
<div>
<Switch>
<Route path="/" component={Home} exact/>
<Route path="/timeline" component={Timeline} exact/>
<Route path="/event/:id" component={Event} exact/>
<Route path="/gallery" component={Gallery} exact/>
<Route path="/about-club" component={AboutClub} exact/>
<Route path="/about-team" component={AboutTeam} exact/>
<Route path="/login" component={Login} exact/>
<Route path="/logout" component={Logout} exact/>
<Route path="/admin" component={Admin} exact/>
<Route path="/admin/create_event" component={CreateEvent} exact/>
<Route path="/admin/change_event" component={UpdateEvent} exact/>
<Route path="/admin/delete_event" component={DeleteEvent} exact/>
<Route path="/admin/change_password" component={PassChange} exact/>
<Route path="/admin/lineup" component={Lineup} exact/>
<Route path="/admin/add_lineup" component={AddLineup} exact/>
<Route path="/admin/delete_photo" component={DeletePhoto} exact/>
<Route path="/admin/add_photo" component={AddPhoto} exact/>
<Route path="/admin/delete_photo/confirm_delete" component={ConfirmDelete} exact/>
<Route path="/admin/delete_photo/not_found" component={NotFound} exact/>
<Route path="/admin/regs" component={Register} exact/>
<Route path="/" component={Home} exact />
<Route path="/timeline" component={Timeline} exact />
<Route path="/event/:id" component={Event} exact />
<Route path="/gallery" component={Gallery} exact />
<Route path="/about-club" component={AboutClub} exact />
<Route path="/about-team" component={AboutTeam} exact />
<Route path="/login" component={Login} exact />
<Route path="/logout" component={Logout} exact />
<Route path="/admin" component={Admin} exact />
<Route path="/admin/create_event" component={CreateEvent} exact />
<Route path="/admin/change_event" component={UpdateEvent} exact />
<Route path="/admin/delete_event" component={DeleteEvent} exact />
<Route path="/admin/change_password" component={PassChange} exact />
<Route path="/admin/lineup" component={Lineup} exact />
<Route path="/admin/add_lineup" component={AddLineup} exact />
<Route path="/admin/delete_photo" component={DeletePhoto} exact />
<Route path="/admin/add_photo" component={AddPhoto} exact />
<Route path="/admin/delete_photo/confirm_delete" component={ConfirmDelete} exact />
<Route path="/admin/delete_photo/not_found" component={NotFound} exact />
<Route path="/admin/regs" component={Register} exact />
</Switch>
</div>
</BrowserRouter>
Expand Down
29 changes: 26 additions & 3 deletions music_club_website_base_template/src/components/Navbar/MenuItem.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from "react";
import { motion } from "framer-motion";
import { NavLink } from 'react-router-dom';

const variants = {
open: {
Expand All @@ -18,18 +19,40 @@ const variants = {
}
};


const colors = ["#FF008C", "#D309E1", "#9C1AFF", "#7700FF", "#4400FF"];
const items = [
{
"text": "Home",
"link": "/"
},
{
"text": "Timeline",
"link": "/timeline"
},
{
"text": "About Club",
"link": "/about-club"
},
{
"text": "About Team",
"link": "/about-team"
}]

console.log(items)
export const MenuItem = ({ i }) => {
const style = { border: `2px solid ${colors[i]}` };
// const style = { border: `2px solid ${colors[i]}` };
let text = items[i].text;
let link = items[i].link;
return (
<motion.li
variants={variants}
whileHover={{ scale: 1.1 }}
whileTap={{ scale: 0.95 }}
>
<div className="icon-placeholder" style={style} />
<div className="text-placeholder" style={style} />
<NavLink to={link} style={{ color: "black" }}>
<h2> {text} </h2>
</NavLink>
</motion.li>
);
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from "react";
import { motion } from "framer-motion";
import { MenuItem } from "./MenuItem";
import {withRouter} from 'react-router-dom'

const variants = {
open: {
Expand All @@ -11,6 +12,8 @@ const variants = {
}
};



export const Navigation = () => (
<motion.ul variants={variants}>
{itemIds.map(i => (
Expand All @@ -19,4 +22,4 @@ export const Navigation = () => (
</motion.ul>
);

const itemIds = [0, 1, 2, 3, 4];
const itemIds = [0, 1, 2, 3];