The garage/
folder powers the 2025 Cars Garage section of the F1 Stories site. It provides an interactive, 3D-driven showcase of each team’s 2025 car, accompanied by dynamic driver cards and technical specifications. Everything here is client-side and static, leveraging JSON data and modular JavaScript to render models and related info.
garage/
├── garage.html # Main interactive 3D car viewer page citeturn1file3
├── garage.css # Styles for the 3D model container, badges, and layout citeturn1file2
├── garage.js # Main script: team selection, model toggling, data loading
├── f1-driver-cards.css # Styles for driver info cards and standings tables citeturn1file0
├── f1-driver-cards.js # Script: generates driver cards from JSON data
├── enhanced-specs.js # Script: augments static car specs with interactive features
└── f1-teams-data.json # JSON with teams, constructors, drivers, and current standings citeturn1file1
.team-badge
) that users click to select a team..model-container
with hidden <iframe>
embeds for each team’s Sketchfab model..team-badges
flex layout for badge grid and active/hover states on .team-badge
elements..model-container
dimensions, gradient header bar, and smooth fade-in of visible models.garage.js
Handles:
f1-teams-data.json
and initializes badge elements..team-badge
click, hides all model iframes, marks clicked badge active, shows corresponding iframe with fade-in.f1-driver-cards.js
and enhanced-specs.js
to populate driver cards and technical details.f1-driver-cards.js
f1-teams-data.json
to extract each driver’s name, number, position, nationality, and age..driver-card
elements and appends them into a grid under the model viewer.enhanced-specs.js
Note: Both scripts are written in vanilla JS and have no external dependencies.
This file is the single source of truth for:
Updating this JSON (e.g., after a race) immediately reflects changes across driver cards and spec sections without touching any script or HTML. citeturn1file1
cd garage/
.Serve with a static server:
npx http-server . -p 4000
http://localhost:4000/garage.html
to explore.No build tools or package installs are required—everything runs in-browser.
f1-teams-data.json
, include a badge in garage.html
, and ensure a corresponding Sketchfab <iframe>
wrapper with matching id
.src
URL on the iframe for each team.garage.css
or theme via CSS variables at the top of the file.enhanced-specs.js
to add charts or graphs for power unit performance.<iframe id>
matches the .team-badge[data-team]
value.f1-teams-data.json
is in the same directory.f1-driver-cards.css
and garage.css
for overrides.This folder follows the project’s MIT License. Contributions (new teams, improved specs, UI enhancements) are welcome via PRs against main
branch—please follow existing style and test via local server before submitting.