Skip to content

Commit

Permalink
Ajustes de visualización
Browse files Browse the repository at this point in the history
  • Loading branch information
estrelicia committed Nov 28, 2023
1 parent 4e672c5 commit 2cac843
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 26 deletions.
7 changes: 7 additions & 0 deletions assets/css/estilos.css
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,13 @@ button {
font-size: 13px;
font-weight: 500;
}
.videos-publicitarios {
display: flex;
justify-content: center;
}
iframe {
margin:5px 15px 25px 15px;
}
@media screen and (max-width:425px) {

.brand-flex {
Expand Down
51 changes: 26 additions & 25 deletions assets/js/validacion.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
function validar() {
let cantidad = document.getElementById('cantidad').value;
let nombre = document.getElementById('nombre').value;
let apellido = document.getElementById('apellido').value;
let email = document.getElementById('email').value;

console.log(nombre);
if (nombre == '') {
document.getElementById('alerta-nombre').innerHTML = 'El nombre no puede estar vacío';
}
if (apellido == '') {
document.getElementById('alerta-apellido').innerHTML = 'El apellido no puede estar vacío';
}
if (email == '') {
document.getElementById('alerta-email').innerHTML =
'El correo electrónico no puede estar vacío';
}

if (cantidad < 1) {
document.getElementById('alerta-cantidad').innerHTML = 'La cantidad debe ser mayor a 0';
return false;
}
}

function resultado() {
limpiar();
validar();
Expand Down Expand Up @@ -49,6 +25,32 @@ function calculo() {
document.getElementById('resultado').innerHTML = resultado;
}

function validar() {
let cantidad = document.getElementById('cantidad').value;
let nombre = document.getElementById('nombre').value;
let apellido = document.getElementById('apellido').value;
let email = document.getElementById('email').value;

console.log(nombre);
if (nombre == '') {
document.getElementById('alerta-nombre').innerHTML = 'El nombre no puede estar vacío';
}
if (apellido == '') {
document.getElementById('alerta-apellido').innerHTML = 'El apellido no puede estar vacío';
}
if (email == '') {
document.getElementById('alerta-email').innerHTML =
'El correo electrónico no puede estar vacío';
}
if (cantidad < 1) {
document.getElementById('alerta-cantidad').innerHTML = 'La cantidad debe ser mayor a 0';
}
/* if (nombre != '' && email != '' && apellido != '' && cantidad >= 1) {
document.getElementById('alerta-cantidad').innerHTML = 'La cantidad debe ser mayor a 0';
} */

}

function limpiar() {
const x = document.getElementsByTagName('input');
for (let i = 0; i < x.length; i++) {
Expand All @@ -68,7 +70,6 @@ function borrar() {
const x = document.getElementsByTagName('input');
for (let i = 0; i < x.length; i++) {
document.getElementsByTagName('input')[i].value="";

}
document.getElementById('resultado').innerHTML = 0;
document.getElementById('alerta-nombre').innerHTML = '';
Expand Down
17 changes: 16 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,22 @@ <h2><span class="texto-superior-h2">CONVIÉRTETE EN UN</span><br>
</div>
</section>
</main>
<aside>
<aside class="publicidad">
<h2>Publicidad</h2>
<div class="videos-publicitarios">
<iframe width="300" src="https://www.youtube.com/embed/ptXiQwE535s?controls=0" title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen></iframe>
<iframe width="300" src="https://www.youtube.com/embed/W-z0iTXEarw?controls=0" title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen></iframe>
<iframe width="300" src="https://www.youtube.com/embed/KAY1j-MPpyA" title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen></iframe>
</div>
</aside>
<footer class="container-fluid seccion5">
<div class="row">
Expand Down

0 comments on commit 2cac843

Please sign in to comment.