fix: sidebar fixa na tela (nao sobe com tabelas longas) + mostrar/ocultar senha no login
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>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
7febe7c652
commit
1728a2dbdd
@@ -18,6 +18,15 @@
|
||||
.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>
|
||||
@@ -32,9 +41,26 @@
|
||||
<label for="usuario">Usuário</label>
|
||||
<input type="text" id="usuario" name="usuario" required autofocus>
|
||||
<label for="senha">Senha</label>
|
||||
<input type="password" id="senha" name="senha" required>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user