simplify post urls

This commit is contained in:
2022-04-09 10:14:15 +00:00
parent 531b69663c
commit 68ce65034b
12 changed files with 23 additions and 50 deletions

View File

@@ -68,7 +68,7 @@
x-transition:leave-start="transform opacity-100 scale-100"
x-transition:leave-end="transform opacity-0 scale-90"
>
<li><a href="{% url 'posts:posts.index' %}">News</a></li>
<li><a href="{% url 'posts:index' %}">News</a></li>
<li><a href="{% url 'members_view' 'active' %}">Fachschaft</a></li>
<li><a href="{% url 'gallery' %}">Galerie</a></li>
<li><a href="{% url 'blackboard' %}">Blackboard</a></li>

View File

@@ -70,7 +70,7 @@
</div>
</a>
<a href="{% url 'posts:posts.calendar' %}">
<a href="{% url 'posts:calendar' %}">
<div class="social-media-box">
<span class="social-media-badge badge">
<span class="social-media-badge-symbol">

View File

@@ -1,6 +1,5 @@
{% extends 'base.html' %}
{% load post_helpers %}
{% load static %}
{% block content %}
@@ -63,7 +62,7 @@
{% include 'posts/partials/_date_box.html' %}
{% endfor %}
<a href="{% url 'posts:posts.calendar' %}" class="btn btn-secondary block w-full"><i class="fas fa-calendar-alt mr-2"></i>Kalender abonnieren</a>
<a href="{% url 'posts:calendar' %}" class="btn btn-secondary block w-full"><i class="fas fa-calendar-alt mr-2"></i>Kalender abonnieren</a>
</div>
</div>
</aside>
@@ -81,7 +80,7 @@
{% include 'posts/partials/_posts_hero.html' %}
{% endfor %}
<a href="{% url 'posts:posts.index' %}" class="btn btn-primary block w-full"><i class="fas fa-plus-square mr-2"></i>Mehr anzeigen</a>
<a href="{% url 'posts:index' %}" class="btn btn-primary block w-full"><i class="fas fa-plus-square mr-2"></i>Mehr anzeigen</a>
</section>
</div>

View File

@@ -59,7 +59,7 @@
<li><a class="button header-intern-btn header-intern-link" href="{% url 'intern:index' %}">Intern</a></li>
<li><a class="button header-intern-btn header-intern-link" href="https://legacy.fet.at/home/intern">Legacy</a></li>
{% endif %}
<li><a class="button header-btn header-link" href="{% url 'posts:posts.index' %}">News</a></li>
<li><a class="button header-btn header-link" href="{% url 'posts:index' %}">News</a></li>
<!-- show active members first -->
<li><a class="button header-btn header-link" href="{% url 'members_view' 'active' %}">Fachschaft</a></li>
<li><a class="button header-btn header-link" href="{% url 'gallery' %}">Galerie</a></li>

View File

@@ -1,7 +1,5 @@
{% extends 'base.html' %}
{% load post_helpers %}
{% block title %}News{% endblock %}
{% block content %}

View File

@@ -3,7 +3,7 @@
<div class="article-cover-desc-items">
<ul class="article-cover-tags">
{% for t in post.three_tag_names %}
<li><a href="{% url 'posts:posts.tags' t %}">#{{ t }}</a></li>
<li><a href="{% url 'posts:tags' t %}">#{{ t }}</a></li>
{% endfor %}
</ul>
<div>

View File

@@ -11,7 +11,7 @@
</div>
<ul class="article-cover-tags">
{% for t in post.three_tag_names %}
<li><a href="{% url 'posts:posts.tags' t %}">#{{ t }}</a></li>
<li><a href="{% url 'posts:tags' t %}">#{{ t }}</a></li>
{% endfor %}
</ul>
<div>

View File

