Skip to content

Commit e7b36c5

Browse files
committed
Make the Navbar okay
1 parent 8498cff commit e7b36c5

File tree

4 files changed

+30
-16
lines changed

4 files changed

+30
-16
lines changed

src/app/conf/2025/components/hero/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ import blurBean from "./blur-bean-cropped.webp"
1111
import heroPhoto from "./hero-photo.jpeg"
1212

1313
export function Hero() {
14+
// gql-conf-navbar-strip dark:before:bg-[#000]/40 dark:before:bg-[#000]/40
1415
return (
15-
<article className="relative isolate flex flex-col justify-center bg-pri-base text-neu-0 dark:bg-pri-darker dark:text-neu-900">
16+
<article className="gql-conf-navbar-strip relative isolate flex flex-col justify-center bg-pri-base text-neu-0 before:bg-white/30 dark:bg-pri-darker dark:text-neu-900 dark:before:bg-[#000]/40">
1617
<article className="relative">
1718
<Stripes />
1819
<div className="gql-conf-container mx-auto flex max-w-full flex-col gap-12 overflow-hidden p-4 pt-6 sm:p-8 sm:pt-12 md:gap-12 md:bg-left md:p-12 lg:px-24 lg:pb-16 lg:pt-24">

src/app/conf/2025/components/navbar.tsx

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,43 +32,48 @@ export function Navbar({ links, year }: NavbarProps): ReactElement {
3232
setMobileDrawerOpen(false)
3333
}, [pathname])
3434

35-
const navbarHeight = "70px"
36-
3735
return (
3836
<>
3937
<div
4038
className={clsx(
4139
"top-0 w-full scale-y-105 bg-pri-base dark:bg-pri-darker",
4240
mobileDrawerOpen ? "static" : "absolute",
4341
)}
44-
style={{
45-
height: navbarHeight,
46-
}}
42+
/>
43+
<div
44+
// placeholder
45+
className="absolute h-[calc(var(--navbar-h)+1px)] w-full bg-pri-base dark:bg-pri-darker"
4746
/>
4847
<header
4948
className={clsx(
50-
"top-0 z-10 w-full border-b border-black/60 bg-white/40 font-mono text-neu-900 antialiased dark:border-white/80 dark:bg-black/40",
49+
"top-0 z-10 w-full border-b border-black/60 font-mono text-neu-900 antialiased dark:border-white/80",
5150
mobileDrawerOpen ? "fixed" : "sticky",
5251
)}
53-
style={
54-
{
55-
"--navbar-h": navbarHeight,
56-
} as {}
57-
}
5852
>
5953
<BackdropBlur />
60-
<div className="container flex h-[var(--navbar-h)] items-center justify-between gap-5">
54+
<div className="flex h-[var(--navbar-h)] items-center justify-between gap-5 px-10">
6155
<div className="flex items-center gap-2 text-xl/none uppercase">
6256
<NextLink href="/">
6357
<GraphQLLogo className="h-6" />
6458
</NextLink>
6559
<span>/ GraphQLConf {year}</span>
6660
</div>
6761

62+
<div className="mr-auto flex h-full flex-col justify-center border-x border-black/60 px-4 typography-menu dark:border-white/80">
63+
<p className="flex items-center gap-2 text-sm">
64+
<time dateTime="2025-09-08">September 08</time>
65+
<span>-</span>
66+
<time dateTime="2025-09-10">10, 2025</time>
67+
</p>
68+
<address className="text-sm not-italic">
69+
Amsterdam, Netherlands
70+
</address>
71+
</div>
72+
6873
{mobileDrawerOpen && (
6974
<div
7075
onClick={handleDrawerClick}
71-
className="fixed inset-0 top-[calc(var(--navbar-h)+1px)] z-10 bg-neu-0/40 backdrop-blur-[6.4px]"
76+
className="fixed inset-0 top-[var(--navbar-h)] z-10 bg-neu-0/40 backdrop-blur-[6.4px]"
7277
/>
7378
)}
7479

@@ -138,7 +143,7 @@ function GraphQLLogo(props: React.SVGProps<SVGSVGElement>) {
138143
}
139144

140145
function BackdropBlur() {
141-
const mask = "linear-gradient(to bottom, #000 0% 50%, transparent 50% 100%)"
146+
const mask = "linear-gradient(to bottom,#000 0% 50%, transparent 50% 100%)"
142147
return (
143148
<div
144149
// note: we can't use the background trick to reduce flickering, because we have many section

src/app/conf/2025/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { GraphQLConf, HostedByGraphQLFoundation } from "@/icons"
55
import NextLink from "next/link"
66
import { NewFontsStyleTag } from "../../fonts"
77
import "../../colors.css"
8-
import { Navbar } from "./components/navbar"
8+
import { Navbar, NavbarBackgroundStrip } from "./components/navbar"
99

1010
// @ts-expect-error: we want to import the same version as Nextra for the main page
1111
import { ThemeProvider } from "next-themes"

src/globals.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,3 +516,11 @@ div[id^="headlessui-menu-items"] {
516516
.gql-conf-section {
517517
@apply px-4 py-8 lg:px-12 xl:gap-x-24 xl:px-24 3xl:px-[240px];
518518
}
519+
520+
.gql-conf-navbar-strip {
521+
@apply relative before:sticky before:top-0 before:z-[9] before:-mt-[var(--navbar-h)] before:block before:h-[var(--navbar-h)] before:w-full before:content-[''];
522+
}
523+
524+
:root {
525+
--navbar-h: 70px;
526+
}

0 commit comments

Comments
 (0)