Skip to content

fmatovelle/webtemplate2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Premium Web Template 2.0 - Apple-Inspired Design

A modern, responsive, and feature-rich web template inspired by Apple's design philosophy. Built with performance, accessibility, and user experience in mind.

✨ Features

🎨 Design & UI

  • Apple-inspired Design: Clean, minimalist aesthetic with modern typography (Inter font)
  • Dark/Light Mode: Automatic theme switching with user preference storage
  • Responsive Layout: Mobile-first design optimized for all devices
  • Smooth Animations: CSS animations and JavaScript-powered scroll effects
  • Modern Color System: CSS custom properties with comprehensive color palette
  • Glass Morphism: Backdrop blur effects for modern UI elements

πŸš€ Performance & Technical

  • Progressive Web App (PWA): Installable with offline functionality
  • Service Worker: Advanced caching strategies for optimal performance
  • Lazy Loading: Images load only when needed to improve performance
  • Code Splitting: Optimized JavaScript loading and execution
  • SEO Optimized: Meta tags, structured data, and semantic HTML
  • Accessibility: WCAG compliant with proper ARIA labels and focus management

πŸ› οΈ Functionality

  • Interactive Components: Pricing toggle, mobile menu, contact forms
  • Form Validation: Real-time validation with user-friendly error messages
  • Scroll Animations: Intersection Observer API for smooth reveal effects
  • Parallax Effects: Subtle parallax scrolling for enhanced user experience
  • Theme Persistence: Remembers user's theme preference across sessions
  • Cross-browser Support: Compatible with all modern browsers

πŸ“± Mobile Experience

  • Mobile Menu: Smooth hamburger menu animation
  • Touch Optimized: Proper touch targets and gestures
  • Fast Loading: Optimized images and resources for mobile networks
  • App-like Feel: PWA capabilities for native-like experience

πŸš€ Quick Start

Prerequisites

  • Node.js (version 16 or higher)
  • npm or yarn
  • Firebase CLI (for deployment)

Installation

  1. Clone the repository

    git clone <your-repo-url>
    cd webtemplate2
  2. Install dependencies

    npm install
  3. Install Firebase CLI (if not already installed)

    npm install -g firebase-tools

πŸ› οΈ Development

Local Development Servers

Option 1: Development Server with Live Reload (Recommended)

npm run dev
  • Starts browser-sync server at http://localhost:3000
  • Automatic browser refresh on file changes
  • Synchronized scrolling and interactions across devices

Option 2: Express Server

npm start
  • Simple Node.js Express server at http://localhost:3000
  • Good for testing server-side functionality

Option 3: Firebase Emulator

firebase serve
  • Test Firebase hosting configuration locally
  • Simulates production environment

File Structure

webtemplate2/
β”œβ”€β”€ πŸ“„ index.html              # Main HTML file with semantic structure
β”œβ”€β”€ 🎨 style.css              # Enhanced CSS with modern features
β”œβ”€β”€ ⚑ script.js               # Advanced JavaScript functionality
β”œβ”€β”€ πŸ“¦ package.json           # Dependencies and build scripts
β”œβ”€β”€ πŸ”₯ firebase.json          # Firebase hosting configuration
β”œβ”€β”€ βš™οΈ .firebaserc            # Firebase project settings
β”œβ”€β”€ πŸ“± manifest.json          # PWA configuration
β”œβ”€β”€ πŸ”§ service-worker.js      # Advanced service worker
β”œβ”€β”€ 🚫 404.html               # Custom error page
β”œβ”€β”€ πŸ–₯️ server.js              # Local development server
β”œβ”€β”€ πŸ“ public/                # Firebase default files
β”œβ”€β”€ πŸ–ΌοΈ assets/                # Images and media files
└── πŸ“– README.md              # This documentation

🎨 Customization Guide

🏷️ Branding & Content

  1. Logo & Brand Name

    <!-- Update in index.html -->
    <div class="logo">
      <svg>...</svg>
      <span>YourBrand</span>
    </div>
  2. Colors & Theme

    /* Update in style.css */
    :root {
      --primary-color: #007AFF;    /* Your brand color */
      --secondary-color: #5856D6;  /* Accent color */
      /* ... more colors */
    }
  3. Typography

    /* Change font in style.css */
    :root {
      --font-family: 'Your-Font', Inter, sans-serif;
    }
  4. Hero Section

    <!-- Customize hero content -->
    <h1 class="hero-title">
      <span class="gradient-text">Your</span><br>
      <span>Message</span>
    </h1>

πŸ–ΌοΈ Images & Media

  1. Hero Background

    .hero-background::before {
      background: url('your-hero-image.jpg') center/cover;
    }
  2. Showcase Images

    • Replace Unsplash URLs with your own images
    • Maintain aspect ratios for best results
    • Use WebP format for better performance
  3. Favicon & Icons

    • Replace favicon.png in the root directory
    • Update manifest.json with your icon paths

