const btnCart = document.querySelector('#cart-icon'); const cart = document.querySelector('.cart'); const btnClose = document.querySelector('#cart-close'); btnCart.addEventListener('click', () => { cart.classList.add('cart-active'); }); btnClose.addEventListener('click', () => { cart.classList.remove('cart-active'); }); document.addEventListener('DOMContentLoaded', () => { loadContent(); loadFood(); }); function loadFood() { // Any initialization related to food items can be placed here } function loadContent() { // Retrieve item list from localStorage itemList = JSON.parse(localStorage.getItem('cartItems')) || []; // Remove Food Items From Cart let btnRemove = document.querySelectorAll('.cart-remove'); btnRemove.forEach((btn) => { btn.addEventListener('click', removeItem); }); // Product Item Change Event let qtyElements = document.querySelectorAll('.ca...
Posts
Showing posts from September, 2024
fruit.jsp
- Get link
- X
- Other Apps
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="cart.CartItem" %> <!DOCTYPE html> <html lang="en"> <head> <meta charset="ISO-8859-1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Online Grocery Store - Home</title> <link rel="stylesheet" href="home.css"> <script src="js/script.js" defer></script> </head> <body> <header> <div class="header-container"> <h1>Online Grocery Store</h1> <nav> <a href="home.jsp">Home</a> <...
1000
- Get link
- X
- Other Apps
.register-section { padding: 40px 20px; background-color: #f5f5f5; min-height: 100vh; display: flex; align-items: center; justify-content: center; } .register-container { background-color: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); max-width: 400px; width: 100%; } .register-container h2 { margin-bottom: 20px; font-size: 24px; color: #333; } .register-form .form-group { margin-bottom: 15px; } .register-form .form-group label { display: block; font-size: 14px; color: #666; margin-bottom: 5px; } .register-form .form-group input { width: 100%; padding: 10px; font-size: 16px; border: 1px solid #ccc; bord...
css
- Get link
- X
- Other Apps
@charset "ISO-8859-1"; @import url('https://fonts.googleapis.com/css?family=Montserrat:400,800'); * { box-sizing: border-box; } body { background: #f6f5f7; display: flex; justify-content: center; align-items: center; flex-direction: column; font-family: 'Montserrat', sans-serif; height: 100vh; margin: -20px 0 50px; } h1 { font-weight: bold; margin: 0; } h2 { text-align: center; } p { font-size: 14px; font-weight: 100; line-height: 20px; letter-spacing: 0.5px; margin: 20px 0 30px; } span { font-size: 12px; } a { color: #333; font-size: 14px; text-decoration: none; margin: 15px 0; } button { border-radius: 20px; border: 1px solid #38ef7d; ...
- Get link
- X
- Other Apps
/* General Styles */ body { font-family: Arial, sans-serif; background-color: #f4fdf4; /* Light green background */ color: #333; margin: 0; padding: 0; } /* Header and Navigation */ header { background-color: #2d572c; /* Dark green */ color: white; padding: 10px 20px; position: sticky; top: 0; z-index: 1000; } .header-container { display: flex; justify-content: space-between; align-items: center; } nav { display: flex; justify-content: space-between; width: 100%; align-items: center; } .nav-left, .nav-center, .nav-right { display: flex; align-items: center; } .nav-center { justify-content: center; flex-grow: 1; } .nav-link { color: white; text-decoration: n...