76 lines
4.8 KiB
HTML
76 lines
4.8 KiB
HTML
{% extends 'footer.html' %}
|
|
|
|
{% load flatpages %}
|
|
{% load static %}
|
|
|
|
{% block base %}
|
|
<!-- NAVBAR -->
|
|
<nav class="navbar" x-data="{ showNavBar: false }">
|
|
<div>
|
|
<a href="{% url 'home' %}">
|
|
<img src="{% static 'img/FET-Logo-2014_64_light.svg' %}" alt="FET-Logo" class="navbar-logo p-2 dark:hidden">
|
|
<img src="{% static 'img/FET-Logo-2014_64_dark.svg' %}" alt="FET-Logo" class="navbar-logo p-2 hidden dark:block">
|
|
</a>
|
|
<button class="navbar-toggle"
|
|
@click="showNavBar = ! showNavBar"
|
|
>
|
|
<i class="fa-solid fa-bars"></i>
|
|
</button>
|
|
<ul id="navBarContent" class="navbar-content sm:block" x-show="showNavBar || $screen('sm')" x-collapse.min.0px>
|
|
<li class="{% if 'posts' in request.path %}active{% endif %}"><a href="{% url 'posts:index' %}">News</a></li>
|
|
<li class="{% if 'members' in request.path %}active{% endif %}"><a href="{% url 'members:members' 'active' %}">Fachschaft</a></li>
|
|
<li class="{% if 'gallery' in request.path %}active{% endif %}"><a href="{% url 'gallery:index' %}">Galerie</a></li>
|
|
<li class="{% if 'blackboard' in request.path %}active{% endif %}"><a href="{% url 'blackboard:index' %}">Blackboard</a></li>
|
|
|
|
{% get_flatpages '/kontakt/' as pages %}
|
|
{% if pages %}
|
|
<li class="{% if '/kontakt/' in request.path %}active{% endif %}"><a href="{{ pages.first.url }}">{{ pages.first.title }}</a></li>
|
|
{% endif %}
|
|
|
|
{% if not request.user.is_authenticated %}
|
|
<li><a href="{% url 'authentications:login' %}?next={{ request.path }}">Anmelden</a></li>
|
|
{% else %}
|
|
<hr class="border-proprietary">
|
|
<div href="#" class="inline-block w-full sm:w-auto rounded relative"
|
|
x-data="{ showPopupNav: false }"
|
|
@click.outside="showPopupNav = false"
|
|
>
|
|
<div class="sm:inline-flex items-center divide-x divide-blue-200 dark:divide-proprietary-light bg-proprietary-dark text-blue-50 rounded">
|
|
<a class="hidden sm:block flex-1 px-2 py-1 hover:bg-proprietary-dark dark:hover:bg-proprietary-darker active:bg-proprietary-dark dark:active:bg-proprietary-darker rounded-l" href="#"
|
|
@click="showPopupNav = !showPopupNav"
|
|
>
|
|
{% if request.user.first_name %}
|
|
Hallo {{ request.user.first_name }}
|
|
{% else %}
|
|
Hallo {{ request.user.username }}
|
|
{% endif %}
|
|
</a>
|
|
<a class="hidden sm:block flex-0 px-2 py-1 hover:bg-proprietary-dark dark:hover:bg-proprietary-darker active:bg-proprietary-dark dark:active:bg-proprietary-darker rounded-r" href="{% url 'authentications:logout' %}?next={{ request.path }}"><i class="fa-solid fa-power-off"></i></a>
|
|
</div>
|
|
<div class="sm:block sm:absolute z-20 top-9 right-0 bg-white dark:bg-transparent dark:sm:bg-gray-700 sm:shadow-md sm:rounded w-full dark:sm:text-proprietary-lightest"
|
|
x-show="showPopupNav || !$screen('sm')"
|
|
x-transition:enter="transition ease-out duration-300"
|
|
x-transition:enter-start="transform origin-top opacity-0 scale-95"
|
|
x-transition:enter-end="transform origin-top opacity-100 scale-100"
|
|
x-transition:leave="transition ease-in duration-150"
|
|
x-transition:leave-start="transform origin-top opacity-100 scale-100"
|
|
x-transition:leave-end="transform origin-top opacity-0 scale-95"
|
|
>
|
|
<li class="navInternal"><a href="{% url 'admin:index' %}"><i class="fa-fw fa-solid fa-user-secret mr-2"></i>Admin</a></li>
|
|
<li class="navInternal"><a href="{% url 'tasks:index' %}"><i class="fa-fw fa-solid fa-list-check mr-2"></i>Tasks</a></li>
|
|
<li class="navInternal"><a href="{% url 'intern:index' %}"><i class="fa-fw fa-solid fa-database mr-2"></i>Intern</a></li>
|
|
<li class="navInternal"><a href="https://legacy.fet.at/home/intern"><i class="fa-fw fa-solid fa-box-archive mr-2"></i>Legacy</a></li>
|
|
<li class="navInternal"
|
|
x-show="!$screen('sm')"
|
|
><a href="{% url 'authentications:logout' %}?next={{ request.path }}"><i class="fa-fw fa-solid fa-power-off mr-2"></i>Abmelden</a></li>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
|
|
{% block content %}
|
|
{% endblock %}
|
|
{% endblock %}
|