πŸ“ Forms & Integrations

  1. Contact Form

    <!-- Update action URL -->
    <form action="https://formspree.io/f/YOUR_FORM_ID" method="POST">
  2. Alternative Form Services

    • Netlify Forms: Add netlify attribute
    • EmailJS: Integrate with JavaScript
    • Custom API: Update form handler in script.js

πŸ’° Pricing Section

  1. Update Pricing Plans
    <div class="pricing-card">
      <h3>Your Plan</h3>
      <div class="price">
        <span class="amount monthly-price">99</span>
        <span class="amount yearly-price" style="display: none;">79</span>
      </div>
      <!-- Features list -->
    </div>

🚒 Deployment

πŸ”₯ Firebase Hosting (Recommended)

  1. Setup Firebase

    firebase login
    firebase init hosting
  2. Configure firebase.json

    {
      "hosting": {
        "public": ".",
        "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
        "rewrites": [
          {
            "source": "**",
            "destination": "/index.html"
          }
        ]
      }
    }
  3. Deploy

    firebase deploy

🌐 Alternative Hosting Platforms

Vercel

npm i -g vercel
vercel --prod

Netlify

# Drag and drop the project folder
# Or connect GitHub repository

GitHub Pages

# Enable Pages in repository settings
# Deploy from main branch

πŸ“Š Performance Optimization

πŸƒβ€β™‚οΈ Built-in Optimizations

  • Image Optimization: Lazy loading and WebP format
  • CSS Optimization: CSS custom properties and efficient selectors
  • JavaScript: Throttled scroll events and debounced resize handlers
  • Service Worker: Intelligent caching strategies
  • Font Loading: Preconnect and font-display swap

πŸ“ˆ Monitoring & Analytics

  1. Google Analytics

    <!-- Add before closing </head> -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'GA_TRACKING_ID');
    </script>
  2. Performance Monitoring

    • Web Vitals automatically measured
    • Service Worker performance logging
    • Console performance metrics

πŸ”§ Advanced Configuration

πŸ” Security Headers

Add to your hosting provider:

Content-Security-Policy: default-src 'self' https:; script-src 'self' 'unsafe-inline' https:; style-src 'self' 'unsafe-inline' https:;
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin

🌍 Internationalization (i18n)

  1. Add language files

    const translations = {
      en: { /* English translations */ },
      es: { /* Spanish translations */ }
    };
  2. Update HTML lang attribute

    <html lang="en" dir="ltr">

πŸ“± PWA Advanced Features

  1. Custom Install Prompt

    // Add to script.js
    window.addEventListener('beforeinstallprompt', (e) => {
      e.preventDefault();
      // Show custom install UI
    });
  2. Background Sync

    // Form submissions work offline
    navigator.serviceWorker.register('/service-worker.js')
      .then(registration => {
        return registration.sync.register('contact-form');
      });

πŸ§ͺ Testing

πŸ” Manual Testing Checklist

  • All sections scroll smoothly
  • Dark/light mode toggle works
  • Forms validate correctly
  • Mobile menu functions properly
  • Images load with lazy loading
  • PWA installs correctly
  • Offline functionality works

πŸ€– Automated Testing

# Lighthouse CI
npm install -g @lhci/cli
lhci autorun

# Performance testing
npm run test:performance

πŸ› οΈ Troubleshooting

Common Issues

  1. Service Worker Not Updating

    // Force update
    navigator.serviceWorker.getRegistration().then(reg => {
      reg.update();
    });
  2. Images Not Loading

    • Check CORS headers
    • Verify image URLs
    • Test lazy loading implementation
  3. Dark Mode Not Persisting

    • Check localStorage availability
    • Verify theme application logic
  4. Mobile Menu Not Working

    • Ensure JavaScript is enabled
    • Check for console errors
    • Verify event listeners

πŸ› Debug Mode

Add to URL: ?debug=true

  • Shows performance metrics
  • Enables verbose logging
  • Displays debug information

πŸ“š Browser Support

Browser Version Support
Chrome 90+ βœ… Full
Firefox 88+ βœ… Full
Safari 14+ βœ… Full
Edge 90+ βœ… Full
Mobile Safari 14+ βœ… Full
Chrome Mobile 90+ βœ… Full

πŸ”§ Fallbacks

  • CSS Grid β†’ Flexbox fallback
  • CSS Custom Properties β†’ SCSS variables
  • IntersectionObserver β†’ scroll event fallback
  • Service Worker β†’ AppCache fallback (legacy)

🀝 Contributing

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open Pull Request

πŸ“‹ Development Guidelines

  • Follow existing code style
  • Add comments for complex logic
  • Test across multiple browsers
  • Optimize for performance
  • Maintain accessibility standards

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support & Resources

πŸ“ž Getting Help

πŸ”— Useful Links

πŸ“Š Performance Benchmarks

  • Lighthouse Score: 95+ (Performance, Accessibility, Best Practices, SEO)
  • First Contentful Paint: < 1.5s
  • Largest Contentful Paint: < 2.5s
  • Cumulative Layout Shift: < 0.1
  • First Input Delay: < 100ms

Built with ❀️ using modern web technologies

Ready to create amazing digital experiences! πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors