Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Gelsin - Food Delivery</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| :root { | |
| --primary-color: #FF6B6B; | |
| --secondary-color: #4ECDC4; | |
| --dark-color: #2A2A2A; | |
| --light-color: #F8F9FA; | |
| --success-color: #4CAF50; | |
| --warning-color: #FFC107; | |
| --danger-color: #F44336; | |
| --shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
| --transition: all 0.3s ease; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| line-height: 1.6; | |
| color: var(--dark-color); | |
| background-color: var(--light-color); | |
| } | |
| /* Header */ | |
| header { | |
| background-color: white; | |
| box-shadow: var(--shadow); | |
| position: sticky; | |
| top: 0; | |
| z-index: 100; | |
| } | |
| .header-container { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 1rem; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .logo { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| text-decoration: none; | |
| color: var(--dark-color); | |
| font-weight: bold; | |
| font-size: 1.5rem; | |
| } | |
| .logo-icon { | |
| font-size: 2rem; | |
| color: var(--primary-color); | |
| } | |
| .nav-links { | |
| display: flex; | |
| gap: 2rem; | |
| } | |
| .nav-links a { | |
| text-decoration: none; | |
| color: var(--dark-color); | |
| font-weight: 500; | |
| transition: var(--transition); | |
| position: relative; | |
| } | |
| .nav-links a:hover { | |
| color: var(--primary-color); | |
| } | |
| .nav-links a::after { | |
| content: ''; | |
| position: absolute; | |
| width: 0; | |
| height: 2px; | |
| bottom: -5px; | |
| left: 0; | |
| background-color: var(--primary-color); | |
| transition: var(--transition); | |
| } | |
| .nav-links a:hover::after { | |
| width: 100%; | |
| } | |
| .auth-buttons { | |
| display: flex; | |
| gap: 1rem; | |
| } | |
| .btn { | |
| padding: 0.5rem 1rem; | |
| border-radius: 25px; | |
| text-decoration: none; | |
| font-weight: 500; | |
| transition: var(--transition); | |
| border: none; | |
| cursor: pointer; | |
| } | |
| .btn-primary { | |
| background-color: var(--primary-color); | |
| color: white; | |
| } | |
| .btn-primary:hover { | |
| background-color: #ff5252; | |
| transform: translateY(-2px); | |
| } | |
| .btn-secondary { | |
| background-color: transparent; | |
| color: var(--dark-color); | |
| border: 1px solid var(--dark-color); | |
| } | |
| .btn-secondary:hover { | |
| background-color: var(--dark-color); | |
| color: white; | |
| } | |
| /* Hero Section */ | |
| .hero { | |
| background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1555939594-58d7cb561ad1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80'); | |
| background-size: cover; | |
| background-position: center; | |
| height: 80vh; | |
| display: flex; | |
| align-items: center; | |
| color: white; | |
| text-align: center; | |
| } | |
| .hero-content { | |
| max-width: 800px; | |
| margin: 0 auto; | |
| padding: 0 1rem; | |
| } | |
| .hero h1 { | |
| font-size: 3rem; | |
| margin-bottom: 1rem; | |
| text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); | |
| } | |
| .hero p { | |
| font-size: 1.2rem; | |
| margin-bottom: 2rem; | |
| text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); | |
| } | |
| .search-container { | |
| display: flex; | |
| max-width: 600px; | |
| margin: 0 auto; | |
| background-color: white; | |
| border-radius: 30px; | |
| overflow: hidden; | |
| box-shadow: var(--shadow); | |
| } | |
| .search-input { | |
| flex: 1; | |
| padding: 1rem; | |
| border: none; | |
| outline: none; | |
| font-size: 1rem; | |
| } | |
| .search-button { | |
| padding: 0 1.5rem; | |
| background-color: var(--primary-color); | |
| color: white; | |
| border: none; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| } | |
| .search-button:hover { | |
| background-color: #ff5252; | |
| } | |
| /* Features Section */ | |
| .features { | |
| padding: 4rem 1rem; | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| } | |
| .section-title { | |
| text-align: center; | |
| margin-bottom: 3rem; | |
| font-size: 2rem; | |
| color: var(--dark-color); | |
| } | |
| .features-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |
| gap: 2rem; | |
| } | |
| .feature-card { | |
| background-color: white; | |
| border-radius: 10px; | |
| padding: 2rem; | |
| text-align: center; | |
| box-shadow: var(--shadow); | |
| transition: var(--transition); | |
| } | |
| .feature-card:hover { | |
| transform: translateY(-10px); | |
| box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); | |
| } | |
| .feature-icon { | |
| font-size: 3rem; | |
| color: var(--primary-color); | |
| margin-bottom: 1rem; | |
| } | |
| .feature-card h3 { | |
| margin-bottom: 1rem; | |
| color: var(--dark-color); | |
| } | |
| /* Popular Restaurants */ | |
| .restaurants { | |
| background-color: #f8f9fa; | |
| padding: 4rem 1rem; | |
| } | |
| .restaurants-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); | |
| gap: 2rem; | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| } | |
| .restaurant-card { | |
| background-color: white; | |
| border-radius: 10px; | |
| overflow: hidden; | |
| box-shadow: var(--shadow); | |
| transition: var(--transition); | |
| } | |
| .restaurant-card:hover { | |
| transform: translateY(-5px); | |
| } | |
| .restaurant-image { | |
| height: 150px; | |
| width: 100%; | |
| object-fit: cover; | |
| } | |
| .restaurant-info { | |
| padding: 1rem; | |
| } | |
| .restaurant-name { | |
| font-size: 1.2rem; | |
| margin-bottom: 0.5rem; | |
| color: var(--dark-color); | |
| } | |
| .restaurant-rating { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| margin-bottom: 0.5rem; | |
| } | |
| .rating-stars { | |
| color: var(--warning-color); | |
| } | |
| .restaurant-tags { | |
| display: flex; | |
| gap: 0.5rem; | |
| flex-wrap: wrap; | |
| } | |
| .tag { | |
| background-color: #e9ecef; | |
| padding: 0.2rem 0.5rem; | |
| border-radius: 10px; | |
| font-size: 0.8rem; | |
| } | |
| /* How It Works */ | |
| .how-it-works { | |
| padding: 4rem 1rem; | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| } | |
| .steps-container { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |
| gap: 3rem; | |
| align-items: center; | |
| } | |
| .step { | |
| text-align: center; | |
| } | |
| .step-number { | |
| background-color: var(--primary-color); | |
| color: white; | |
| width: 50px; | |
| height: 50px; | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 1.5rem; | |
| font-weight: bold; | |
| margin: 0 auto 1rem; | |
| } | |
| .step h3 { | |
| margin-bottom: 1rem; | |
| color: var(--dark-color); | |
| } | |
| /* Testimonials */ | |
| .testimonials { | |
| background-color: #f8f9fa; | |
| padding: 4rem 1rem; | |
| } | |
| .testimonial-slider { | |
| max-width: 800px; | |
| margin: 0 auto; | |
| position: relative; | |
| } | |
| .testimonial { | |
| background-color: white; | |
| padding: 2rem; | |
| border-radius: 10px; | |
| box-shadow: var(--shadow); | |
| text-align: center; | |
| margin: 0 1rem; | |
| } | |
| .testimonial-image { | |
| width: 80px; | |
| height: 80px; | |
| border-radius: 50%; | |
| object-fit: cover; | |
| margin: 0 auto 1rem; | |
| } | |
| .testimonial-text { | |
| font-style: italic; | |
| margin-bottom: 1rem; | |
| color: var(--dark-color); | |
| } | |
| .testimonial-name { | |
| font-weight: bold; | |
| color: var(--primary-color); | |
| } | |
| .slider-controls { | |
| display: flex; | |
| justify-content: center; | |
| gap: 1rem; | |
| margin-top: 2rem; | |
| } | |
| .slider-control { | |
| width: 12px; | |
| height: 12px; | |
| border-radius: 50%; | |
| background-color: #ddd; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| } | |
| .slider-control.active { | |
| background-color: var(--primary-color); | |
| } | |
| /* Footer */ | |
| footer { | |
| background-color: var(--dark-color); | |
| color: white; | |
| padding: 3rem 1rem 1rem; | |
| } | |
| .footer-container { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | |
| gap: 2rem; | |
| } | |
| .footer-section h3 { | |
| margin-bottom: 1rem; | |
| font-size: 1.2rem; | |
| } | |
| .footer-links { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.5rem; | |
| } | |
| .footer-links a { | |
| color: #ccc; | |
| text-decoration: none; | |
| transition: var(--transition); | |
| } | |
| .footer-links a:hover { | |
| color: var(--primary-color); | |
| } | |
| .social-links { | |
| display: flex; | |
| gap: 1rem; | |
| } | |
| .social-links a { | |
| color: white; | |
| font-size: 1.5rem; | |
| transition: var(--transition); | |
| } | |
| .social-links a:hover { | |
| color: var(--primary-color); | |
| transform: translateY(-3px); | |
| } | |
| .copyright { | |
| text-align: center; | |
| margin-top: 2rem; | |
| padding-top: 2rem; | |
| border-top: 1px solid #444; | |
| color: #ccc; | |
| } | |
| /* Mobile Menu */ | |
| .menu-toggle { | |
| display: none; | |
| background: none; | |
| border: none; | |
| font-size: 1.5rem; | |
| cursor: pointer; | |
| color: var(--dark-color); | |
| } | |
| /* Responsive Design */ | |
| @media (max-width: 768px) { | |
| .nav-links { | |
| display: none; | |
| flex-direction: column; | |
| position: absolute; | |
| top: 100%; | |
| left: 0; | |
| width: 100%; | |
| background-color: white; | |
| padding: 1rem; | |
| box-shadow: var(--shadow); | |
| } | |
| .nav-links.active { | |
| display: flex; | |
| } | |
| .menu-toggle { | |
| display: block; | |
| } | |
| .hero h1 { | |
| font-size: 2rem; | |
| } | |
| .search-container { | |
| flex-direction: column; | |
| } | |
| .steps-container { | |
| grid-template-columns: 1fr; | |
| } | |
| } | |
| /* Animations */ | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(20px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .fade-in { | |
| animation: fadeIn 0.5s ease-out; | |
| } | |
| /* Built with anycoder */ | |
| .anycoder-link { | |
| position: fixed; | |
| bottom: 1rem; | |
| right: 1rem; | |
| background-color: var(--primary-color); | |
| color: white; | |
| padding: 0.5rem 1rem; | |
| border-radius: 25px; | |
| text-decoration: none; | |
| font-size: 0.9rem; | |
| z-index: 1000; | |
| box-shadow: var(--shadow); | |
| transition: var(--transition); | |
| } | |
| .anycoder-link:hover { | |
| background-color: #ff5252; | |
| transform: translateY(-2px); | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <header> | |
| <div class="header-container"> | |
| <a href="#" class="logo"> | |
| <i class="fas fa-utensils logo-icon"></i> | |
| <span>Gelsin</span> | |
| </a> | |
| <button class="menu-toggle" id="menuToggle"> | |
| <i class="fas fa-bars"></i> | |
| </button> | |
| <nav class="nav-links" id="navLinks"> | |
| <a href="#home">Home</a> | |
| <a href="#restaurants">Restaurants</a> | |
| <a href="#how-it-works">How It Works</a> | |
| <a href="#about">About</a> | |
| <a href="#contact">Contact</a> | |
| </nav> | |
| <div class="auth-buttons"> | |
| <a href="#" class="btn btn-secondary">Login</a> | |
| <a href="#" class="btn btn-primary">Sign Up</a> | |
| </div> | |
| </div> | |
| </header> | |
| <section class="hero" id="home"> | |
| <div class="hero-content fade-in"> | |
| <h1>Order Food You Love</h1> | |
| <p>Discover the best restaurants in your area and get your favorite meals delivered fast</p> | |
| <div class="search-container"> | |
| <input type="text" class="search-input" placeholder="Search for restaurants or dishes..."> | |
| <button class="search-button"> | |
| <i class="fas fa-search"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="features"> | |
| <h2 class="section-title">Why Choose Gelsin?</h2> | |
| <div class="features-grid"> | |
| <div class="feature-card fade-in"> | |
| <i class="fas fa-bolt feature-icon"></i> | |
| <h3>Fast Delivery</h3> | |
| <p>Get your food delivered in record time with our network of professional delivery partners.</p> | |
| </div> | |
| <div class="feature-card fade-in"> | |
| <i class="fas fa-utensils feature-icon"></i> | |
| <h3>Wide Selection</h3> | |
| <p>Choose from hundreds of restaurants and thousands of dishes to satisfy any craving.</p> | |
| </div> | |
| <div class="feature-card fade-in"> | |
| <i class="fas fa-shield-alt feature-icon"></i> | |
| <h3>Secure Payments</h3> | |
| <p>All payments are processed securely with multiple payment options available.</p> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="restaurants" id="restaurants"> | |
| <h2 class="section-title">Popular Restaurants</h2> | |
| <div class="restaurants-grid"> | |
| <div class="restaurant-card fade-in"> | |
| <img src="https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Pizza Palace" class="restaurant-image"> | |
| <div class="restaurant-info"> | |
| <h3 class="restaurant-name">Pizza Palace</h3> | |
| <div class="restaurant-rating"> | |
| <span class="rating-stars"> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star-half-alt"></i> | |
| </span> | |
| <span>4.5 (248)</span> | |
| </div> | |
| <div class="restaurant-tags"> | |
| <span class="tag">Italian</span> | |
| <span class="tag">Pizza</span> | |
| <span class="tag">Pasta</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="restaurant-card fade-in"> | |
| <img src="https://images.unsplash.com/photo-1565299624946-b28f40a0ca4b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1481&q=80" alt="Burger Haven" class="restaurant-image"> | |
| <div class="restaurant-info"> | |
| <h3 class="restaurant-name">Burger Haven</h3> | |
| <div class="restaurant-rating"> | |
| <span class="rating-stars"> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="far fa-star"></i> | |
| </span> | |
| <span>4.0 (187)</span> | |
| </div> | |
| <div class="restaurant-tags"> | |
| <span class="tag">American</span> | |
| <span class="tag">Burgers</span> | |
| <span class="tag">Fast Food</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="restaurant-card fade-in"> | |
| <img src="https://images.unsplash.com/photo-1565958011703-44f9829ba187?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Sushi Express" class="restaurant-image"> | |
| <div class="restaurant-info"> | |
| <h3 class="restaurant-name">Sushi Express</h3> | |
| <div class="restaurant-rating"> | |
| <span class="rating-stars"> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| </span> | |
| <span>5.0 (312)</span> | |
| </div> | |
| <div class="restaurant-tags"> | |
| <span class="tag">Japanese</span> | |
| <span class="tag">Sushi</span> | |
| <span class="tag">Asian</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="restaurant-card fade-in"> | |
| <img src="https://images.unsplash.com/photo-1551024506-0bccd828d307?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Taco Fiesta" class="restaurant-image"> | |
| <div class="restaurant-info"> | |
| <h3 class="restaurant-name">Taco Fiesta</h3> | |
| <div class="restaurant-rating"> | |
| <span class="rating-stars"> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star"></i> | |
| <i class="fas fa-star-half-alt"></i> | |
| <i class="far fa-star"></i> | |
| </span> | |
| <span>3.8 (96)</span> | |
| </div> | |
| <div class="restaurant-tags"> | |
| <span class="tag">Mexican</span> | |
| <span class="tag">Tacos</span> | |
| <span class="tag">Spicy</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="how-it-works" id="how-it-works"> | |
| <h2 class="section-title">How It Works</h2> | |
| <div class="steps-container"> | |
| <div class="step fade-in"> | |
| <div class="step-number">1</div> | |
| <h3>Choose Your Restaurant</h3> | |
| <p>Browse through our extensive list of partner restaurants and find the one that suits your taste.</p> | |
| </div> | |
| <div class="step fade-in"> | |
| <div class="step-number">2</div> | |
| <h3>Select Your Meal</h3> | |
| <p>Pick your favorite dishes from the menu and customize them to your liking with our easy-to-use interface.</p> | |
| </div> | |
| <div class="step fade-in"> | |
| <div class="step-number">3</div> | |
| <h3>Place Your Order</h3> | |
| <p>Add your items to the cart, choose your payment method, and place your order with just a few clicks.</p> | |
| </div> | |
| <div class="step fade-in"> | |
| <div class="step-number">4</div> | |
| <h3>Enjoy Your Food</h3> | |
| <p>Sit back and relax while we prepare and deliver your food. Track your order in real-time and enjoy!</p> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="testimonials"> | |
| <h2 class="section-title">What Our Customers Say</h2> | |
| <div class="testimonial-slider"> | |
| <div class="testimonial fade-in"> | |
| <img src="https://images.unsplash.com/photo-1494790108755-2616b612b786?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=687&q=80" alt="Customer" class="testimonial-image"> | |
| <p class="testimonial-text">"Gelsin has completely changed how I order food. The variety is amazing and the delivery is always on time. Highly recommended!"</p> | |
| <p class="testimonial-name">- Sarah Johnson</p> | |
| </div> | |
| <div class="slider-controls"> | |
| <div class="slider-control active"></div> | |
| <div class="slider-control"></div> | |
| <div class="slider-control"></div> | |
| </div> | |
| </div> | |
| </section> | |
| <footer> | |
| <div class="footer-container"> | |
| <div class="footer-section"> | |
| <h3>Gelsin</h3> | |
| <p>Your favorite food, delivered fast to your doorstep.</p> | |
| <div class="social-links"> | |
| <a href="#"><i class="fab fa-facebook"></i></a> | |
| <a href="#"><i class="fab fa-twitter"></i></a> | |
| <a href="#"><i class="fab fa-instagram"></i></a> | |
| <a href="#"><i class="fab fa-youtube"></i></a> | |
| </div> | |
| </div> | |
| <div class="footer-section"> | |
| <h3>Quick Links</h3> | |
| <div class="footer-links"> | |
| <a href="#">Home</a> | |
| <a href="#">Restaurants</a> | |
| <a href="#">How It Works</a> | |
| <a href="#">About Us</a> | |
| <a href="#">Contact</a> | |
| </div> | |
| </div> | |
| <div class="footer-section"> | |
| <h3>Support</h3> | |
| <div class="footer-links"> | |
| <a href="#">FAQ</a> | |
| <a href="#">Help Center</a> | |
| <a href="#">Delivery Areas</a> | |
| <a href="#">Terms of Service</a> | |
| <a href="#">Privacy Policy</a> | |
| </div> | |
| </div> | |
| <div class="footer-section"> | |
| <h3>Contact Us</h3> | |
| <div class="footer-links"> | |
| <p><i class="fas fa-map-marker-alt"></i> 123 Food Street, City</p> | |
| <p><i class="fas fa-phone"></i> +1 (555) 123-4567</p> | |
| <p><i class="fas fa-envelope"></i> info@gelsin.com</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="copyright"> | |
| <p>© 2023 Gelsin. All rights reserved.</p> | |
| </div> | |
| </footer> | |
| <a href="https://huggingface.co/spaces/akhaliq/anycoder" class="anycoder-link" target="_blank"> | |
| Built with anycoder | |
| </a> | |
| <script> | |
| // Mobile menu toggle | |
| const menuToggle = document.getElementById('menuToggle'); | |
| const navLinks = document.getElementById('navLinks'); | |
| menuToggle.addEventListener('click', () => { | |
| navLinks.classList.toggle('active'); | |
| }); | |
| // Smooth scrolling for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| // Close mobile menu if open | |
| navLinks.classList.remove('active'); | |
| const targetId = this.getAttribute('href'); | |
| if (targetId === '#') return; | |
| const targetElement = document.querySelector(targetId); | |
| if (targetElement) { | |
| window.scrollTo({ | |
| top: targetElement.offsetTop - 80, | |
| behavior: 'smooth' | |
| }); | |
| } | |
| }); | |
| }); | |
| // Testimonial slider | |
| const sliderControls = document.querySelectorAll('.slider-control'); | |
| const testimonials = document.querySelectorAll('.testimonial'); | |
| sliderControls.forEach((control, index) => { | |
| control.addEventListener('click', () => { | |
| // Remove active class from all controls | |
| sliderControls.forEach(c => c.classList.remove('active')); | |
| // Add active class to clicked control | |
| control.classList.add('active'); | |
| // Hide all testimonials | |
| testimonials.forEach(t => t.style.display = 'none'); | |
| // Show selected testimonial | |
| testimonials[index].style.display = 'block'; | |
| }); | |
| }); | |
| // Intersection Observer for fade-in animations | |
| const observerOptions = { | |
| threshold: 0.1, | |
| rootMargin: '0px 0px -50px 0px' | |
| }; | |
| const observer = new IntersectionObserver((entries) => { | |
| entries.forEach(entry => { | |
| if (entry.isIntersecting) { | |
| entry.target.classList.add('fade-in'); | |
| } | |
| }); | |
| }, observerOptions); | |
| // Observe all elements with fade-in class | |
| document.querySelectorAll('.fade-in').forEach(el => { | |
| observer.observe(el); | |
| }); | |
| // Search functionality | |
| const searchInput = document.querySelector('.search-input'); | |
| const searchButton = document.querySelector('.search-button'); | |
| searchButton.addEventListener('click', () => { | |
| const searchTerm = searchInput.value.trim(); | |
| if (searchTerm) { | |
| alert(`Searching for: ${searchTerm}`); | |
| // In a real app, this would filter restaurants or redirect to search results | |
| } | |
| }); | |
| searchInput.addEventListener('keypress', (e) => { | |
| if (e.key === 'Enter') { | |
| searchButton.click(); | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> |