forked from jcgeneration/ListaCompras
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
144 lines (127 loc) · 5.32 KB
/
index.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title></title>
<!-- Bootstrap core CSS -->
<link href="https://getbootstrap.com/docs/4.6/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<!-- Favicons -->
<link rel="apple-touch-icon" href="https://getbootstrap.com/docs/4.6/assets/img/favicons/apple-touch-icon.png"
sizes="180x180">
<link rel="icon" href="https://getbootstrap.com/docs/4.6/assets/img/favicons/favicon-32x32.png" sizes="32x32"
type="image/png">
<link rel="icon" href="https://getbootstrap.com/docs/4.6/assets/img/favicons/favicon-16x16.png" sizes="16x16"
type="image/png">
<link rel="manifest" href="https://getbootstrap.com/docs/4.6/assets/img/favicons/manifest.json">
<link rel="mask-icon" href="https://getbootstrap.com/docs/4.6/assets/img/favicons/safari-pinned-tab.svg"
color="#563d7c">
<link rel="icon" href="https://getbootstrap.com/docs/4.6/assets/img/favicons/favicon.ico">
<meta name="msapplication-config" content="https://getbootstrap.com/docs/4.6/assets/img/favicons/browserconfig.xml">
<meta name="theme-color" content="#563d7c">
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
<!-- Custom styles for this template -->
<link href="css/form-validation.css" rel="stylesheet">
</head>
<body class="bg-light">
<div class="container">
<div class="py-5 text-center">
<img class="d-block mx-auto mb-4" src="https://getbootstrap.com/docs/4.6/assets/brand/bootstrap-solid.svg" alt=""
width="72" height="72">
<h2>Lista de Compras</h2>
</div>
<div class="row">
<div class="col-md-4 order-md-4 mb-4">
<h4 class="d-flex justify-content-between align-items-center mb-3">
<span class="text-muted">Resumen</span>
<span class="badge badge-danger badge-pill" id="contadorProductos">0</span>
</h4>
<ul class="list-group mb-3 list-group-item">
<li class="d-flex justify-content-between lh-condensed">
<div>
<h6 class="my-0" id="totalProductos">Total en Productos</h6>
</div>
<span class="text-muted" id="productosTotal">0</span>
</li>
<li class="d-flex justify-content-between lh-condensed">
<div>
<small class="text-muted" id="totalPrecio">Total </small>
</div>
<span class="text-muted" id="precioTotal">$0</span>
</li>
</ul>
</div>
<div class="col-md-8 order-md-1">
<h4 class="mb-3">Agregar Productos</h4>
<div class="alert alert-danger fade show" style="display:none" role="alert" id="alertValidaciones">
<p id="alertValidacionesTexto"></p>
</div>
<form class="needs-validation">
<div class="row">
<div class="col-md-6 mb-3">
<label for="Name">Nombre</label>
<input class="campo" type="text" class="form-control" autofocus id="Name" placeholder="" value=""
required>
<div class="invalid-feedback">
Nombre inválido
</div>
</div>
<div class="col-md-6 mb-3">
<label for="Number">Cantidad</label>
<input class="campo" type="text" class="form-control" id="Number" placeholder="" value="" required>
<div class="invalid-feedback">
Cantidad inválida
</div>
</div>
</div>
<button id="btnAgregar" class="btn btn-primary btn-lg btn-block" type="button">Agregar</button>
<hr class="mb-4">
<!-- Insertar tabla aquí -->
<table class="table table-bordered" id="tablaListaCompras">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Nombre</th>
<th scope="col">Cantidad</th>
<th scope="col">Precio</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
</div>
<footer class="my-5 pt-5 text-muted text-center text-small">
<p class="mb-1">© 2021 JC Inc.</p>
<ul class="list-inline">
<li class="list-inline-item"><a href="#">Privacy</a></li>
<li class="list-inline-item"><a href="#">Terms</a></li>
<li class="list-inline-item"><a href="#">Support</a></li>
</ul>
</footer>
</div>
<script src="js/main.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="https://getbootstrap.com/docs/4.6/assets/js/vendor/jquery.slim.min.js"><\/script>')</script>
<script src="https://getbootstrap.com/docs/4.6/dist/js/bootstrap.bundle.min.js"
integrity="sha384-fQybjgWLrvvRgtW6bFlB7jaZrFsaBXjsOMm/tB9LTS58ONXgqbR9W8oWht/amnpF"
crossorigin="anonymous"></script>
</body>
</html>