StealThis .dev
Pages Medium

Cookbook — Video Recipe layout (steps synced)

An editorial cook-along page that pairs a large faux video player with a synced list of recipe steps. A simulated playhead advances a timecode, highlights the matching chapter in real time, and animates rising steam over a warm gradient poster. Click any step to seek the player to its timestamp, drag the scrubber across chapter markers, change playback speed, and watch completed steps mark themselves done as the braise progresses from spice to finish.

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

Code

Video Recipe layout (steps synced)

A two-column cook-along built for watching and cooking at once. On the left, a large faux video player shows a gradient “food photography” poster with blurred radial blobs, food emoji and animated steam that rises only while playback is running. A play overlay, scrubber with chapter markers, live timecode and a cycling speed control round out the player chrome — all rendered in the warm cookbook palette with an editorial serif/sans pairing.

On the right, the chapters-and-steps rail stays synced to the simulated playhead. As the timecode advances, the current step highlights with aria-current="step", earlier steps mark themselves done in sage green, and the active chapter scrolls into view. The player badge mirrors the active chapter number and title so you always know where you are in the dish.

Every control works in vanilla JS: play / pause advances a real timecode via requestAnimationFrame, clicking a step seeks the player to its timestamp, the scrubber supports click, drag and keyboard seeking (arrows, Home / End, space to toggle), and the speed button cycles 1× → 2×. Chapter markers are computed from each step’s start time and laid over the scrub track.

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