-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cart.html
257 lines (215 loc) · 7.55 KB
/
Cart.html
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="https://fonts.googleapis.com/css2?family=Dosis:wght@400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="CSS Proyect/Cart.css" />
<link rel="shortcut icon" href="images/Extras/BrawlStars-Icon_3.png" type="image/x-icon">
<title>Shopping Cart</title>
</head>
<body>
<!----------------------- Scroll To Top Button --------------------------->
<div class="scrollTop" onclick="scrollToTop();"></div>
<!-- ---------------------- Pop Up info ---------------------------- -->
<div class="popup">
<div class="contentBox">
<div class="close"></div>
<div class="imgBx">
<img src="images/Backgrounds/zoom-out.png" alt="">
</div>
<div class="content">
<div>
<h3>¿Demasiado cerca?</h3>
<h2>Zoom<span>Out</span></h2>
<p>Pulsa Ctrl- para reducir el tamaño y ver más productos por línea.</p>
</div>
</div>
</div>
</div>
<!-- Navigation -->
<nav class="nav">
<div class="nav__center container">
<div class="nav__logo">
<!-- <h1>SHOPI<span>Q</span></h1> -->
<a href="Shop.html"><img class="logo" src="images/NavBar/Logo_Leon.png" alt="logo"></a>
</div>
<ul class="nav__list">
<!-- <a href="#" class="login">Login</a> -->
<div class="cart__icon">
<h2>cart</h2>
<span class="item__total">0</span>
</div>
</ul>
<div class="hamburger">
<svg>
<use xlink:href="./images/sprite.svg#icon-menu"></use>
</svg>
</div>
</div>
</nav>
<!-- --------------------- Day/Night Toggle Button ------------------ -->
<div class="toggle"></div>
<!-- Products -->
<section class="products">
<div class="product__center">
<!-- Single Product -->
<!-- <div class="product">
<div class="image__container">
<img src="./images/product-1.jpg" alt="" />
</div>
<div class="product__footer">
<h1>The Original Super Donut</h1>
<div class="rating">
<span>
<svg>
<use xlink:href="./images/sprite.svg#icon-star-full"></use>
</svg>
</span>
<span>
<svg>
<use xlink:href="./images/sprite.svg#icon-star-full"></use>
</svg>
</span>
<span>
<svg>
<use xlink:href="./images/sprite.svg#icon-star-full"></use>
</svg>
</span>
<span>
<svg>
<use xlink:href="./images/sprite.svg#icon-star-full"></use>
</svg>
</span>
<span>
<svg>
<use xlink:href="./images/sprite.svg#icon-star-empty"></use>
</svg>
</span>
</div>
<div class="bottom">
<div class="btn__group">
<a href="#" class="btn addToCart">Add to Cart</a>
<a href="#" class="btn view">View</a>
</div>
<div class="price">$255.99</div>
</div>
</div>
</div> -->
<!-- End of Single Product -->
</div>
</section>
<section class="cart__overlay">
<div class="cart">
<span class="close__cart">
<svg>
<use xlink:href="./images/sprite.svg#icon-cross"></use>
</svg>
</span>
<h1>Your Cart</h1>
<div class="cart__centent">
<!-- Cart Item -->
<!-- <div class="cart__item">
<img src="./images/product-1.jpg" alt="">
<div>
<h3>The Original Super Donut</h3>
<h3 class="price">$750</h3>
</div>
<div>
<span>
<svg>
<use xlink:href="./images/sprite.svg#icon-angle-up"></use>
</svg>
</span>
<p>3</p>
<span>
<svg>
<use xlink:href="./images/sprite.svg#icon-angle-down"></use>
</svg>
</span>
</div>
<div>
<span class="remove__item">
<svg>
<use xlink:href="./images/sprite.svg#icon-trash"></use>
</svg>
</span>
</div>
</div> -->
</div>
<div class="cart__footer">
<h3>Total: <span class="cart__total">0</span> €</h3>
<button class="clear__cart btn">Clear Cart</button>
</div>
</div>
</section>
<!-- -------------------------------------------------------------------------------------- -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.9.2/umd/popper.min.js"></script>
<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/8.3.3/firebase-app.js"></script> <!-- el tio del video de quita lo de "-app" pero yo no me fio -->
<!-- TODO: Add SDKs for Firebase products that you want to use -->
<script src="https://www.gstatic.com/firebasejs/8.3.3/firebase-analytics.js"></script>
<!-- ----------------------------------------------------------------------------------------- -->
<script src="JS Proyect/Cart.js"></script>
<!-- Automatic show popup after x seconds of page load -->
<script>
const popup = document.querySelector('.popup');
const close = document.querySelector('.close');
window.onload = function(){
setTimeout(function(){
popup.style.display = "block"; //lo bloqueamos para que no salga al pricnipio del tirón
//Add some time delay to show popup
}, 4000)
}
close.addEventListener('click', () => {
popup.style.display = "none";
})
</script>
<!-- ----------------- Day/Night Toggle Button --------------------- -->
<script type="text/javascript">
$(document).ready(function(){
$('.toggle').click(function(){
$('.toggle').toggleClass('active');
$('body').toggleClass('night');
});
});
</script>
<!---------------------- Scroll To Top Button ------------------------>
<script type="text/javascript">
window.addEventListener('scroll', function(){ //para definir la altura a la que quiero que aparezca el botón
var scroll = document.querySelector('.scrollTop');
scroll.classList.toggle("active", window.scrollY > 500)
});
function scrollToTop(){
window.scrollTo({
top: 0,
behavior: 'smooth'
});
}
</script>
<!-- -------------------- Full Screen mode ------------------ -->
<script>
function getFullscreenElement(){
return document.fullscreenElement
|| document.webkitFullscreenElement
|| document.mozFullscreenElement
|| document.msFullscreenElement;
}
function toggleFullscreen(){
if(getFullscreenElement()){
document.exitFullscreen();
}else{
document.documentElement.requestFullscreen().catch(console.log);
// document.getElementById("#").requestFullscreen().catch(console.log); //para que se active clickeando en un solo elemento
}
}
document.addEventListener("dblclick", () => {
toggleFullscreen();
});
document.addEventListener("fullscreenchange", () => {
console.log("full screen changed");
});
</script>
</body>
</html>