Skip to content

Commit c9c716b

Browse files
committed
Minor CSS tweaks to appbar.
1 parent 4f6fcbc commit c9c716b

2 files changed

Lines changed: 54 additions & 15 deletions

File tree

src/app/components/TeamAppBar.tsx

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ export default function TeamAppBar() {
2727

2828
const pages: PageType[] = [
2929
{ path: "/", title: "About Us" },
30-
{ path: "/first", title: "About FIRST" },
31-
{ path: "/involved", title: "Join Us" },
32-
{ path: "/coalition", title: "Coalition" },
33-
{ path: "/robots", title: "Robots" },
34-
{ path: "/projects", title: "Projects" },
35-
{ path: "/resources", title: "Resources" },
36-
{ path: "/sponsors", title: "Sponsors" },
37-
{ path: "/calendar", title: "Calendar" },
30+
{ path: "/first/", title: "About FIRST" },
31+
{ path: "/involved/", title: "Join Us" },
32+
{ path: "/coalition/", title: "Coalition" },
33+
{ path: "/robots/", title: "Robots" },
34+
{ path: "/projects/", title: "Projects" },
35+
{ path: "/resources/", title: "Resources" },
36+
{ path: "/sponsors/", title: "Sponsors" },
37+
{ path: "/calendar/", title: "Calendar" },
3838
];
3939

4040
const [open, setOpen] = React.useState(false);
@@ -59,8 +59,18 @@ export default function TeamAppBar() {
5959
<AppBar position="fixed" style={{ background: "secondary" }}>
6060
<Container disableGutters maxWidth={false}>
6161
<Toolbar disableGutters>
62-
<Link href="/">
63-
<Box sx={{ display: { xs: "none", lg: "flex" }, paddingLeft: 2 }}>
62+
<Link
63+
href="/"
64+
style={{ display: "inline-flex", alignItems: "center" }}
65+
>
66+
<Box
67+
sx={{
68+
display: { xs: "none", lg: "flex" },
69+
paddingLeft: 2,
70+
width: "auto",
71+
flex: "0 0 auto",
72+
}}
73+
>
6474
{logoImage}
6575
</Box>
6676
</Link>
@@ -78,9 +88,13 @@ export default function TeamAppBar() {
7888
primary={page.title}
7989
primaryTypographyProps={{
8090
fontSize: 18,
81-
fontWeight: page.path == pathname ? "800" : "",
91+
fontWeight: page.path === pathname ? "800" : "",
8292
color: "text.secondary",
8393
}}
94+
sx={{
95+
textDecoration:
96+
page.path === pathname ? "underline" : "none",
97+
}}
8498
/>
8599
</ListItemButton>
86100
</Link>
@@ -101,8 +115,23 @@ export default function TeamAppBar() {
101115
<MenuIcon />
102116
</IconButton>
103117
</Box>
104-
<Link href="/">
105-
<Box sx={{ display: { xs: "flex", lg: "none" } }}>{logoImage}</Box>
118+
<Link
119+
href="/"
120+
style={{
121+
display: "inline-flex",
122+
alignItems: "center",
123+
textDecoration: "none",
124+
}}
125+
>
126+
<Box
127+
sx={{
128+
display: { xs: "flex", lg: "none" },
129+
width: "auto",
130+
flex: "0 0 auto",
131+
}}
132+
>
133+
{logoImage}
134+
</Box>
106135
</Link>
107136
<Typography
108137
variant="h5"
@@ -133,7 +162,9 @@ export default function TeamAppBar() {
133162
color: "white",
134163
display: "block",
135164
textAlign: "center",
136-
fontWeight: page.path == pathname ? "800" : "",
165+
fontWeight: page.path == pathname ? "800" : "100",
166+
textDecoration:
167+
page.path === pathname ? "underline" : "none",
137168
}}
138169
>
139170
{page.title}

src/app/layout.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Metadata } from "next";
22
import * as React from "react";
33
import { Suspense } from "react";
4-
import { Box, CssBaseline, ThemeProvider } from "@mui/material";
4+
import { Box, CssBaseline, GlobalStyles, ThemeProvider } from "@mui/material";
55
import { AppRouterCacheProvider } from "@mui/material-nextjs/v15-appRouter";
66

77
import AppBarMemo from "./components/TeamAppBar";
@@ -25,6 +25,14 @@ export default function RootLayout({
2525
<AppRouterCacheProvider>
2626
<ThemeProvider theme={theme}>
2727
<CssBaseline />
28+
<GlobalStyles
29+
styles={{
30+
"button::-moz-focus-inner": {
31+
border: 0,
32+
padding: 0,
33+
},
34+
}}
35+
/>
2836
<AppBarMemo />
2937
<ScrollToTop />
3038
<Box sx={{ height: "5vh" }}></Box>

0 commit comments

Comments
 (0)