StealThis .dev
Сторінки Середня

Gym — Gym Floor Map

A top-down interactive gym floor map laid out on a CSS grid, with six labeled zones — Free Weights, Machines, Cardio, Functional Rig, Studio A and Locker Rooms — each color-coded by live occupancy and showing its station count. Clicking a zone opens a detail panel listing equipment with free, in-use and service status, while a circular capacity gauge and a one-tap busy-hour simulation bring the whole floor to life on a dark, athletic theme.

Відкрити в Lab
html css vanilla-js
Цілі: JS HTML

Код

Gym Floor Map

A dark, high-energy facility map for Ironworks Athletic, rendered as a top-down CSS grid of clickable zones. Each zone tile carries a label and station count, and its background tint plus a corner status dot encode live occupancy — green for quiet, amber for moderate, red for busy. A dashed entrance block and a legend anchor the layout, and hover lifts each tile with a deepening color wash so the floor reads at a glance.

Selecting any zone slides equipment detail into the side panel: an occupancy badge, three quick stats (in use, total stations, free now) and a status list where individual machines show as Free, In use or Service. A circular SVG capacity gauge tracks the whole building against its 200-plus headcount, shifting its ring color and caption as the floor fills.

A single Simulate busy hour control pushes every zone toward peak load — recoloring tiles, flipping idle machines to in-use, redrawing the gauge and refreshing the open panel — then toggles back to live conditions. Everything is vanilla JS with a small toast helper, keyboard-focusable zones with visible focus rings, and a responsive grid that reflows down to ~360px.

Illustrative UI only — occupancy figures are simulated, not a real facility feed.