catask/templates/snippets/navLinks.html

33 lines
2.6 KiB
HTML

{% if mobileNav %}
<style>
@media screen and (max-width: 575px) {
.mobile-nav .nav-link {
width: 22vw;
}
.mobile-nav .nav-link i {
font-size: 1.5em !important;
}
}
</style>
{% endif %}
<li class="nav-item d-flex align-items-center">
<a class="nav-link {{ homeLink }}{% if mobileNav %} py-2 d-flex flex-column justify-content-center align-items-center{% endif %}" 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 and not mobileNav %}<span{% if cfg.style.navIcons %} class="{% if not mobileNav %}d-none ms-1 {% endif %}d-lg-inline"{% 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 and not mobileNav %} ms-1{% endif %} {% if mobileNav %} py-2 d-flex flex-column justify-content-center align-items-center{% endif %}" id="inbox-link" href="{{ url_for('inbox') }}"{% if cfg.style.navIconsOnly %} title="{{ _('Inbox') }}"{% endif %}>
{% if unreadQuestionCount > 0 %}<span class="position-absolute top-0 start-100 badge text-bg-primary rounded-circle" style="transform: translate(-80%,-30%) !important">{{ unreadQuestionCount }} <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 and not mobileNav %}<span{% if cfg.style.navIcons %} class="{% if not mobileNav %}d-none ms-1 {% endif %}d-lg-inline"{% endif %}>{{ _('Inbox') }}</span>{% endif %}
</a>
</li>
<li class="nav-item d-flex align-items-center">
<a class="nav-link {{ adminLink }}{% if cfg.style.navIcons and not mobileNav %} ms-1{% endif %}{% if mobileNav %} py-2 d-flex flex-column justify-content-center align-items-center{% 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 and not mobileNav %}<span{% if cfg.style.navIcons %} class="{% if not mobileNav %}d-none ms-1 {% endif %}d-lg-inline"{% endif %}>{{ _('Admin') }}</span>{% endif %}
</a>
</li>
{% endif %}