Skip to content

Commit f889715

Browse files
committed
Enhance site header and layout styling
Added a navigation menu to the site header with links to "Guides" and "Contribute". Modernized the header design using flexbox, spacing, and hover effects. Updated `.site-main` for improved spacing and accessibility. Removed unnecessary styles and introduced responsive design adjustments for smaller screens.
1 parent 037c0d5 commit f889715

3 files changed

Lines changed: 51 additions & 10 deletions

File tree

src/Downpatch.Web/Components/Layout/MainLayout.razor

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
<h1 class="site-brand">
1010
<a href="/" class="site-brand-link">downpatch.com</a>
1111
</h1>
12+
<nav class="site-header-nav" aria-label="Primary">
13+
<a href="/guide" class="site-header-link">Guides</a>
14+
<a href="https://github.com/downpatch/content" class="site-header-link">Contribute</a>
15+
</nav>
1216
</div>
1317
</header>
1418

src/Downpatch.Web/Components/Pages/GuideHome.razor.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
.guide-hero {
1414
border-bottom: 1px solid var(--border);
15-
background: var(--surface-2);
1615
margin: 0 calc(var(--pad) * -1) 0;
1716
}
1817

src/Downpatch.Web/wwwroot/css/site.css

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,20 +242,27 @@ pre {
242242
}
243243

244244
.site-header {
245-
border-bottom: 1px solid var(--border);
246-
background: var(--bg);
245+
margin: 16px auto 0;
246+
max-width: var(--page-max);
247247
}
248248

249249
.site-header-inner {
250-
max-width: var(--page-max);
251-
margin: 0 auto;
252-
padding: 20px var(--pad);
250+
display: flex;
251+
align-items: center;
252+
justify-content: space-between;
253+
gap: 12px;
254+
padding: 12px 14px;
255+
border-radius: 14px;
256+
background: var(--surface-2);
257+
box-shadow: 0 0 0 1px rgba(255,255,255,.04);
253258
}
254259

255260
.site-brand {
256261
margin: 0;
257-
font-size: 1.6rem;
258-
line-height: 1.1;
262+
font-size: 1.05rem;
263+
line-height: 1.2;
264+
text-transform: lowercase;
265+
letter-spacing: .02em;
259266
}
260267

261268
.site-brand-link {
@@ -268,14 +275,41 @@ pre {
268275
text-underline-offset: .18em;
269276
}
270277

278+
.site-header-nav {
279+
display: inline-flex;
280+
align-items: center;
281+
gap: .45rem;
282+
}
283+
284+
.site-header-link {
285+
display: inline-flex;
286+
align-items: center;
287+
padding: .38rem .62rem;
288+
border-radius: 999px;
289+
border: 1px solid transparent;
290+
text-decoration: none;
291+
color: var(--text);
292+
font-size: .9rem;
293+
}
294+
295+
.site-header-link:hover {
296+
background: #131a22;
297+
border-color: #3a4656;
298+
text-decoration: none;
299+
}
300+
271301
.site-main {
272302
max-width: 1600px;
273-
margin: 16px auto 0;
303+
margin: 12px auto 0;
274304
padding: 0 var(--pad) 32px;
275305
background: var(--surface-2);
276306
border-radius: 16px;
277307
box-shadow: 0 0 0 1px rgba(255,255,255,.04);
278-
margin-top: 50px;
308+
}
309+
310+
.site-main:focus,
311+
.site-main:focus-visible {
312+
outline: none;
279313
}
280314

281315
.site-footer {
@@ -505,6 +539,10 @@ pre {
505539
button, .button {
506540
padding: 12px 14px;
507541
}
542+
543+
.site-header-inner {
544+
flex-wrap: wrap;
545+
}
508546
}
509547

510548
.sticky-links {

0 commit comments

Comments
 (0)