StealThis .dev
Pages Medium

DIY — Home Improvement Landing

A bright, practical landing page for a fictional home-improvement guide site, built with plain HTML, CSS and vanilla JavaScript. It pairs a draggable, keyboard-accessible before/after room comparison with a live materials calculator that sizes paint, tile or deck orders, adds a waste factor, and prints a monospaced cost breakdown. Rounded out by project category tiles, guide cards with skill and permit badges, a safety checklist with a completion meter, a DIY-versus-pro table and a ZIP-code pro finder.

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

Code

Home Improvement Landing

“Weekend Reno” is a marketing landing for a fictional DIY guide site. The hero pairs a confident headline with a before/after comparison of a living room — both scenes drawn entirely in CSS (walls, floorboards, window mullions, sofa, plant, stains and a hairline crack) so there are no image requests at all. Drag the divider, or focus the handle and use the arrow keys, Home/End and PageUp/PageDown; it reports its position through role="slider" and a live aria-valuetext.

The centerpiece is the materials calculator. Choose paint a room, tile a floor or build a deck, type the dimensions and finish grade, and everything downstream recalculates on each keystroke: the big headline figure (gallons, tile count, board count), estimated materials cost, weekend hours, and a monospaced breakdown table with quantities, unit prices and subtotals. Paint assumes two coats over the wall area, tile and decking carry a 10% waste factor, and deck framing derives joists at 16in on-center from the span.

Below that sit category tiles with guide counts, project cards carrying skill badges and a permit-required flag, a safety checklist band whose gradient meter and encouragement text track completion, a scrollable DIY-versus-hire comparison table, and a ZIP-code pro finder that validates input and answers with a toast. All figures are invented.

How this look is built

The illustrations lean on layered CSS gradients — repeating-linear-gradient for floorboards and grout-like plank seams, radial-gradient for the ambient hero wash — instead of exported bitmaps, so the whole page ships as three text files and scales crisply at any density. The comparison wipe uses clip-path: inset() driven from a Pointer Events handler, which is smoother and cheaper than the old two-absolute-divs-plus-width trick because the clip is composited and the layout never reflows; pointer capture also means a fast drag off the frame does not drop the gesture. The rest is custom properties for the palette, aspect-ratio to hold the hero frame, and a single width transition on the safety meter. Watch two things: clip-path updates should stay in a plain pointer handler (no per-frame layout reads), and the meter fill plus toast pop are both disabled under prefers-reduced-motion, which the stylesheet honors globally.

Illustrative UI only — always follow real safety guidance when working with tools, electronics, or repairs.