update post view, limit related_posts to max 6
This commit is contained in:
@@ -91,7 +91,7 @@ def show(request, id=None):
|
|||||||
"post": p,
|
"post": p,
|
||||||
"author_image": author_image,
|
"author_image": author_image,
|
||||||
"next": get_next_dict(p),
|
"next": get_next_dict(p),
|
||||||
"related_posts": p.tags.similar_objects(),
|
"related_posts": p.tags.similar_objects()[:6],
|
||||||
"ep_agenda_link": ep_agenda_link,
|
"ep_agenda_link": ep_agenda_link,
|
||||||
"ep_protocol_link": ep_protocol_link,
|
"ep_protocol_link": ep_protocol_link,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,14 +76,14 @@ footer {
|
|||||||
<div class="cell medium-6 large-9">
|
<div class="cell medium-6 large-9">
|
||||||
<div class="grid-y" style="height: 150px;">
|
<div class="grid-y" style="height: 150px;">
|
||||||
|
|
||||||
<div class="cell small-6 medium-6 large-6 padding-left-1">
|
<div class="cell small-6 medium-6 large-6">
|
||||||
<a href="{% url 'posts.show' 'impressum'%}" style="color: white">Impressum</a>
|
<a href="{% url 'posts.show' 'impressum'%}" style="color: white">Impressum</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cell small-6 medium-6 large-6">
|
<div class="cell small-6 medium-6 large-6">
|
||||||
<a class="button" href="https://www.facebook.com/FachschaftET" style="background-color: Transparent;"><i class="fab fa-facebook-square" style="font-size:30px"></i></a>
|
<a href="https://www.facebook.com/FachschaftET"><i class="fab fa-facebook-square" style="font-size:30px; color: white;"></i></a>
|
||||||
<a class="button" href="https://www.instagram.com/fet_tuwien/" style="background-color: Transparent;"><i class="fab fa-instagram-square" style="font-size:30px"></i></a>
|
<a href="https://www.instagram.com/fet_tuwien/"><i class="fab fa-instagram-square" style="font-size:30px; color: white;"></i></a>
|
||||||
<a class="button" href="https://t.me/FETInfo" style="background-color: Transparent;"><i class="fa fa-telegram" style="font-size:30px"></i></a>
|
<a href="https://t.me/FETInfo"><i class="fa fa-telegram" style="font-size:30px; color: white;"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -34,12 +34,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid-container">
|
<div class="grid-container">
|
||||||
<h1>{{ post.title|tags_to_url }}</h1>
|
<div class="grid-x grid-padding-x padding-top-1">
|
||||||
<strong>{{ post.subtitle|default_if_none:" "|tags_to_url }}</strong>
|
|
||||||
<br>
|
|
||||||
<div class="grid-x grid-padding-x">
|
|
||||||
<div class="cell medium-8">
|
<div class="cell medium-8">
|
||||||
<hr>
|
|
||||||
{% for tag in post.get_tagnames %}
|
{% for tag in post.get_tagnames %}
|
||||||
{{ tag|tags_to_url }}
|
{{ tag|tags_to_url }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@@ -61,15 +57,22 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if post.has_protocol %}
|
{% if post.has_protocol %}
|
||||||
<a href="{{ ep_protocol_link }}">Protokoll</a>
|
<a href="{{ ep_protocol_link }}">Protokoll</a><br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if post.event_start %}
|
||||||
Start: {{ post.event_start }}<br>
|
Start: {{ post.event_start }}<br>
|
||||||
|
{% endif %}
|
||||||
|
{% if post.event_end %}
|
||||||
Ende: {{ post.event_end }}<br>
|
Ende: {{ post.event_end }}<br>
|
||||||
<a href="{% url 'posts.show' next %}">Nächster Artikel </a><span class="nav fa fa-chevron-right fa-1x"></span><br>
|
{% endif %}
|
||||||
|
|
||||||
|
<a href="{% url 'posts.show' next %}">Nächster Artikel <span class="nav fa fa-chevron-right fa-1x"></span></a><br>
|
||||||
|
{% if post.event_start %}
|
||||||
{% include 'posts/partials/_date_box.html' %}
|
{% include 'posts/partials/_date_box.html' %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user