StealThis .dev
الصفحات متوسط

Gym — Class Schedule

A bold, dark-themed weekly class schedule for a performance gym. A scrollable seven-day grid with sticky day and time headers shows color-coded class blocks for HIIT, Vinyasa, Spin and more, each with trainer, room, intensity tag and live spots-left. Filter chips dim non-matching types, the current day column is highlighted, and a week navigator steps between weeks. Tapping any block opens a slide-in detail panel with a Book button that decrements spots and toggles to Booked.

فتح في المختبر
html css vanilla-js
الأهداف: JS HTML

الكود

Class Schedule

A weekly class-schedule grid for a high-energy performance gym. Seven day columns (Mon–Sun) run across fixed time rows, with sticky headers so the days and times stay in view while you scroll the timetable. Each class block is color-coded by type and shows the class name, trainer, start time, intensity tag and a live spots-left counter that turns amber when a class is nearly full and red when it sells out. The current day gets a highlighted column and an accented header.

Filter chips along the top (Strength, Cardio, Yoga, Cycle) dim every block that does not match, making it easy to scan for the kind of session you want. A week navigator with prev / next buttons and a Today shortcut lets you move between weeks, updating the date labels and the “today” highlight accordingly.

Clicking any class opens a slide-in detail panel with the full session info — room, exact time window, capacity bar and a description. The big neon Book button decrements the remaining spots, flips the panel and the grid block to a Booked state, and can be tapped again to cancel. A small toast confirms every action. Everything is vanilla HTML, CSS and JavaScript with no dependencies, keyboard accessible, and responsive down to ~360px.