Skip to content

Commit

Permalink
change style b00tc4mp#182
Browse files Browse the repository at this point in the history
  • Loading branch information
JCEXCELSIOR committed Oct 6, 2024
1 parent f958d5f commit 07b9537
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions staff/josue-cano/unsocial/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,30 @@
text-align: center;
}
section {

width: 300px;
padding: 20px;
background-color: #585656;
border: 2px solid #ccc; /* Borde del div */
border-radius: 10px; /* Bordes redondeados */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Sombra del div */
margin: 20px auto;
text-align: center;

}
form {
display: flex;
align-items: center;
flex-direction: column;
}
a {
color: inherit; /* Mantiene el color del texto padre */
text-decoration: none;
}

a:hover {
color: #f31212;
}
</style>
<title>Unsocial</title>
</head>
Expand Down Expand Up @@ -103,11 +120,11 @@ <h3>Hello, User!</h3>
// seccion login
var sections = document.querySelectorAll("section");
var loginSection = sections[0];
loginSection.style.display = "none";
loginSection.style.display = "";

//seccion registro
var registerSection = sections[1];
registerSection.style.display = " ";
registerSection.style.display = "none";

//seccion home
var homeSection = sections[2];
Expand All @@ -118,23 +135,23 @@ <h3>Hello, User!</h3>

//selecciona la primera etiqueta a para inicializar el evento
var registerAnchor = anchors[0];
// registerAnchor.onclick = function (event) {

registerAnchor.addEventListener("click", function (event) {
//hace que al clicar el evento no se actualice la pagina
pevent.preventDefault();
event.preventDefault();
//esconde la seccion login
loginSection.style.display = "none";
//y aqui se meustra registro
registerSection.style.display = "";
});
var loginAnchor = anchors[1];
// loginAnchor.onclick = function (event) {

loginAnchor.addEventListener("click", function (event) {
event.preventDefault();

registerSection.style.display = "none";
loginSection.style.display = "";
// }

});

// aqui forms recoge todos los formularios
Expand Down Expand Up @@ -187,6 +204,8 @@ <h3>Hello, User!</h3>
var username = usernameInput.value;
var passwordInput = inputs[1];
var password = passwordInput.value;

//creamos variable para
var user = users.find(
(user) => user.username === username && user.password === password
);
Expand All @@ -199,6 +218,7 @@ <h3>Hello, User!</h3>
h3.innerText ="Hello, "+ user.username;
} else {
alert("Username or Password incorrect");

}
});

Expand Down

0 comments on commit 07b9537

Please sign in to comment.