mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-19 13:23:41 -05:00
customizable nav style + small changes
This commit is contained in:
parent
f9a4f9ba64
commit
207c4dd842
1 changed files with 71 additions and 53 deletions
|
@ -13,7 +13,8 @@
|
|||
<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="mask-icon" href="{{ url_for('static', filename='icons/favicon/safari-pinned-tab.svg') }}" color="#5bbad5">
|
||||
<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 -->
|
||||
|
@ -36,84 +37,101 @@
|
|||
<meta property="twitter:image" content="{{ metadata.image }}" />
|
||||
|
||||
<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>
|
||||
[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">
|
||||
<a class="visually-hidden-focusable" href="#main-content">Skip to content</a>
|
||||
<a class="visually-hidden-focusable btn" href="#main-content">Skip to content</a>
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex {% if logged_in %}justify-content-between {% endif %}align-items-center mt-3 {% if logged_in %}mb-3{% endif %}">
|
||||
<ul class="nav nav-underline position-relative">
|
||||
<li class="nav-item d-flex align-items-center"><a href="{{ url_for('index') }}" aria-label="{{ cfg.instance.title }}'s icon"><img src="{{ url_for('static', filename='icons/catask.svg') }}" width="32" height="32" alt="{{ cfg.instance.title }}'s icon"></a></li>
|
||||
<li class="nav-item"><a class="nav-link {{ homeLink }}" id="home-link" href="{{ url_for('index') }}">Home</a>
|
||||
<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') }}" 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') }}">Home</a></li>
|
||||
{% if logged_in %}
|
||||
<li class="nav-item"><a class="nav-link {{ inboxLink }}" id="inbox-link" href="{{ url_for('inbox') }}">Inbox</a>
|
||||
<li class="nav-item d-flex align-items-center position-relative">
|
||||
<a class="nav-link {{ inboxLink }}" id="inbox-link" href="{{ url_for('inbox') }}">
|
||||
Inbox {# <span class="position-absolute start-100 translate-middle badge text-bg-primary rounded-pill">{{ questionCount }} <span class="visually-hidden">unanswered questions</span></span> #}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item"><a class="nav-link {{ adminLink }}" id="admin-link" href="{{ url_for('admin.index') }}">Admin</a></li>
|
||||
<li class="nav-item d-flex align-items-center"><a class="nav-link {{ adminLink }}" id="admin-link" href="{{ url_for('admin.index') }}">Admin</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if logged_in %}
|
||||
<ul class="nav nav-underline m-0">
|
||||
<ul class="nav nav-{{ cfg.style.navStyle }} m-0">
|
||||
<li><a class="nav-link" href="{{ url_for('admin.logout') }}">Logout</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% with messages = get_flashed_messages(with_categories=True) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<div class="alert alert-{{ category }} alert-dismissible" role="alert">
|
||||
<div>{{ message }}</div>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<div class="alert alert-{{ category }} alert-dismissible" role="alert">
|
||||
<div>{{ message }}</div>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
<div id="main-content">
|
||||
{% block content %}{% endblock %}
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<script src="{{ url_for('static', filename='js/htmx.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
|
||||
<!-- <script src="https://cdn.jsdelivr.net/npm/eruda" onload="eruda.init()"></script> -->
|
||||
{% block scripts %}{% endblock %}
|
||||
<footer class="py-3 my-4 text-center d-flex justify-content-between align-items-center">
|
||||
<div class="row">
|
||||
<div class="dropdown bd-mode-toggle">
|
||||
<button class="btn py-2 dropdown-toggle fs-5"
|
||||
<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>
|
||||
<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>
|
||||
<div class="d-inline-block">
|
||||
<a href="https://git.gay/mst/catask" target="_blank" class="text-body-secondary text-decoration-none">{{ const.appName }} {{ version }}{{ version_id }}</a>
|
||||
</div>
|
||||
</footer>
|
||||
<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>
|
||||
|
|
Loading…
Add table
Reference in a new issue