Skip to content

Commit cef7cf7

Browse files
committed
fix(website): server-render navbar for faster paint
1 parent 0e51e0a commit cef7cf7

File tree

5 files changed

+557
-112
lines changed

5 files changed

+557
-112
lines changed

website/components/NavBar.js

Lines changed: 0 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -63,106 +63,5 @@ export function NavBar(props) {
6363
`)}
6464
</div>
6565
</nav>
66-
67-
<style>
68-
.navbar {
69-
background: white;
70-
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
71-
position: fixed;
72-
top: 0;
73-
left: 0;
74-
right: 0;
75-
z-index: 1000;
76-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
77-
}
78-
79-
.navbar-container {
80-
max-width: 1200px;
81-
margin: 0 auto;
82-
padding: 1rem;
83-
display: flex;
84-
justify-content: space-between;
85-
align-items: center;
86-
}
87-
88-
.navbar-brand {
89-
font-weight: bold;
90-
font-size: 1.5rem;
91-
text-decoration: none;
92-
color: #333;
93-
}
94-
95-
.navbar-menu.desktop {
96-
display: none;
97-
}
98-
99-
.navbar-link {
100-
text-decoration: none;
101-
color: #666;
102-
padding: 0.5rem 1rem;
103-
border-radius: 4px;
104-
transition: color 0.2s;
105-
}
106-
107-
.navbar-link:hover, .navbar-link.active {
108-
color: #007bff;
109-
background: #f8f9fa;
110-
}
111-
112-
.navbar-toggle {
113-
background: none;
114-
border: none;
115-
padding: 0.5rem;
116-
cursor: pointer;
117-
display: block;
118-
}
119-
120-
.hamburger {
121-
display: block;
122-
width: 24px;
123-
height: 2px;
124-
background: #333;
125-
position: relative;
126-
transition: background 0.2s;
127-
}
128-
129-
.hamburger::before, .hamburger::after {
130-
content: '';
131-
position: absolute;
132-
width: 100%;
133-
height: 100%;
134-
background: #333;
135-
left: 0;
136-
transition: transform 0.2s;
137-
}
138-
139-
.hamburger::before { top: -6px; }
140-
.hamburger::after { bottom: -6px; }
141-
142-
/* Mobile Menu Styles */
143-
.navbar-mobile-menu {
144-
display: none;
145-
background: white;
146-
border-top: 1px solid #eee;
147-
padding: 1rem;
148-
}
149-
150-
.navbar-mobile-menu.open {
151-
display: flex;
152-
flex-direction: column;
153-
gap: 0.5rem;
154-
}
155-
156-
@media (min-width: 768px) {
157-
.navbar-toggle, .navbar-mobile-menu, .navbar-mobile-menu.open {
158-
display: none;
159-
}
160-
161-
.navbar-menu.desktop {
162-
display: flex;
163-
gap: 1rem;
164-
}
165-
}
166-
</style>
16766
`;
16867
}

0 commit comments

Comments
 (0)