-
Notifications
You must be signed in to change notification settings - Fork 97
Expand file tree
/
Copy pathindex.html
More file actions
64 lines (62 loc) · 3 KB
/
Copy pathindex.html
File metadata and controls
64 lines (62 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{% extends "core/base.html" %}
{% load truncate %}
{% load escaping %}
{% load i18n %}
{% load dates %}
{% block title %}{{ journal_settings.news.news_title }}{% endblock title %}
{% block body %}
<div class="row">
<div class="col m12">
<h1>{{ journal_settings.news.news_title }}</h1>
{% if tag %} <h2>{% trans "Filtering tag" %}: {{ tag }}</h2>{% endif %}
</div>
{% for item in news_items %}
<div class="col m12">
<div class="card">
{% if item.large_image_file or request.journal and request.journal.default_large_image or request.press.default_carousel_image %}
<div class="card-image">
<img src="{{ item.best_image_url }}" alt="{{ item.title|striptags|unescape }}"/>
<span class="card-title">
<div class="carousel-text-wrapper">
{{ item.title|safe }}
</div>
</span>
</div>
{% endif %}
<div class="card-content">
{% if not item.large_image_file or request.journal and not request.journal.default_large_image or not request.press.default_carousel_image %}
<h2 id="news-{{ item.id }}" class="no-top-margin">{{ item.title|safe }}</h2>
{% endif %}
<p class="byline">{{ item.byline }} {% trans "on" %} {{ item.posted|date_human }}</p>
<p>{{ item.body|truncatewords_html:50|safe }}</p>
</div>
<div class="card-action">
<a href="{% url 'core_news_item' item.pk %}" aria-describedby="news-{{ item.id }}">{% trans "Read More" %}</a>
</div>
</div>
</div>
{% empty %}
<h2>{% trans "This journal currently has no items to display." %}</h2>
{% endfor %}
</div>
<div class="pagination-block">
<ul class="list-inline d-flex justify-content-center">
{% if news_items.has_previous %}
<li><a href="?page={{ news_items.previous_page_number }}" class="btn btn-outline-primary">
{% include "elements/icons/page_previous.html" %}
</a>
</li>{% endif %}
{{ news_items.page.page_range }}
{% for page in news_items.paginator.page_range %}
<li><a href="?page={{ page }}"
class="btn {% if news_items.number == page %}btn-primary{% else %}btn-outline-primary{% endif %}">{{ page }}</a>
</li>
{% endfor %}
{% if news_items.has_next %}
<li><a href="?page={{ news_items.next_page_number }}" class="btn btn-outline-primary">
{% include "elements/icons/page_next.html" %}
</a></li>
{% endif %}
</ul>
</div>
{% endblock %}