ui improvements + icons
This commit is contained in:
parent
7a8fa642dc
commit
341f3ab7d2
1 changed files with 33 additions and 12 deletions
|
@ -128,38 +128,59 @@
|
|||
<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">
|
||||
<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') }}">Home</a></li>
|
||||
{% if logged_in %}
|
||||
<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> #}
|
||||
<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>
|
||||
<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>
|
||||
<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">Logout</button></li>
|
||||
<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" href="{{ url_for('admin.login') }}">Login</a></li>
|
||||
<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" role="alert">
|
||||
<div class="alert alert-{{ category }} alert-dismissible col-lg-4 m-auto" role="alert">
|
||||
<div>{{ message }}</div>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
<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 %}
|
||||
|
|
Loading…
Add table
Reference in a new issue