This commit is contained in:
2024-12-29 20:13:03 -07:00
parent 9894a0da59
commit 6d044d34d5
15 changed files with 60 additions and 55 deletions

View File

@@ -7,7 +7,8 @@ const AnimatedSVG = ({ stroke = "#ffffff" }) => {
{/* width, height and viewBox are necessary */}
<svg
xmlns="http://www.w3.org/2000/svg"
width="512" height="512" viewBox="0 0 512 512"
width="256" height="256" // adjust size here
viewBox="0 0 512 512"
preserveAspectRatio="xMidYMid meet"
>
<g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)">

View File

@@ -1,5 +1,6 @@
.navbar_wrapper {
display: flex;
background-color: var(--bgNav);
flex-direction: column;
align-items: center;
justify-content: space-around;
@@ -8,4 +9,5 @@
left: 0;
height: 100vh;
width: 10vw;
padding: var(--mb-3);
}

View File

@@ -10,13 +10,12 @@ const Navbar = () => {
return (
<nav className={styles.navbar_wrapper}>
<StyledNavLink path="/" text="Home" />
<StyledNavLink path="/graph" text="Graph" />
<StyledNavLink path="/about" text="About" />
<StyledNavLink exact path="/" text="About" />
<StyledNavLink exact path="/graph" text="Graph" />
{
auth === true ?
<StyledNavLink path="/logout" text="Logout" /> :
<StyledNavLink path="/login" text="Login" />
<StyledNavLink exact path="/logout" text="Logout" /> :
<StyledNavLink exact path="/login" text="Login" />
}
</nav>
)

View File

@@ -1,12 +1,18 @@
.link_wrapper {
padding: 2em;
border-radius: 20%;
a {
padding: var(--mb-3);
border-radius: 2%;
width: 100%;
cursor: pointer;
text-decoration: none;
color: var(--text);
}
.active_link {
background-color: var(--bgLinkActive);
box-shadow: 2px 2px black;
}
.inactive_link {
background-color: var(--bgLinkInactive);
box-shadow: 2px 2px var(--bg);
}

View File

@@ -18,15 +18,14 @@ const StyledNavLink = ({
activeClass = styles.active_link,
inactiveClass = styles.inactive_link
}) => {
return (
<div className={styles.link_wrapper}>
<NavLink
to={path}
className={({ isActive }) => isActive ? activeClass : inactiveClass}
>
{text}
</NavLink>
</div>
<NavLink
to={path}
className={({ isActive }) => isActive ? activeClass : inactiveClass}
>
{text}
</NavLink>
)
}