StealThis .dev
Pages Medium

Cookbook — Food Blog Dashboard (traffic · top recipes)

A warm, editorial admin dashboard for a food blog, built with plain HTML, CSS and vanilla JavaScript. A sidebar nav frames a KPI row for page views, unique visitors, average time on a recipe and saves, each with deltas and live sparklines. An inline-SVG traffic chart redraws on a seven, thirty or ninety day toggle, while a sortable top-recipes table and an approve-or-reject comment feed round out a cream-and-tomato kitchen interface.

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

Code

Food Blog Dashboard (traffic · top recipes)

A self-contained admin view for the fictional Saffron & Sage food blog. A sticky sidebar holds the nav and a plan card; the main area opens with four KPI cards — page views, unique visitors, average time on a recipe, and recipe saves — each pairing a serif headline figure with a coloured delta and a tiny inline-SVG sparkline. The whole surface uses a warm cookbook palette: cream page, paper panels, tomato and saffron accents, and gradient food “photos” rendered entirely in CSS.

The date-range toggle (7d / 30d / 90d) is the spine of the page. Switching ranges recomputes every KPI and its delta and redraws the inline-SVG traffic chart, which layers a tomato views line and a sage visitors line over soft gradient areas, with gridlines, axis labels, and a hover tooltip that reads off the day under the cursor. The top-recipes table sorts by any column — click a header to toggle ascending and descending, with an aria-sort caret following along.

The recent-comments feed is interactive too: each pending comment has Approve and Reject buttons that resolve it in place, update the pending counter and the sidebar badge, and fire a toast. One comment is obvious spam so the moderation flow has something to do. Everything is keyboard-usable with visible focus, the layout collapses to a single column by ~720px, and all numbers are fictional.

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