v_9.3
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}MartinhalApprovalFlow{% endblock %}</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
<script>
|
||||
// set the theme before first paint to avoid flashing
|
||||
document.documentElement.dataset.theme =
|
||||
localStorage.getItem('theme') ||
|
||||
(matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
|
||||
function toggleTheme() {
|
||||
const next = document.documentElement.dataset.theme === 'dark' ? 'light' : 'dark';
|
||||
document.documentElement.dataset.theme = next;
|
||||
localStorage.setItem('theme', next);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
{% if session.get('user_id') %}
|
||||
<header class="topbar">
|
||||
<a class="brand" href="{{ url_for('index') }}">Martinhal<span>ApprovalFlow</span></a>
|
||||
<nav>
|
||||
<a href="{{ url_for('index') }}" {% if request.endpoint=='index' %}class="on"{% endif %}>New request</a>
|
||||
{% if session.get('is_admin') %}
|
||||
<a href="{{ url_for('admin') }}" {% if request.endpoint in ('admin','admin_request','workflow_edit') %}class="on"{% endif %}>Workflows & requests</a>
|
||||
<a href="{{ url_for('mail_status') }}" {% if request.endpoint=='mail_status' %}class="on"{% endif %}>Mail status</a>
|
||||
<a href="{{ url_for('users') }}" {% if request.endpoint=='users' %}class="on"{% endif %}>Users</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
<div class="who">
|
||||
<button class="theme-toggle" type="button" onclick="toggleTheme()" title="Light / dark mode" aria-label="Toggle light or dark mode">◐</button>
|
||||
<a href="{{ url_for('account') }}" {% if request.endpoint=='account' %}class="on"{% endif %}>Configure profile</a>
|
||||
<span class="mono">{{ session['username'] }}</span>
|
||||
<a href="{{ url_for('logout') }}">Sign out</a>
|
||||
</div>
|
||||
</header>
|
||||
{% else %}
|
||||
<button class="theme-toggle floating" type="button" onclick="toggleTheme()" title="Light / dark mode" aria-label="Toggle light or dark mode">◐</button>
|
||||
{% endif %}
|
||||
<main class="wrap">
|
||||
{% with msgs = get_flashed_messages(with_categories=true) %}
|
||||
{% for cat, m in msgs %}<div class="flash {{ cat }}">{{ m }}</div>{% endfor %}
|
||||
{% endwith %}
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
<footer class="footer">© 2026 Martinhal IT - Joao Vaz - Version 9.3</footer>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user