mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-19 13:23:41 -05:00
238 lines
11 KiB
HTML
238 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
{% if cfg.accessibility.userway.enabled %}
|
|
<script src="https://cdn.userway.org/widget.js" data-account="{{ cfg.accessibility.userway.account }}"></script>
|
|
{% endif %}
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap-icons.min.css') }}">
|
|
{%- if cfg.accessibility.font == 'default' -%}
|
|
<link rel="preload" href="{{ url_for('static', filename='fonts/rubik.woff2') }}" as="font" type="font/woff2" crossorigin>
|
|
{%- endif -%}
|
|
|
|
<!-- favicon -->
|
|
<link rel="apple-touch-icon" sizes="180x180" href="{{ url_for('static', filename='icons/favicon/apple-touch-icon.png') }}">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='icons/favicon/favicon-32x32.png') }}">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', filename='icons/favicon/favicon-16x16.png') }}">
|
|
<link rel="icon" type="image/png" sizes="192x192" href="{{ url_for('static', filename='icons/favicon/android-chrome-192x192.png') }}">
|
|
<link rel="icon" type="image/png" sizes="512x512" href="{{ url_for('static', filename='icons/favicon/android-chrome-512x512.png') }}">
|
|
<link rel="shortcut icon" href="{{ url_for('static', filename='icons/favicon/favicon.ico') }}">
|
|
|
|
<!-- metadata -->
|
|
<!-- Primary Meta Tags -->
|
|
<meta name="title" content="{{ metadata.title }}" />
|
|
<meta name="description" content="{{ metadata.description }}" />
|
|
|
|
<!-- Open Graph / Facebook -->
|
|
<meta property="og:type" content="website" />
|
|
<meta property="og:url" content="{{ metadata.url }}" />
|
|
<meta property="og:title" content="{{ metadata.title }}" />
|
|
<meta property="og:description" content="{{ metadata.description }}" />
|
|
<meta property="og:image" content="{{ metadata.image }}" />
|
|
|
|
<!-- Twitter -->
|
|
<meta property="twitter:card" content="summary_large_image" />
|
|
<meta property="twitter:url" content="{{ metadata.url }}" />
|
|
<meta property="twitter:title" content="{{ metadata.title }}" />
|
|
<meta property="twitter:description" content="{{ metadata.description }}" />
|
|
<meta property="twitter:image" content="{{ metadata.image }}" />
|
|
|
|
<!-- pwa manifest -->
|
|
<link rel="manifest" href="{{ url_for('api.pwaManifest') }}" />
|
|
<script src="{{ url_for('static', filename='js/color-modes.js') }}"></script>
|
|
{% if cfg.style.tintColors %}
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/tinted.css') }}">
|
|
{% endif %}
|
|
{% block additionalHeadItems %}{% endblock %}
|
|
<style>
|
|
{% if cfg.accessibility.font == 'default' %}
|
|
@font-face {
|
|
font-family: "Rubik";
|
|
font-display: swap;
|
|
font-weight: 100 900;
|
|
src: url("/static/fonts/rubik.woff2") format('woff2-variations');
|
|
}
|
|
:root {
|
|
--bs-font-sans-serif: "Rubik", sans-serif;
|
|
}
|
|
{% elif cfg.accessibility.font == 'default' %}
|
|
:root {
|
|
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
|
|
}
|
|
{% elif cfg.accessibility.font == 'atkinson' %}
|
|
@font-face {
|
|
font-family: 'Atkinson Hyperlegible';
|
|
src: local('Atkinson Hyperlegible Bold'), local('AtkinsonHyperlegible-Bold'),
|
|
url('/static/fonts/Atkinson-Hyperlegible-Bold.woff2') format('woff2');
|
|
font-weight: bold;
|
|
font-style: normal;
|
|
font-display: swap;
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Atkinson Hyperlegible';
|
|
src: local('Atkinson Hyperlegible Bold Italic'), local('AtkinsonHyperlegible-BoldItalic'),
|
|
url('/static/fonts/Atkinson-Hyperlegible-BoldItalic.woff2') format('woff2');
|
|
font-weight: bold;
|
|
font-style: italic;
|
|
font-display: swap;
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Atkinson Hyperlegible';
|
|
src: local('Atkinson Hyperlegible Italic'), local('AtkinsonHyperlegible-Italic'),
|
|
url('/static/fonts/Atkinson-Hyperlegible-Italic.woff2') format('woff2');
|
|
font-weight: normal;
|
|
font-style: italic;
|
|
font-display: swap;
|
|
}
|
|
|
|
@font-face {
|
|
font-family: 'Atkinson Hyperlegible';
|
|
src: local('Atkinson Hyperlegible Regular'), local('AtkinsonHyperlegible-Regular'),
|
|
url('/static/fonts/Atkinson-Hyperlegible-Regular.woff2') format('woff2');
|
|
font-weight: normal;
|
|
font-style: normal;
|
|
font-display: swap;
|
|
}
|
|
:root {
|
|
--bs-font-sans-serif: "Atkinson Hyperlegible", sans-serif;
|
|
--bs-body-font-size: 1.05rem;
|
|
}
|
|
.dropdown-toggle::after {
|
|
vertical-align: -.125em;
|
|
}
|
|
.btn:not(.btn-sm) {
|
|
--bs-btn-font-size: 1.02rem;
|
|
}
|
|
.btn-group-sm > .btn, .btn-sm {
|
|
--bs-btn-font-size: 0.91rem;
|
|
}
|
|
.nav {
|
|
--bs-nav-link-font-size: 1rem;
|
|
}
|
|
.bi::before, [class*=" bi-"]::before, [class^="bi-"]::before {
|
|
vertical-align: -.2em;
|
|
}
|
|
{% endif %}
|
|
[data-bs-theme=light] {
|
|
--bs-primary: {{ cfg.style.accentLight }} !important;
|
|
}
|
|
[data-bs-theme=dark] {
|
|
--bs-primary: {{ cfg.style.accentDark }} !important;
|
|
}
|
|
</style>
|
|
<script src="{{ url_for('static', filename='js/htmx.min.js') }}"></script>
|
|
<title>{% block title %}{% endblock %} | {{ cfg.instance.title }}</title>
|
|
</head>
|
|
<body class="ms-2 me-2 mb-2 col-xxl-11 mx-xxl-auto">
|
|
<a class="visually-hidden-focusable btn" href="#main-content">Skip to content</a>
|
|
<div class="container-fluid">
|
|
<div class="d-flex justify-content-between align-items-center mt-3 {% if logged_in %}mb-3{% endif %}">
|
|
<ul class="nav nav-{{ cfg.style.navStyle }} position-relative">
|
|
<li class="nav-item d-flex align-items-center {% if cfg.style.navStyle == 'pills' %}me-1{% endif %}"><a href="{{ url_for('index') }}" aria-label="{{ cfg.instance.title }}'s icon"><img src="{{ url_for('static', filename='icons/favicon/apple-touch-icon.png') }}" loading="lazy" width="32" height="32" alt="{{ cfg.instance.title }}'s icon"></a></li>
|
|
<li class="nav-item d-flex align-items-center">
|
|
<a class="nav-link {{ homeLink }}" id="home-link" href="{{ url_for('index') }}"{% if cfg.style.navIconsOnly %} title="Home"{% endif %}>
|
|
{% if cfg.style.navIcons %}<i class="bi bi-house-door fs-mob-5{% if cfg.style.navIconsOnly %} fs-5{% endif %}"></i>{% endif %}
|
|
{% if not cfg.style.navIconsOnly %}<span{% if cfg.style.navIcons %} class="d-none d-lg-inline ms-1"{% endif %}>Home</span>{% endif %}
|
|
</a>
|
|
</li>
|
|
{% if logged_in %}
|
|
<li class="nav-item d-flex align-items-center position-relative">
|
|
<a class="nav-link {{ inboxLink }}{% if cfg.style.navIcons %} ms-1{% endif %}" id="inbox-link" href="{{ url_for('inbox') }}"{% if cfg.style.navIconsOnly %} title="Inbox"{% endif %}>
|
|
{% if questionCount > 0 %}<span class="position-absolute top-0 start-100 badge text-bg-primary rounded-circle" style="transform: translate(-80%,-30%) !important">{{ questionCount }} <span class="visually-hidden">unanswered questions</span></span>{% endif %}
|
|
{% if cfg.style.navIcons %}<i class="bi bi-inbox fs-mob-5{% if cfg.style.navIconsOnly %} fs-5{% endif %}"></i>{% endif %}
|
|
{% if not cfg.style.navIconsOnly %}<span{% if cfg.style.navIcons %} class="d-none d-lg-inline ms-1"{% endif %}>Inbox</span>{% endif %}
|
|
</a>
|
|
</li>
|
|
<li class="nav-item d-flex align-items-center">
|
|
<a class="nav-link {{ adminLink }}{% if cfg.style.navIcons %} ms-1{% endif %}" id="admin-link" href="{{ url_for('admin.information') }}"{% if cfg.style.navIconsOnly %} title="Admin"{% endif %}>
|
|
{% if cfg.style.navIcons %}<i class="bi bi-gear fs-mob-5{% if cfg.style.navIconsOnly %} fs-5{% endif %}"></i>{% endif %}
|
|
{% if not cfg.style.navIconsOnly %}<span{% if cfg.style.navIcons %} class="d-none d-lg-inline ms-1"{% endif %}>Admin</span>{% endif %}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
<ul class="nav nav-{{ cfg.style.navStyle }} m-0">
|
|
{% if logged_in %}
|
|
<form action="{{ url_for('admin.logout') }}" method="POST" class="d-none" id="logout_form"></form>
|
|
<li>
|
|
<button form="logout_form" type="submit" class="nav-link"{% if cfg.style.navIconsOnly %} title="Logout"{% endif %}>
|
|
{% if cfg.style.navIcons %}<i class="bi bi-box-arrow-right fs-mob-5{% if cfg.style.navIconsOnly %} fs-5{% endif %}"></i>{% endif %}
|
|
{% if not cfg.style.navIconsOnly %}<span{% if cfg.style.navIcons %} class="d-none d-lg-inline ms-1"{% endif %}>Logout</span>{% endif %}
|
|
</button>
|
|
</li>
|
|
{% else %}
|
|
<li>
|
|
<a class="nav-link {{ loginLink }}" href="{{ url_for('admin.login') }}"{% if cfg.style.navIconsOnly %} title="Login"{% endif %}>
|
|
{% if cfg.style.navIcons %}<i class="bi bi-box-arrow-in-right fs-mob-5{% if cfg.style.navIconsOnly %} fs-5{% endif %}"></i>{% endif %}
|
|
{% if not cfg.style.navIconsOnly %}<span{% if cfg.style.navIcons %} class="d-none d-lg-inline ms-1"{% endif %}>Login</span>{% endif %}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
{% with messages = get_flashed_messages(with_categories=True) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category }} alert-dismissible col-lg-4 m-auto" role="alert">
|
|
<div>{{ message }}</div>
|
|
<button type="button" class="btn-close d-flex align-items-stretch fs-5 p-3" aria-label="Close"><i class="bi bi-x-lg lh-sm"></i></button>
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
<div id="main-content">
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
<footer class="py-3 my-4 d-flex justify-content-between align-items-center">
|
|
<div class="row">
|
|
<div class="dropdown bd-mode-toggle">
|
|
<button class="btn btn-outline-secondary py-2 dropdown-toggle"
|
|
id="bd-theme"
|
|
type="button"
|
|
aria-expanded="false"
|
|
data-bs-toggle="dropdown"
|
|
data-bs-auto-close="outside"
|
|
aria-label="Toggle theme (auto)">
|
|
<i class="bi bi-circle-half my-1" id="theme-icon-active"></i>
|
|
<span class="visually-hidden" id="bd-theme-text">Toggle theme</span>
|
|
</button>
|
|
<ul class="dropdown-menu" aria-labelledby="bd-theme-text">
|
|
<li>
|
|
<button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="light" aria-pressed="false">
|
|
<i class="bi me-2 opacity-50 bi-sun-fill"></i> Light
|
|
<i class="bi ms-auto d-none bi-check2 theme-check"></i>
|
|
</button>
|
|
</li>
|
|
<li>
|
|
<button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="dark" aria-pressed="false">
|
|
<i class="bi me-2 opacity-50 bi-moon-stars-fill"></i> Dark
|
|
<i class="bi ms-auto d-none bi-check2 theme-check"></i>
|
|
</button>
|
|
</li>
|
|
<li>
|
|
<button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="auto" aria-pressed="false">
|
|
<i class="bi me-2 opacity-50 bi-circle-half"></i> Auto
|
|
<i class="bi ms-auto d-none bi-check2 theme-check"></i>
|
|
</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="text-body-secondary text-end small">
|
|
<p class="text-decoration-none m-0 d-flex align-items-center gap-1">
|
|
<img src="{{ url_for('static', filename='icons/catask.svg') }}" width="20" height="20" alt="{{ const.appName }} logo">
|
|
{{ const.appName }} <span class="fw-medium">{{ version }}{{ version_id }}</span>
|
|
</p>
|
|
<a href="https://git.gay/mst/catask" class="icon-link text-decoration-none" target="_blank"><i class="bi bi-git"></i> Source code</a>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
|
|
{% block scripts %}{% endblock %}
|
|
</body>
|
|
</html>
|