flask_template_codex/app/templates/base.html
2026-08-08 03:26:12 +02:00

48 lines
2.2 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark">
<title>{% block title %}Steady{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<script src="{{ url_for('static', filename='js/main.js') }}" defer></script>
</head>
<body>
<a class="skip-link" href="#main-content">Skip to content</a>
<header class="site-header">
<nav class="container nav" aria-label="Main navigation">
<a class="brand" href="{{ url_for('core.index') }}">Steady</a>
<div class="nav__actions">
{% if current_user.is_authenticated %}
<a href="{{ url_for('tasks.focus') }}">Focus</a>
<a href="{{ url_for('tasks.today') }}">Today</a>
<a href="{{ url_for('tasks.index') }}">Tasks</a>
<a href="{{ url_for('tasks.transfer') }}">Data</a>
<span>Hi, {{ current_user.username }}</span>
<form action="{{ url_for('auth.logout') }}" method="post">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button class="button button--quiet" type="submit">Sign out</button>
</form>
{% else %}
<a href="{{ url_for('auth.login') }}">Sign in</a>
<a class="button" href="{{ url_for('auth.register') }}">Create account</a>
{% endif %}
</div>
</nav>
</header>
<main id="main-content" class="container main-content">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="messages" aria-live="polite">
{% for category, message in messages %}
<p class="message message--{{ category }}">{{ message }}</p>
{% endfor %}
</div>
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
</main>
</body>
</html>