-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcart.html
121 lines (109 loc) · 3.4 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
<!DOCTYPE html>
<script>
const autenticado = () => {
if (!localStorage.getItem("email")) {
location.href = "./index.html";
}
};
autenticado();
</script>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Laptops</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous" />
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
<style>
#cart .card .me-4 {
width: 100%;
max-width: 180px;
/* Tamaño máximo en pantallas grandes */
overflow: hidden;
height: auto;
max-height: 120px;
display: flex;
align-items: center;
border-radius: 5px;
}
#cart .card .me-4 img {
width: 100%;
height: auto;
}
/* Ajustes para pantallas grandes */
@media (min-width: 1200px) {
.container {
max-width: 1200px;
/* Ancho máximo del contenedor */
}
.text-md-end {
text-align: right !important;
}
}
/* Ajustes específicos para pantallas pequeñas */
@media (max-width: 576px) {
#cart .card-body {
text-align: center;
}
.text-sm-end {
text-align: center !important;
}
}
</style>
</head>
<body id="cart">
<header></header>
<div class="container pt-4">
<div class="row">
<!-- Carrito de compras -->
<div class="col-lg-8 col-12 order-2 order-lg-1">
<div id="cards"></div>
<div class="row my-4">
<div class="col-12 col-md-6 mb-2">
<a href="index.html" class="btn btn-primary w-100">Seguir comprando</a>
</div>
<div class="col-12 col-md-6">
<div class="text-md-end">
<button id="btn-checkout" class="btn btn-success me-2 w-100 mb-2" onclick="checkOut()">
Checkout
</button>
<button id="btn-clear-cart" class="btn btn-danger w-100" onclick="cleanCart()">
Limpiar Carrito
</button>
</div>
</div>
</div>
</div>
<!-- Resumen del pedido -->
<div class="col-lg-4 col-12 order-1 order-lg-2">
<div class="mt-5 mt-lg-0">
<div class="card border shadow-none">
<div class="card-header bg-transparent border-bottom py-3 px-4">
<h5 class="font-size-16 mb-0">Orden de Compra</h5>
</div>
<div class="card-body p-4 pt-2">
<div class="table-responsive">
<table class="table mb-0">
<tbody>
<tr class="bg-light">
<th>Total :</th>
<td class="text-end">
<span class="fw-bold" id="card-total">$0</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="./navbar.js"></script>
<script src="./cart.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
</body>
</html>