StealThis .dev
Pages Medium

Cookbook — Recipe Feature / Food Story (long-form)

A magazine-style long-form food story with a full-bleed gradient hero, editorial serif typography, a drop-cap intro, pull-quotes, captioned CSS food photos, and an embedded print-friendly recipe card. A reading-progress bar tracks scroll depth, a sticky byline follows the reader, and a jump-to-recipe button smooth-scrolls past the prose straight to the ingredients and method. Built with vanilla HTML, CSS, and JavaScript using only gradients and emoji for food imagery.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Recipe Feature / Food Story (long-form)

A polished editorial template for a long-form food feature. The piece opens with a full-bleed hero built from warm CSS gradients and floating food emoji, an overline kicker, a big serif headline, a dek, and a byline with avatar and read time. The body uses a drop-cap intro, generous serif/sans typography, alternating pull-quotes, and inline “photo” figures (gradient placeholders with captions) that look intentional rather than empty.

Interactions are all vanilla JS. A reading-progress bar pinned to the top fills as you scroll, the byline becomes sticky once the hero scrolls past, and a “Jump to recipe” button (in the topbar, hero byline, and elsewhere) smooth-scrolls down to an embedded recipe card, moving focus there for keyboard and screen-reader users. The recipe card itself is a clean, print-friendly layout with prep/cook/serves stats, a two-column ingredients-and-method grid, and print plus back-to-story actions.

It is responsive from ~360px to desktop — the recipe grid and wide figures collapse to a single column by 720px — and respects prefers-reduced-motion and @media print.

Illustrative UI only — recipes & nutrition data are fictional, not dietary advice.