Sidebar antes esticava junto com o conteudo (align-items:stretch do flex), entao em telas com tabela longa (Clientes) o rodape (tema/sair/ recolher) ficava fora da area visivel sem rolar a pagina toda. Agora fica position:sticky, presa ao topo da viewport, com rolagem propria se a lista de links for maior que a tela. Login ganha um botao de olho pra mostrar/ocultar a senha digitada. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
67 lines
3.0 KiB
HTML
67 lines
3.0 KiB
HTML
<!-- app/templates/login.html -->
|
|
<!DOCTYPE html>
|
|
<html lang="pt-BR" data-tema="escuro">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Entrar — Painel de Clientes</title>
|
|
<link rel="stylesheet" href="/static/estilo.css">
|
|
<style>
|
|
body {
|
|
display: flex; align-items: center; justify-content: center;
|
|
min-height: 100vh; padding: 16px;
|
|
background: radial-gradient(circle at top, var(--cor-superficie-alt), var(--cor-fundo));
|
|
}
|
|
.login-cartao { width: 100%; max-width: 360px; text-align: center; }
|
|
.login-logo { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 12px; }
|
|
.login-cartao h1 { font-size: 1.3rem; margin-bottom: 4px; }
|
|
.login-subtitulo { color: var(--cor-texto-secundario); font-size: 0.9rem; margin: 0 0 20px; }
|
|
.login-cartao form { text-align: left; }
|
|
.login-cartao button { width: 100%; }
|
|
.campo-senha { position: relative; }
|
|
.campo-senha input { padding-right: 40px; }
|
|
.botao-ver-senha {
|
|
position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
|
|
margin: 0; padding: 6px; width: auto; background: transparent; border: none;
|
|
color: var(--cor-texto-secundario); cursor: pointer; display: flex; align-items: center;
|
|
}
|
|
.botao-ver-senha:hover { color: var(--cor-texto); }
|
|
.botao-ver-senha svg { width: 18px; height: 18px; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="cartao login-cartao">
|
|
<img src="/static/logo-gti-256x256.png" alt="GTI Grupo" class="login-logo">
|
|
<h1>Painel de Clientes</h1>
|
|
<p class="login-subtitulo">Entre com suas credenciais para acessar o sistema</p>
|
|
{% if erro %}<div class="mensagem danger">{{ erro }}</div>{% endif %}
|
|
<form method="post" action="/login">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<input type="hidden" name="next" value="{{ next }}">
|
|
<label for="usuario">Usuário</label>
|
|
<input type="text" id="usuario" name="usuario" required autofocus>
|
|
<label for="senha">Senha</label>
|
|
<div class="campo-senha">
|
|
<input type="password" id="senha" name="senha" required>
|
|
<button type="button" class="botao-ver-senha" id="botao-ver-senha" aria-label="Mostrar senha">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8Z"/><circle cx="12" cy="12" r="3"/></svg>
|
|
</button>
|
|
</div>
|
|
<button type="submit">Entrar</button>
|
|
</form>
|
|
</div>
|
|
<script>
|
|
(function () {
|
|
var botao = document.getElementById('botao-ver-senha');
|
|
var campo = document.getElementById('senha');
|
|
if (!botao || !campo) return;
|
|
botao.addEventListener('click', function () {
|
|
var mostrando = campo.type === 'text';
|
|
campo.type = mostrando ? 'password' : 'text';
|
|
botao.setAttribute('aria-label', mostrando ? 'Mostrar senha' : 'Ocultar senha');
|
|
});
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|