GitIgnore

This commit is contained in:
EmersonJSC 2024-07-04 17:05:12 -03:00
parent 874e50635d
commit 73f68a1123
4 changed files with 41 additions and 5 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ _site
.jekyll-cache
.jekyll-metadata
vendor
.bundle

0
README.md Normal file
View File

View File

@ -21,7 +21,7 @@
title: ALICE CAST
description: >- # this means to ignore newlines until "baseurl:"
Bem vindo ao sensacional site de cursos do Alice.
baseurl: /alice_cast # the subpath of your site, e.g. /blog
baseurl: /aliceclass # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
# Build settings

View File

@ -7,11 +7,11 @@ lang: pt
<div class="auth-conteiner is-flex is-align-items-center is-justify-content-center">
<div class="box">
<h1 class="has-text-centered is-size-4 has-text-weight-semibold mb-6">Entrar no AliceCast</h1>
<form>
<form id="login-form">
<label>Login:</label>
<input class="input my-3">
<input class="input my-3" id="email">
<label>Senha:</label>
<input class="input my-3">
<input class="input my-3" id="password">
<button class="button is-fullwidth mt-4">Logar</button>
</form>
<p class="mt-4">Esqueceu sua senha? <a>Lembre-se aqui</a></p>
@ -32,4 +32,39 @@ lang: pt
.box{
width: 20vw;
}
</style>
</style>
<script>
const form = document.getElementById('login-form');
const email = document.getElementById('email').value;
const password = document.getElementById('password').value;
form.addEventListener('submit', (event) => {
event.preventDefault(); // Evita o envio padrão do formulário
const data = {
username: email,
password: password
};
fetch('https://172.18.0.83:33003/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(response => {
if (response.success) {
// Usuário autenticado! Redirecionar para página protegida, etc.
console.log('Usuário autenticado!');
//window.location.href = '/pagina-protegida';
} else {
alert('Credenciais inválidas!');
}
})
.catch(error => {
console.error('Erro na requisição:', error);
alert('Falha ao conectar com o servidor!');
});
});
</script>