Skip to content

Commit 416fa88

Browse files
committed
20240708_001
1 parent ce7b715 commit 416fa88

File tree

4 files changed

+105
-34
lines changed

4 files changed

+105
-34
lines changed

Entregas/PruebasEntrega/hechoPorMi/css/estilosCarrito.css

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,66 @@ body main{
7373
margin-top: 50px;
7474

7575
}
76+
77+
h1 {
78+
text-align: center;
79+
}
80+
81+
table {
82+
margin: 0 auto;/* Para centrar usamos "auto" en la alineación horizontal */
83+
border-collapse: collapse;
84+
width: 80%;
85+
text-align: center;
86+
87+
}
88+
89+
#tablediv{
90+
border-radius: 10px 0px 10px 0px ;
91+
}
92+
93+
th{
94+
background-color:var(--color-header);
95+
color: var(--color-body);
96+
padding-top: 20px;
97+
padding-bottom: 20px;
98+
}
99+
100+
101+
102+
tr:nth-child(odd) {
103+
background-color: #e1e0f0;
104+
}
105+
106+
tr:nth-child(even) {
107+
background-color: #f2f2f2;
108+
}
109+
110+
111+
th:first-child {
112+
border-top-left-radius: 25px;
113+
}
114+
115+
/* th:last-child {
116+
border-top-right-radius: 10px;
117+
} */
118+
/* tr:last-child td:first-child {
119+
border-bottom-left-radius: 10px;
120+
} */
121+
122+
tr:last-child td:last-child {
123+
border-bottom-right-radius: 25px;
124+
}
125+
td:last-child {
126+
font-weight: bolder;
127+
}
128+
129+
table,
130+
th,td {
131+
padding-top: 10px;
132+
padding-bottom: 10px;
133+
}
134+
135+
76136
#item-producto{
77137
justify-content: center;
78138
text-align: center;
@@ -103,8 +163,8 @@ body main{
103163

104164
}
105165

166+
106167
footer{
107168
justify-content: space-between;
108-
109169
background-color: var(--color-header);
110170
}

Entregas/PruebasEntrega/hechoPorMi/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<head>
44
<meta charset="UTF-8">
55
<title>Login Proyecto CoderHouse</title>
6-
<link rel="stylesheet" href="/css/estilosMain.css">
7-
<script src="/js/jquery-3.1.1.min.js"></script>
8-
<script src="/js/main.js"></script>
6+
<link rel="stylesheet" href="./css/estilosMain.css">
7+
<script src="./js/main.js"></script>
8+
<script src="./js/jquery-3.1.1.min.js"></script>
99
</head>
1010
<body>
1111

1212
<div class="formContainer">
1313
<div id="contenido">
14-
<div id="formlogin"><img src="/img/logo.jpg" alt="Logo">
14+
<div id="formlogin"><img src="./img/logo.jpg" alt="Logo">
1515
<BR><h2>Iniciar Sesión</h2>
1616
<form class="formSubmit" action="#">
1717
<input type="text" id="GetUsuario" placeholder="Usuario" required>

Entregas/PruebasEntrega/hechoPorMi/js/cartList.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,25 @@ productosAgrupados.forEach(producto => {
2828
const productoElemento = document.createElement('tr');
2929

3030
productoElemento.innerHTML = `
31-
31+
<tbody>
32+
<TR>
3233
<TD> ${producto.nombre} </TD>
3334
<TD> ${producto.precio}$ </TD>
3435
<TD> ${producto.cantidad} </TD>
3536
<TD> ${total} </TD>
36-
37-
<td class="cantidadBTN">
38-
<button onclick="bajaCantidad()"> BAJAR </button>
39-
<button onclick="subirCantidad()"> SUBIR </button>
40-
</td>
37+
</TR>
38+
</tbody>
39+
4140
4241
`;
4342
carritoContainer.appendChild(productoElemento);
4443
});
45-
44+
/**
45+
* Lo saue del inner de arriba:
46+
*
47+
* <td class="cantidadBTN">
48+
<button onclick="bajaCantidad()"> BAJAR </button>
49+
<button onclick="subirCantidad()"> SUBIR </button>
50+
</td>
51+
*/
4652
}

Entregas/PruebasEntrega/hechoPorMi/src/views/ComprasCarrito.html

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,35 @@
77
<!-- <script defer src="../../js/cart.js"></script> -->
88
<title>CARRITO DE COMPRAS</title>
99
<body>
10-
<header><div id="header">
11-
<nav>
12-
<div id="logoHeader"> <img src="../../img/logo.jpg" alt="Logo">
13-
<a href="#"><img src="../../img/Configure002.png" alt="Modificaciones"></a>
14-
</div>
15-
<div>
16-
<a href="#"><img src="../../img/busqueda.png" alt="Buscar"></a>
17-
<a href="./carrito.html" id="carrito"><img src="../../img/carrito-de-compras.png" alt="Carrito"><span id="numero-carrito">0</span></a>
18-
<a href="../../index.html"><img src="../../img/cerrar-sesion red.png" alt="LOGOUT"></a>
19-
</div>
20-
</nav>
21-
</div></header>
10+
<header>
11+
<div id="header">
12+
<nav>
13+
<div id="logoHeader"> <img src="../../img/logo.jpg" alt="Logo">
14+
<a href="#"><img src="../../img/Configure002.png" alt="Modificaciones"></a>
15+
</div>
16+
<div>
17+
<a href="#"><img src="../../img/busqueda.png" alt="Buscar"></a>
18+
<a href="./carrito.html" id="carrito"><img src="../../img/carrito-de-compras.png" alt="Carrito"><span id="numero-carrito">0</span></a>
19+
<a href="../../index.html"><img src="../../img/cerrar-sesion red.png" alt="LOGOUT"></a>
20+
</div>
21+
</nav>
22+
</div>
23+
</header>
2224
<main>
2325
<h1>COMPRAS REALIZADAS</h1>
24-
<TABLE>
25-
<TR>
26-
<TH> PRODUCTO</TH>
27-
<TH> PRECIO </TH>
28-
<TH> CANTIDAD </TH>
29-
<TH> TOTAL </TH>
30-
<TH> Poner/Sacar </TH>
31-
</TR>
32-
<DIV id="carrito-items"></DIV>
33-
</TABLE>
26+
<div class="tablediv">
27+
<TABLE class="producto-tabla">
28+
<Thead>
29+
<Tr>
30+
<TH> PRODUCTO </TH>
31+
<TH> PRECIO </Th>
32+
<Th> CANTIDAD </Th>
33+
<Th> TOTAL </Th>
34+
</Tr>
35+
</Thead>
36+
<tbody id="carrito-items"></tbody>
37+
</TABLE>
38+
</div>
3439

3540
</main>
3641
</body>

0 commit comments

Comments
 (0)