move body, footer and scripts files to base
This commit is contained in:
@@ -1,75 +1,135 @@
|
|||||||
{% extends 'footer.html' %}
|
{% extends 'head.html' %}
|
||||||
|
|
||||||
{% load flatpages %}
|
{% load flatpages %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
{% block base %}
|
{% block body %}
|
||||||
<!-- NAVBAR -->
|
<body x-data="{ showModal: false }" :class="{ 'overflow-y-hidden sm:overflow-y-auto': showModal }">
|
||||||
<nav class="navbar" x-data="{ showNavBar: false }">
|
<!-- NAVBAR -->
|
||||||
<div>
|
<nav class="navbar" x-data="{ showNavBar: false }">
|
||||||
<a href="{% url 'home' %}">
|
<div>
|
||||||
<img src="{% static 'img/FET-Logo-2014_64_light.svg' %}" alt="FET-Logo" class="navbar-logo p-2 dark:hidden">
|
<a href="{% url 'home' %}">
|
||||||
<img src="{% static 'img/FET-Logo-2014_64_dark.svg' %}" alt="FET-Logo" class="navbar-logo p-2 hidden dark:block">
|
<img src="{% static 'img/FET-Logo-2014_64_light.svg' %}" alt="FET-Logo" class="navbar-logo p-2 dark:hidden">
|
||||||
</a>
|
<img src="{% static 'img/FET-Logo-2014_64_dark.svg' %}" alt="FET-Logo" class="navbar-logo p-2 hidden dark:block">
|
||||||
<button class="navbar-toggle"
|
</a>
|
||||||
@click="showNavBar = ! showNavBar"
|
<button class="navbar-toggle"
|
||||||
>
|
@click="showNavBar = ! showNavBar"
|
||||||
<i class="fa-solid fa-bars"></i>
|
>
|
||||||
</button>
|
<i class="fa-solid fa-bars"></i>
|
||||||
<ul id="navBarContent" class="navbar-content sm:block" x-show="showNavBar || $screen('sm')" x-collapse.min.0px>
|
</button>
|
||||||
<li class="{% if 'posts' in request.path %}active{% endif %}"><a href="{% url 'posts:index' %}">News</a></li>
|
<ul id="navBarContent" class="navbar-content sm:block" x-show="showNavBar || $screen('sm')" x-collapse.min.0px>
|
||||||
<li class="{% if 'members' in request.path %}active{% endif %}"><a href="{% url 'members:members' 'active' %}">Fachschaft</a></li>
|
<li class="{% if 'posts' in request.path %}active{% endif %}"><a href="{% url 'posts:index' %}">News</a></li>
|
||||||
<li class="{% if 'gallery' in request.path %}active{% endif %}"><a href="{% url 'gallery:index' %}">Galerie</a></li>
|
<li class="{% if 'members' in request.path %}active{% endif %}"><a href="{% url 'members:members' 'active' %}">Fachschaft</a></li>
|
||||||
<li class="{% if 'blackboard' in request.path %}active{% endif %}"><a href="{% url 'blackboard:index' %}">Blackboard</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 %}
|
{% get_flatpages '/kontakt/' as pages %}
|
||||||
{% if pages %}
|
{% if pages %}
|
||||||
<li class="{% if '/kontakt/' in request.path %}active{% endif %}"><a href="{{ pages.first.url }}">{{ pages.first.title }}</a></li>
|
<li class="{% if '/kontakt/' in request.path %}active{% endif %}"><a href="{{ pages.first.url }}">{{ pages.first.title }}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if not request.user.is_authenticated %}
|
{% if not request.user.is_authenticated %}
|
||||||
<li><a href="{% url 'authentications:login' %}?next={{ request.path }}">Anmelden</a></li>
|
<li><a href="{% url 'authentications:login' %}?next={{ request.path }}">Anmelden</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<hr class="border-proprietary">
|
<hr class="border-proprietary">
|
||||||
<div href="#" class="inline-block w-full sm:w-auto rounded relative"
|
<div href="#" class="inline-block w-full sm:w-auto rounded relative"
|
||||||
x-data="{ showPopupNav: false }"
|
x-data="{ showPopupNav: false }"
|
||||||
@click.outside="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>
|
<div class="sm:inline-flex items-center divide-x divide-blue-200 dark:divide-proprietary-light bg-proprietary-dark text-blue-50 rounded">
|
||||||
<li class="navInternal"><a href="{% url 'tasks:index' %}"><i class="fa-fw fa-solid fa-list-check mr-2"></i>Tasks</a></li>
|
<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="#"
|
||||||
<li class="navInternal"><a href="{% url 'intern:index' %}"><i class="fa-fw fa-solid fa-database mr-2"></i>Intern</a></li>
|
@click="showPopupNav = !showPopupNav"
|
||||||
<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"
|
{% if request.user.first_name %}
|
||||||
x-show="!$screen('sm')"
|
Hallo {{ request.user.first_name }}
|
||||||
><a href="{% url 'authentications:logout' %}?next={{ request.path }}"><i class="fa-fw fa-solid fa-power-off mr-2"></i>Abmelden</a></li>
|
{% 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>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
{% endif %}
|
</ul>
|
||||||
</ul>
|
</div>
|
||||||
</div>
|
</nav>
|
||||||
</nav>
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<ul class="icon-list">
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'facebook' %}"><i class="fa-brands fa-facebook"></i></a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'instagram' %}"><i class="fa-brands fa-instagram"></i></a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'discord' %}"><i class="fa-brands fa-discord"></i></a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'telegram' %}"><i class="fa-brands fa-telegram"></i></a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="mailto:service@fet.at"><i class="fa-solid fa-envelope"></i></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% get_flatpages '/impressum/' as pages %}
|
||||||
|
{% if pages %}
|
||||||
|
<div class="legal">
|
||||||
|
<a href="{{ pages.first.url }}" class="text-center text-sm sm:text-base">{{ pages.first.title }}</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<hr class="legal-divider">
|
||||||
|
<p class="copyright">© {% now 'Y' %} FET - Alle Rechte vorbehalten.</p>
|
||||||
|
</footer>
|
||||||
|
<div class="super-duper-awesome-signature" x-data="{ counter: 0 }">
|
||||||
|
<span :class="counter>=4 && 'text-purple-300'">Handcrafted </span>
|
||||||
|
<span :class="counter>=5 && 'text-green-400'">with </span>
|
||||||
|
<i class="fa-solid fa-heart" aria-label="love" @click="counter++" :class="counter>=2 ? 'text-proprietary hover:text-proprietary-dark' : 'text-red-600 hover:text-red-700'"></i>
|
||||||
|
<span :class="counter>=6 && 'text-pink-400'"> by</span>
|
||||||
|
<span class="font-normal" :class="counter>=3 && 'text-yellow-500'"> FET</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="{% static 'js/gumshoe@5.1.1.js' %}"></script>
|
||||||
|
<script src="{% static 'js/smooth-scroll@16.1.2.js' %}"></script>
|
||||||
|
|
||||||
|
<script defer src="{% static 'js/vendor.js' %}"></script>
|
||||||
|
<script defer src="{% static 'js/scripts.js' %}"></script>
|
||||||
|
<!-- Prism.js Code syntax highlighting -->
|
||||||
|
<script src="{% static 'js/prism-core@1.25.0.js' %}"></script>
|
||||||
|
<script src="{% static 'js/prism-autoloader@1.25.0.js' %}"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var spy = new Gumshoe('#scrollspy-subNav a', {
|
||||||
|
/***** Scrollspy *****/ // Active classes
|
||||||
|
navClass: 'active', // applied to the nav list item
|
||||||
|
});
|
||||||
|
|
||||||
|
/***** SmoothScroll *****/ // All animations will take exactly 500ms
|
||||||
|
var scroll = new SmoothScroll('a[href*="#"]', {
|
||||||
|
speed: 750,
|
||||||
|
speedAsDuration: true,
|
||||||
|
easing: 'easeInOutQuad'
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
{% extends 'head.html' %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
<body x-data="{ showModal: false }" :class="{ 'overflow-y-hidden sm:overflow-y-auto': showModal }">
|
|
||||||
{% block base %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block footer %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% include 'scripts.html' %}
|
|
||||||
</body>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
{% extends 'body.html' %}
|
|
||||||
|
|
||||||
{% load flatpages %}
|
|
||||||
|
|
||||||
{% block footer %}
|
|
||||||
<footer>
|
|
||||||
<ul class="icon-list">
|
|
||||||
<li>
|
|
||||||
<a href="{% url 'facebook' %}"><i class="fa-brands fa-facebook"></i></a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url 'instagram' %}"><i class="fa-brands fa-instagram"></i></a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url 'discord' %}"><i class="fa-brands fa-discord"></i></a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url 'telegram' %}"><i class="fa-brands fa-telegram"></i></a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="mailto:service@fet.at"><i class="fa-solid fa-envelope"></i></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
{% get_flatpages '/impressum/' as pages %}
|
|
||||||
{% if pages %}
|
|
||||||
<div class="legal">
|
|
||||||
<a href="{{ pages.first.url }}" class="text-center text-sm sm:text-base">{{ pages.first.title }}</a>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<hr class="legal-divider">
|
|
||||||
<p class="copyright">© {% now 'Y' %} FET - Alle Rechte vorbehalten.</p>
|
|
||||||
</footer>
|
|
||||||
<div class="super-duper-awesome-signature" x-data="{ counter: 0 }">
|
|
||||||
<span :class="counter>=4 && 'text-purple-300'">Handcrafted </span>
|
|
||||||
<span :class="counter>=5 && 'text-green-400'">with </span>
|
|
||||||
<i class="fa-solid fa-heart" aria-label="love" @click="counter++" :class="counter>=2 ? 'text-proprietary hover:text-proprietary-dark' : 'text-red-600 hover:text-red-700'"></i>
|
|
||||||
<span :class="counter>=6 && 'text-pink-400'"> by</span>
|
|
||||||
<span class="font-normal" :class="counter>=3 && 'text-yellow-500'"> FET</span>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{% load static %}
|
|
||||||
|
|
||||||
<script src="{% static 'js/gumshoe@5.1.1.js' %}"></script>
|
|
||||||
<script src="{% static 'js/smooth-scroll@16.1.2.js' %}"></script>
|
|
||||||
|
|
||||||
<script defer src="{% static 'js/vendor.js' %}"></script>
|
|
||||||
<script defer src="{% static 'js/scripts.js' %}"></script>
|
|
||||||
<!-- Prism.js Code syntax highlighting -->
|
|
||||||
<script src="{% static 'js/prism-core@1.25.0.js' %}"></script>
|
|
||||||
<script src="{% static 'js/prism-autoloader@1.25.0.js' %}"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
var spy = new Gumshoe('#scrollspy-subNav a', {
|
|
||||||
/***** Scrollspy *****/ // Active classes
|
|
||||||
navClass: 'active', // applied to the nav list item
|
|
||||||
});
|
|
||||||
|
|
||||||
/***** SmoothScroll *****/ // All animations will take exactly 500ms
|
|
||||||
var scroll = new SmoothScroll('a[href*="#"]', {
|
|
||||||
speed: 750,
|
|
||||||
speedAsDuration: true,
|
|
||||||
easing: 'easeInOutQuad'
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
Reference in New Issue
Block a user