Night clock header, top right only
A minimal fixed header: serif wordmark at the left, and at the right a small clock that walks the page from 10 PM to 7 AM, a Menu word and one lime pill.
Scroll inside the frame to see the bar over a page. Links in the preview stay on the block.
Open on its ownThe prompt
One prompt, written to stand on its own: goal, structure, type, colour, spacing, behaviour and the words in square brackets to replace. Paste it into any tool that writes HTML. The Code tab has this block as one file.
546 words
# Night clock header, top right only One navigation component, not a whole page: build it to drop into a page that already exists. Works in Claude, v0, Lovable, Bolt, Cursor or any tool that writes HTML. ## Goal A minimal fixed header for a dark editorial health page whose left edge belongs to a side tab: everything sits at the top, with a clock that turns scroll progress into the hours of one night. ## Structure 1. fixed header, full width, transparent at the top 2. serif wordmark at the left 3. nav at the right: a small clock, a Menu button with two bars, a pill call to action 4. 1px base line and a solid band once scrolled ## Type Libre Caslon Display 400 (Google Fonts) 28px/1 for the wordmark. Anek Latin (Google Fonts, variable) 500 13px tracking .06em tabular figures for the clock, 500 15px for Menu, 600 14px for the pill. ## Colour Ground #22121F when solid, base line rgba(242,234,223,.16). Wordmark and Menu #F2EADF, clock #B79BB0, pill #CFE56A with #22121F text and a #F2EADF hover fill. Focus #CFE56A. ## Spacing and lines Height 88px, 68px when solid (72px and 60px under 700px). Left padding max(112px, 8vw), right max(40px, 6vw); 48px and 20px on phones. Items 26px apart. ## Behaviour Past 40px of scroll the band fades in and the header shortens over 600ms cubic-bezier(.22,1,.36,1). The clock maps scroll progress to 540 minutes after 10 PM, rounded to ten, formatted with Intl.DateTimeFormat in the page locale. Menu bars cross into an X over 450ms when open. One rAF-throttled scroll handler. ## Responsive Clock hidden under 860px, pill hidden under 420px, Menu always shown. ## Accessibility Header landmark with a nav labelled Main. Clock aria-hidden. Menu button has aria-expanded and aria-controls. Targets 44px, focus ring 2px offset 2px. Reduced motion: instant state changes. ## Built values (from code.html) - Fonts: Libre Caslon Display 400 (self-hosted: fonts/libre-caslon-display-400.woff2); Anek Latin 100 to 800 (self-hosted: fonts/anek-latin-400.woff2). Self-hosted files sit in fonts/ in the block download. - Colour variables: --aub #22121F, --aub-deep #1A0D18, --plum #3A2136, --linen #F2EADF, --mauve #B79BB0, --lime #CFE56A, --ink #22121F, --ink-2 #5E4459, --line-d rgba(242,234,223,.16), --line-d2 rgba(242,234,223,.3), --line-l rgba(34,18,31,.16), --line-l2 rgba(34,18,31,.34). - Font variables: --serif "Libre Caslon Display", "Baskerville", Georgia, serif; --sans "Anek Latin", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif. - Size variables: --gut-l max(112px, 8vw), --gut-r max(40px, 6vw). - Media queries: max-width 699px, max-width 860px, max-width 420px, prefers-reduced-motion, hover-capable pointer. - No media files. - Script: none, CSS only. ## Content to replace - [Wordmark]: the brand name - [Clock]: a time such as 11:50 PM - [Menu]: Menu - [Call to action]: Book a visit ## Rules Plain, specific copy that reads as a live product; never the word sample. No shadows, glow, glass, blur, gradient text, emoji or italics. Motion moves transform and opacity, with colour, border, height and stroke transitions on state changes, and holds its end state under prefers-reduced-motion. Text passes WCAG AA. ## Output Return the block in one piece: the markup, one style block with the web fonts imported on its first line, and a small script only if the behaviour needs one. No page wrapper, no framework, no build step. Prefix every class with `blk-` and put the colours and sizes in CSS variables at the top.
More like this
Navigation
Same page





