Skip to content

Commit 6c8010d

Browse files
committed
update: improve styles
1 parent aeef45a commit 6c8010d

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/components/Header.astro

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const navbarItemActiveStyle = `border-b-nix-blue-light bg-nix-blue-light text-wh
1717

1818
<header
1919
role="banner"
20-
class="bg-white font-extralight text-black drop-shadow-md"
20+
class="sticky top-0 z-50 bg-white font-extralight text-black drop-shadow-md"
2121
>
2222
<Container class="flex flex-col justify-between md:flex-row md:items-center">
2323
<div
@@ -28,16 +28,17 @@ const navbarItemActiveStyle = `border-b-nix-blue-light bg-nix-blue-light text-wh
2828
class="flex select-none items-center justify-between gap-2 md:justify-start"
2929
>
3030
<InlineSVG
31-
class="h-16 w-auto"
31+
class="h-12 w-auto"
3232
src="/src/assets/image/nixos-logo-notext.svg"
3333
alt="Nixos Logo"
3434
/>
3535
<InlineSVG
36-
class="block h-16 w-auto md:hidden xl:block"
36+
class="block h-12 w-auto md:hidden xl:block"
3737
src="/src/assets/image/nixos-logo-text.svg"
3838
alt="Nixos Logo Text"
3939
/>
4040
</Link>
41+
4142
<button
4243
aria-label="Main Navigation Toggle"
4344
class="block rounded-lg bg-nix-blue-light p-4 md:hidden"
@@ -48,17 +49,18 @@ const navbarItemActiveStyle = `border-b-nix-blue-light bg-nix-blue-light text-wh
4849
<span class="block h-1 w-8 bg-white"></span>
4950
</button>
5051
</div>
52+
5153
<nav
5254
aria-label="Main Navigation"
5355
role="menubar"
54-
class="flex flex-col gap-0.5 pb-4 md:flex md:flex-row md:gap-5 md:pb-0"
56+
class="flex flex-col gap-0.5 pb-4 leading-none md:flex md:flex-row md:gap-5 md:pb-0"
5557
id="navbar-menu"
5658
>
5759
{
5860
headerMenu.data.items.map((item) => (
5961
<Link
6062
class:list={[
61-
'pb-6 pt-8',
63+
'pb-6 pt-7',
6264
navbarItemStyle,
6365
currentTopRoute === item.link
6466
? navbarItemActiveStyle
@@ -71,7 +73,7 @@ const navbarItemActiveStyle = `border-b-nix-blue-light bg-nix-blue-light text-wh
7173
))
7274
}
7375
<Link
74-
class={`pt-8 md:pt-7 pb-6 ${navbarItemStyle} ${navbarItemInactiveStyle}`}
76+
class={`pt-7 pb-6 md:pt-5 md:pb-3 ${navbarItemStyle} ${navbarItemInactiveStyle}`}
7577
href="https://search.nixos.org"
7678
arial-label="Nixos package and options search"
7779
>

src/layouts/Layout.astro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,13 @@ const headFeedLinks = blogMenu.data.map((e) => {
8080
</head>
8181
<body class="flex min-h-screen flex-col bg-white text-gray-950">
8282
<Header />
83+
8384
<main class="flex-1">
8485
<slot />
8586
</main>
87+
8688
<Footer />
89+
8790
<script>
8891
import 'htmx.org';
8992

0 commit comments

Comments
 (0)