63 lines
2.3 KiB
HTML
63 lines
2.3 KiB
HTML
<!doctype html>
|
|
<html lang="pt-BR" data-theme="">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{% block title %}{{ app_name }}{% endblock %} · {{ app_name }}</title>
|
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><text y='14' font-size='14'>🧾</text></svg>">
|
|
<link rel="stylesheet" href="/static/styles.css">
|
|
<script>
|
|
// Aplica o tema salvo antes da pintura para evitar flash.
|
|
(function () {
|
|
try {
|
|
var t = localStorage.getItem('theme');
|
|
if (t) document.documentElement.setAttribute('data-theme', t);
|
|
} catch (e) {}
|
|
})();
|
|
</script>
|
|
</head>
|
|
<body>
|
|
{% if not hide_nav %}
|
|
<header class="topbar">
|
|
<a class="brand" href="/">
|
|
<span class="brand-mark">🧾</span>
|
|
<span>{{ app_name }}</span>
|
|
</a>
|
|
<nav class="nav">
|
|
<a href="/" class="{{ 'active' if request.url.path == '/' else '' }}">Dashboard</a>
|
|
<a href="/documents" class="{{ 'active' if request.url.path.startswith('/documents') and 'new' not in request.url.path else '' }}">Documentos</a>
|
|
<a href="/categorias" class="{{ 'active' if request.url.path.startswith('/categorias') else '' }}">Categorias</a>
|
|
<a href="/documents/new" class="btn btn-primary btn-sm">+ Novo</a>
|
|
</nav>
|
|
<div class="topbar-right">
|
|
<button type="button" class="theme-toggle" id="themeToggle" title="Alternar tema" aria-label="Alternar tema">
|
|
<span class="theme-icon">◐</span>
|
|
</button>
|
|
{% if current_user %}
|
|
<span class="user">{{ current_user }}</span>
|
|
<form method="post" action="/logout" class="inline">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<button type="submit" class="btn btn-ghost btn-sm">Sair</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</header>
|
|
{% endif %}
|
|
|
|
<main class="{{ 'main-centered' if hide_nav else 'main' }}">
|
|
{% if flashes %}
|
|
<div class="flash-stack">
|
|
{% for f in flashes %}
|
|
<div class="flash flash-{{ f.level }}">{{ f.message }}</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
|
|
<script src="/static/app.js"></script>
|
|
{% block scripts %}{% endblock %}
|
|
</body>
|
|
</html>
|