Version: 1.0 | Pages: 6 | Stack: HTML5 / CSS3 / Vanilla JS
savoria-template/
├── index.html Homepage
├── menu.html Full menu page with tabs
├── about.html About / team page
├── gallery.html Gallery with lightbox
├── reservation.html Table booking form
├── contact.html Contact info + map
├── css/
│ └── style.css All styles (design system + responsive)
├── js/
│ └── script.js All JS (nav, slider, AOS, counter, lightbox)
└── docs/
├── index.html This file (documentation)
└── user-guide.html User guide
| Library | Version | Purpose |
|---|---|---|
| Swiper.js | 11 | Hero image slider |
| AOS | 2.3.4 | Scroll animations (fade-in on scroll) |
| Font Awesome | 6.5.1 | Icons |
| Google Fonts | — | Playfair Display (headings) + Lato (body) |
All tokens are in :root at the top of css/style.css.
| Variable | Default | Role |
|---|---|---|
--primary | #D4A853 | Brand gold — buttons, accents, hover states |
--primary-dark | #B8923F | Button hover |
--secondary | #2C2C2C | Dark backgrounds, footer |
--bg-primary | #FFFDF8 | Page background (light mode) |
--bg-secondary | #FFF8ED | Alternating section background |
--text-primary | #1A1A1A | Main body text |
--text-secondary | #555555 | Paragraph text |
Add data-theme="dark" to the <html> tag or toggle it via JS. The theme toggle button in the header does this automatically.
| Variable | Value |
|---|---|
--space-xs | 0.5rem |
--space-sm | 1rem |
--space-md | 1.5rem |
--space-lg | 2rem |
--space-xl | 3rem |
--space-2xl | 5rem |
| Breakpoint | Behaviour |
|---|---|
max-width: 1024px | grid-4 and grid-3 collapse to 2 columns |
max-width: 768px | Mobile nav activates, all grids go to 1 column, hero h1 reduces to 2rem |
max-width: 480px | Base font 14px, hero h1 1.75rem, menu-card stacks vertically, specials 1 column |
background-attachment: fixed is disabled on the CTA section — it causes a black background on Safari/iOS. The background now uses scroll on all devices.
The template uses simple CSS Grid utility classes:
<div class="grid grid-4"> 4 equal columns (desktop) <div class="grid grid-3"> 3 equal columns <div class="grid grid-2"> 2 equal columns
All collapse to 1 column at 768px. Add gap via inline style or the gap-1/2/3 utilities.
| Feature | How it works |
|---|---|
| Sticky header + scroll class | Adds .scrolled to .header after 50px scroll — changes background and link color |
| Mobile nav toggle | Hamburger button toggles .active on #nav-menu and #mobile-toggle |
| Hero slider | Swiper.js instance on .hero-slider, autoplay 5s, pagination dots |
| AOS scroll animations | Initialized globally; elements use data-aos="fade-up" attributes |
| Stat counter | Animates numbers in .stat-number using data-target attribute when scrolled into view |
| Gallery lightbox | Dynamically created modal; clicking .gallery-item opens full-size image |
| Dark mode toggle | Toggles data-theme="dark" on <html>; persists in localStorage |
| Reservation form | Client-side validation + success modal on submit |
| Scroll-to-top button | Appears after 300px scroll; smooth scrolls to top on click |
--text-2xl on mobile nav links — replaced with 1.5rem.nav-actions on mobile to prevent overlap with hamburger buttonbackground-attachment: fixed from CTA section (iOS black screen bug)max-width: 480px breakpoints: hero headings, specials grid, stat counter sizes, section headings, button padding