Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 6 additions & 30 deletions src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,40 +183,16 @@ export function Header({
{/* define a header-height variable for consumption by other components */}
<style>{`
:root { --header-height: 64px; }
/* Home page: align header content with max-w-screen-xl (1280px) content */
/* The nav element has px-4 (16px) on mobile, md:pl-3 (12px) on desktop */
/* Home content uses px-4 (16px), sm:px-8 (32px), lg:px-[50px] */
/* So we subtract the nav's padding from the content's padding */
/* Home page: full-width nav that spans the viewport (matches the old
* homepage). No max-width cap — the nav's own edge padding
* (px-4 / md:pl-3 and the right block's lg:pr-6) handles spacing. */
.header-content-home {
max-width: 1280px;
margin-left: auto;
margin-right: auto;
max-width: none;
margin-left: 0;
margin-right: 0;
padding-left: 0;
padding-right: 0;
}
@media (min-width: 640px) {
.header-content-home {
/* 32px (content) - 16px (nav px-4) = 16px */
padding-left: 16px;
padding-right: 16px;
}
}
@media (min-width: 768px) {
.header-content-home {
/* 32px (content) - 12px (nav md:pl-3) = 20px on left */
/* 32px (content) - 16px (nav md:pr-4) = 16px on right */
padding-left: 20px;
padding-right: 16px;
}
}
@media (min-width: 1024px) {
.header-content-home {
/* 50px (content) - 12px (nav md:pl-3) = 38px on left */
/* 50px (content) - 24px (right div lg:pr-6) = 26px on right */
padding-left: 38px;
padding-right: 26px;
}
}
/* Doc pages: fluid centering to match sidebar offset at wide viewports */
.header-content:not(.header-content-home) {
padding-left: var(--layout-offset, 0px);
Expand Down
Loading
Loading