Skip to content

Commit

Permalink
Logo na página de login e célula vazia na tabela
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-dos-santos-gomes committed Jan 22, 2024
1 parent 4f756d5 commit 2c068b5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
</head>
<body>
<main>
<div class="center">
<img class="center" src="./src/assets/logo-hashtag.webp" alt="Logo Hashtag" />
</div>
<h1>Sistema Python Power Up</h1>
<h2>Faça seu Login para acessar</h2>
<form>
Expand Down
6 changes: 5 additions & 1 deletion src/js/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ form.onsubmit = e => {
alert("A senha está incorreta!");
password.value = "";
} else {
window.location.href = window.origin + "/sistema-python-power-up/product-registration.html"
if(window.origin == "http://127.0.0.1:5500") {
window.location.href = window.origin + "/product-registration.html"
} else {
window.location.href = window.origin + "/sistema-python-power-up/product-registration.html"
}
}
}
7 changes: 6 additions & 1 deletion src/js/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ form.onsubmit = e => {
tr = document.createElement("tr");
for(let i = 0; i < inputs.length; i++) {
td = document.createElement("td");
td.textContent = inputs[i].value;
if(inputs[i].value.length > 0) {
td.textContent = inputs[i].value;
} else {
td.textContent = "--";
td.classList.add("center");
}
tr.appendChild(td);
inputs[i].value = "";
}
Expand Down
5 changes: 5 additions & 0 deletions src/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ body {
display: none;
}

.center {
text-align: center;
margin: auto;
}

main {
padding: 40px 20px;
}
Expand Down

0 comments on commit 2c068b5

Please sign in to comment.