-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathBedroom_layout.html
More file actions
126 lines (112 loc) · 4.07 KB
/
Bedroom_layout.html
File metadata and controls
126 lines (112 loc) · 4.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BEDROOM_LAYOUTS</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<!-- Header -->
<header class="header">
<div class="logo">
<img src="img/bed.jpeg" alt="Logo">
<h1>Beddings</h1>
<p>Our website. Our marketplace. Our goods</p>
<p> comfortable beds, mattresses, and bedroom essentials.</p>
</div>
<!-- Search -->
<div class="search-bar">
<input type="search" placeholder="Search for an bedroom layouts..." />
</div>
</header>
<!-- Navigation -->
<nav class="navbar">
<a href="index.html">Home</a>
<a href="kitchen.html">Kitchen</a>
<a href="electronics.html">Electronics</a>
<a href="motorvehicle.html">Motor Vehicles</a>
<a href="Bedroom_layout.html">Bedroom layout</a>
<a href="cart.html" class="cart-link"><span id="cart-logo">🛒</span>Cart <span id="cart-count" class="cart-count">0</span></a>
</nav>
<!-- Main Section -->
<main class="products">
<div class="product-card">
<img src="img/bed.jpeg" alt="Luxury Bed">
<h2>Luxury Bed</h2>
<p>King size bed with stylish design for your bedroom.</p>
<button onclick="addToCart({
id: 1, name: 'Luxury bed', price: 18, image: 'img/bed.jpeg'})">
Add to Cart
</button>
</div>
<div class="product-card">
<img src="img/African Ethnic Bedding Sets Duvet and Pillow….jpeg" alt="Memory Foam Mattress">
<h2>Memory Foam Mattress</h2>
<p>Comfortable foam mattress for a perfect night sleep.</p>
<button onclick="addToCart({
id: 2, name: 'Memory Foam Mattress', price: 38, image: 'img/African Ethnic Bedding Sets Duvet and Pillow….jpeg'})">
Add to Cart
</button>
</div>
<div class="product-card">
<img src="img/Looking for Gray Bedroom Ideas_ These designs pair….jpeg" alt="Bedroom Set">
<h2>Bedroom Set</h2>
<p>Includes bed, wardrobe, and bedside tables in matching style.</p>
<button onclick="addToCart({
id: 3, name: 'Bedroom set', price: 38, image: 'img/Looking for Gray Bedroom Ideas_ These designs pair….jpeg'})">
Add to Cart
</button>
</div>
<div class="product-card">
<img src="img/Precisa de inspiração para um quarto moderno_….jpeg" alt="Dell Laptop">
<h2>Bedroom Set</h2>
<p><strong>Price:</strong> $35<br>Nice wardrobe</p>
<button onclick="addToCart({
id: 4, name: 'Bedroom set', price: 35, image: 'img/Precisa de inspiração para um quarto moderno_….jpeg'})">
Add to Cart
</button>
</div>
<div class="product-card">
<img src="img/Achieve balance with modern silver tones and….jpeg" alt="Printer">
<h2>Bedroom Set</h2>
<p><strong>Price:</strong> $32<br>Nice wardrobe</p>
<button onclick="addToCart({
id: 5, name: 'Bedroom set', price: 32, image: 'img/Achieve balance with modern silver tones and….jpeg'})">
Add to Cart
</button>
</div>
<div class="product-card">
<img src="img/bed.jpeg" alt=" bed">
<h2>Bedroom Set</h2>
<p><strong>Price:</strong> $18<br>Nice bed</p>
<button onclick="addToCart({
id: 6, name: 'Bedroom set', price: 18, image: 'img/bed.jpeg'})">
Add to Cart
</button>
</div>
</main>
<!-- ===== FOOTER ===== -->
<footer>
<p>© 2025 Maximall. All rights reserved. | Designed with 💙 by Billy & White Wizard.</p>
</div>
</footer>
<script>
// Adds a product to the cart in localStorage
function addToCart(product) {
let cart = JSON.parse(localStorage.getItem("universalCart")) || [];
// check if already exists
const existing = cart.find(item => item.id === product.id);
if (existing) {
existing.quantity += 1;
} else {
cart.push({ ...product, quantity: 1 });
}
// Save to localStorage
localStorage.setItem("universalCart", JSON.stringify(cart));
alert(`${product.name} added to cart!`);
}
</script>
<script src="Cart.js"></script>
</body>
</html>