48 lines
3.1 KiB
HTML
48 lines
3.1 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en" data-theme="{{ 'dark' if current_user.is_authenticated and current_user.profile and current_user.profile.dark_mode else 'light' }}">
|
||
<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 %}BP Tracker{% endblock %}</title>
|
||
<link rel="icon" type="image/svg+xml" href="{{ asset_url('images/favicon.svg') }}">
|
||
<link rel="stylesheet" href="{{ asset_url('css/tailwind.css') }}">
|
||
<script defer src="{{ asset_url('js/diy-turbo.min.js') }}"></script>
|
||
</head>
|
||
<body>
|
||
<a class="skip-link" href="#main">Skip to content</a>
|
||
<header class="site-header">
|
||
<div class="shell header-inner">
|
||
<a class="brand" href="{{ url_for('main.landing') }}" aria-label="BP Tracker home"><span class="brand-mark" aria-hidden="true"><svg viewBox="0 0 32 32" fill="none"><path d="M4 17h6l3-8 6 16 3-8h6" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg></span>BP <span class="brand-light">Tracker</span></a>
|
||
{% if current_user.is_authenticated %}
|
||
<nav class="main-nav" aria-label="Main navigation">
|
||
{% for key, label in [('overview', 'Overview'), ('history', 'History'), ('trends', 'Trends')] %}
|
||
<a href="{{ url_for('main.dashboard', view=key, **(selected.params if selected is defined and not calendar else {})) }}" {% if view is defined and view == key %}aria-current="page"{% endif %}>{{ label }}</a>
|
||
{% endfor %}
|
||
</nav>
|
||
<details class="account-menu">
|
||
<summary aria-label="Account menu"><span class="avatar">{{ current_user.username[0]|upper }}</span><span class="account-label">Account</span><span aria-hidden="true">⌄</span></summary>
|
||
<nav aria-label="Account"><a href="{{ url_for('data.manage_data') }}">Import & export</a><a href="{{ url_for('user.profile') }}">Settings</a><a href="{{ url_for('auth.logout') }}">Log out</a></nav>
|
||
</details>
|
||
{% else %}
|
||
<nav class="actions" aria-label="Account"><a href="{{ url_for('auth.login') }}">Log in</a><a class="button primary" href="{{ url_for('auth.signup') }}">Get started</a></nav>
|
||
{% endif %}
|
||
</div>
|
||
</header>
|
||
<main id="main" class="shell main-content" tabindex="-1">
|
||
{% with messages = get_flashed_messages(with_categories=True) %}
|
||
{% if messages %}<div class="notifications" aria-label="Notifications">
|
||
{% for category, message in messages %}
|
||
<div class="notice {{ 'notice-error' if category == 'danger' else '' }}" role="{{ 'alert' if category == 'danger' else 'status' }}">
|
||
<span><strong>{{ 'Please check' if category == 'danger' else 'Done' }}</strong> · {{ message }}</span>
|
||
<button type="button" class="notice-close" aria-label="Dismiss notification" data-dismiss>×</button>
|
||
</div>
|
||
{% endfor %}
|
||
</div>{% endif %}
|
||
{% endwith %}
|
||
{% block content %}{% endblock %}
|
||
</main>
|
||
<footer class="shell site-footer"><span>BP Tracker</span><span>A little clarity, every day.</span></footer>
|
||
</body>
|
||
</html>
|