Overview
The Klef Sonatta website is a modern static site built with vanilla HTML, CSS, and JavaScript - no build process required. This makes local development incredibly straightforward.Prerequisites
All you need is:- A modern web browser (Chrome 90+, Firefox 88+, Safari 14+, or Edge 90+)
- A local web server (optional, but recommended for development)
- Git (for cloning the repository)
Cloning the Repository
Clone the project from GitHub:Running Locally
Option 1: Direct Browser Access
For quick previews, simply openindex.html in your browser:
Option 2: Python HTTP Server (Recommended)
Python’s built-in HTTP server is perfect for development:http://localhost:8000 in your browser.
Option 3: Node.js Serve
If you have Node.js installed:Option 4: PHP Built-in Server
If you have PHP installed:Option 5: VS Code Live Server
If you use Visual Studio Code:- Install the “Live Server” extension
- Right-click on
index.html - Select “Open with Live Server”
Project Structure
Understanding the file organization will help you navigate the codebase:File Organization
Core Files
index.html: The main homepage containing the hero section, portfolio grid, services ticker, and all primary contentassets/styles/design-system.css: CSS custom properties (variables) that control the entire visual systemshared/components/: Modular, reusable UI components that can be used across pages
Component Architecture
The site uses a modular component system:Navigation Components
Navigation Components
Portfolio Components
Portfolio Components
- Portfolio Grid (
shared/components/index-portfolio/): Masonry layout with filtering - Portfolio Loader (
shared/components/portfolio/): Dynamic project loading - Progressive Image Loading: IntersectionObserver-based lazy loading with skeletons
Visual Components
Visual Components
- Hero Animation (
shared/components/hero/): Dynamic masonry grid with 3D text effects - Services Ticker (
shared/components/services/): Infinite scroll showcase - Glass Card (
shared/styles/glass-card.css): Frosted glass UI effects
CSS Variables System
The entire design system is powered by CSS custom properties defined inassets/styles/design-system.css:
Customizing the Design
To modify the visual theme:- Open
assets/styles/design-system.css - Adjust CSS variables at the root level
- Changes apply instantly across the entire site
- No compilation or build process needed
Development Workflow
Making Changes
- Edit Files: Modify HTML, CSS, or JavaScript files directly
- Refresh Browser: Changes are immediately visible (use Live Server for auto-refresh)
- Test: Check functionality across different screen sizes
- Commit: Use Git to track your changes
Browser DevTools
Leverage browser developer tools:Live Editing CSS Variables
Use browser DevTools to experiment:- Open DevTools (F12 or Cmd+Option+I)
- Navigate to Elements/Inspector
- Find
:rootstyles - Edit CSS variables in real-time
- Copy working values back to
design-system.css
Testing Features
Navigation Testing
- Desktop: Hover over menu items to test mega menu panels
- Mobile: Resize browser to < 768px to test mobile navigation
- Search: Test search functionality with project names and tags
Portfolio Testing
- Image Loading: Scroll through portfolio pages to see progressive loading
- Filters: Test portfolio filtering and search
- Responsive Grid: Check grid adapts to different screen sizes
Performance Testing
- Use Lighthouse in Chrome DevTools
- Target scores: 95+ in Performance, Accessibility, and SEO
- Check Core Web Vitals (LCP, FID, CLS)
Common Development Tasks
Adding a New Portfolio Project
- Create a new folder in
portfolio/with the project slug - Add an
index.htmlfile based on existing templates - Add project images to
assets/images/portfolio/ - Update portfolio data structure if using GraphQL/WordPress
Modifying Navigation
- Edit the mega menu structure in
index.html - Styles are in
assets/styles/mega-menu-spa.css - Logic is in
assets/scripts/mega-menu-spa.js
Updating Styles
- Global changes: Edit
assets/styles/design-system.css - Component-specific: Edit the component’s CSS file in
shared/components/ - Use the variable system when possible for consistency
Browser Support
The site is optimized for modern browsers:- ✅ Chrome 90+
- ✅ Firefox 88+
- ✅ Safari 14+
- ✅ Edge 90+
- CSS Grid and Flexbox
- CSS Custom Properties (Variables)
- IntersectionObserver API
- ES6+ JavaScript
- WebP and AVIF image formats
Troubleshooting
Search Not Working
Search Not Working
This is usually a CORS issue. Make sure you’re using a local server (not opening files directly).
Images Not Loading
Images Not Loading
- Check that image paths are correct
- Verify images exist in
assets/images/ - Check browser console for 404 errors
Styles Not Applying
Styles Not Applying
- Check CSS file paths in HTML
- Look for JavaScript console errors
- Verify CSS variables are defined in
:root
Mobile Menu Not Working
Mobile Menu Not Working
Next Steps
Deployment
Learn how to deploy your site to production
Design System
Explore the design system and CSS variables