@@ -1,7 +1,6 @@
{% extends 'base.html' %}
{% load post_helpers %}
{% load admin_urls %}
{% block title %}News{% endblock %}
@@ -15,7 +14,7 @@
{% block content %}
<!-- Main Content -->
<main class="container mx-auto w-full flex-1 my-8 sm:flex flex-col sm:px-4">
<a href="{% url 'posts:posts.show' previous %}" class="hidden z-20 fixed left-0 top-1/2 -mt-8 p-2 xl:flex items-center text-gray-400 dark:text-gray-300 rounded-md"
<a href="{% url 'posts:show' previous %}" class="hidden z-20 fixed left-0 top-1/2 -mt-8 p-2 xl:flex items-center text-gray-400 dark:text-gray-300 rounded-md"
x-data="{ showPrevArticleButton : false }"
@mouseleave="showPrevArticleButton = false"
@mouseover="showPrevArticleButton = true"
@@ -31,7 +30,7 @@
x-transition:leave-end="opacity-0 bg-opacity-0 transform scale-100"
>Vorheriger<br>Artikel</span>
</a>
<a href="{% url 'posts:posts.show' next %}" class="hidden z-20 fixed right-0 top-1/2 -mt-8 p-2 xl:flex items-center text-gray-400 dark:text-gray-300 rounded-md"
<a href="{% url 'posts:show' next %}" class="hidden z-20 fixed right-0 top-1/2 -mt-8 p-2 xl:flex items-center text-gray-400 dark:text-gray-300 rounded-md"
x-data="{ showNextArticleButton : false }"
@mouseleave="showNextArticleButton = false"
@mouseover="showNextArticleButton = true"
@@ -51,7 +50,7 @@
<div class="mb-4 flex flex-col sm:flex-col gap-2 mx-auto">
<ul class="px-4 sm:px-0 mb-2 flex flex-row justify-center gap-2 sm:gap-4 flex-wrap text-sky-700 dark:text-blue-200 text-sm uppercase tracking-wide sm:font-medium">
{% for t in post.tag_names %}
<li class="inline-block py-1 px-2 bg-sky-100 dark:bg-sky-900 rounded-full"><a href="{% url 'posts:posts.tags' t %}">#{{ t }}</a></li>
<li class="inline-block py-1 px-2 bg-sky-100 dark:bg-sky-900 rounded-full"><a href="{% url 'posts:tags' t %}">#{{ t }}</a></li>
{% endfor %}
</ul>
<h1 class="px-4 sm:px-0 text-lg sm:text-xl lg:text-3xl text-center sm:text-left font-medium text-gray-900 dark:text-gray-100 font-serif tracking-wider leading-normal" style="line-height: 1.5;">{{ post.title|tags_to_url }}</h1>
@@ -149,7 +148,7 @@
{{ post.agenda_html|safe }}
<hr>
{% elif post.body %}
{{ post.body|safe|add_internal_links|tags_to_url }}
{{ post.body|safe|tags_to_url }}
{% endif %}
{% if request.user.is_authenticated and post.has_protocol %}
@@ -283,11 +282,11 @@
<hr class="-mx-4 border-gray-200 dark:border-gray-800 dark:border my-4">
<div class="-m-4 flex divide-x divide-gray-200 dark:divide-gray-800 dark:divide-x-2 text-sm sm:text-base">
<a href="{% url 'posts:posts.show' previous %}" class="w-1/2 p-4 flex items-center gap-2">
<a href="{% url 'posts:show' previous %}" class="w-1/2 p-4 flex items-center gap-2">
<i class="fa-solid fa-chevron-left text-gray-600 dark:text-gray-400"></i>
<span class="text-gray-700 dark:text-gray-300 font-medium">Vorheriger Artikel</span>
</a>
<a href="{% url 'posts:posts.show' next %}" class="w-1/2 p-4 flex flex-row-reverse items-center gap-2">
<a href="{% url 'posts:show' next %}" class="w-1/2 p-4 flex flex-row-reverse items-center gap-2">
<i class="fa-solid fa-chevron-right text-gray-600 dark:text-gray-400"></i>
<span class="text-gray-700 dark:text-gray-300 font-medium">Nächster Artikel</span>
</a>