aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2021-02-26 18:36:55 +0100
committerMartin Schanzenbach <mschanzenbach@posteo.de>2021-02-26 18:36:55 +0100
commit2a25de3b4440921a5c6704ca7b7d696a9fdfae53 (patch)
tree63570338df01443890cea54c3eb9fc82a48bae8e
parent6c50a24304ef5e44f5b8981d306abb70c5e5d145 (diff)
downloadwww-2a25de3b4440921a5c6704ca7b7d696a9fdfae53.tar.gz
www-2a25de3b4440921a5c6704ca7b7d696a9fdfae53.zip
fix #5522
-rw-r--r--news/index.html.j217
-rw-r--r--news/oldnews-2018.html.j250
l---------news/oldnews-2019.html.j21
3 files changed, 66 insertions, 2 deletions
diff --git a/news/index.html.j2 b/news/index.html.j2
index ae8f5e3b..6db6600e 100644
--- a/news/index.html.j2
+++ b/news/index.html.j2
@@ -19,9 +19,11 @@
19 </div> 19 </div>
20 </div> 20 </div>
21 <div class="row"> 21 <div class="row">
22 {% for year, yitem in newsdata|selectattr('date.year', 'gt', 2019)|groupby('date.year') %}
23 <b>{{ year }}</b>
22 <ul class="timeline"> 24 <ul class="timeline">
23 {% for item in newsdata %} 25 {% for item in yitem %}
24 <li> 26 <li>
25 <section class="item-preview"> 27 <section class="item-preview">
26 <header> 28 <header>
27 <h3>{{ item['title']|e }}</h3> 29 <h3>{{ item['title']|e }}</h3>
@@ -37,7 +39,18 @@
37 </li> 39 </li>
38 {% endfor %} 40 {% endfor %}
39 </ul> 41 </ul>
42 {% endfor %}
40 </div> 43 </div>
44 <h2>
45 {% trans %}
46 News archives:
47 {% endtrans %}
48 </h2>
49 <ul>
50 {% for year, yitem in newsdata|selectattr('date.year', 'lt', 2020)|groupby('date.year')|reverse %}
51 <li><a href="{{ 'oldnews-' + year|string + '.html' }}">{{ year }} ({{yitem|length}})</a></li>
52 {% endfor %}
53 </ul>
41 </article> 54 </article>
42 </div> 55 </div>
43 </div> 56 </div>
diff --git a/news/oldnews-2018.html.j2 b/news/oldnews-2018.html.j2
new file mode 100644
index 00000000..b5833a31
--- /dev/null
+++ b/news/oldnews-2018.html.j2
@@ -0,0 +1,50 @@
1{% extends "common/base.j2" %}
2{% block body_content %}
3<!-- Simply link to or copy this file as-is (no modifications required)
4 news/oldnews-::year::. This will generate a new news archive page.
5 Note that you may still have to modify the currently displayed
6 year ranges in the index.html.j2.
7-->
8 <div class="container-fluid">
9 <div class="container">
10 <article>
11 <div class="row">
12 <div class="container text-center">
13 <h1>{{ _("News") + " " + self._TemplateReference__context.name[13:17] }}<a name="news"></a></h1>
14 <section>
15 <p>
16 {% trans %}
17 News posts about changes related to
18 GNUnet such as releases and events
19 {% endtrans %}
20 &#8211;
21 <a href="{{ url_localized('rss.xml') }}">{{ _("subscribe to our RSS feed") }}</a>
22 </p>
23 </section>
24 </div>
25 </div>
26 <div class="row">
27 <b>{{ self._TemplateReference__context.name[13:17] }}</b>
28 <ul class="timeline">
29 {% for item in newsdata|selectattr('date.year', 'eq', self._TemplateReference__context.name[13:17]|int) %}
30 <li>
31 <section class="item-preview">
32 <header>
33 <h3>{{ item['title']|e }}</h3>
34 <p class="item-date">
35 {{ item['date'] }}
36 </p>
37 </header>
38 <p class="item-abstract">
39 {{ item['abstract'] }} <br/>
40 [<a href="{{ item['page'] }}" title="{{ item['date']}}">{{ _("read more") }}</a>]
41 </p>
42 </section>
43 </li>
44 {% endfor %}
45 </ul>
46 </div>
47 </article>
48 </div>
49 </div>
50{% endblock body_content %}
diff --git a/news/oldnews-2019.html.j2 b/news/oldnews-2019.html.j2
new file mode 120000
index 00000000..ef5fcbee
--- /dev/null
+++ b/news/oldnews-2019.html.j2
@@ -0,0 +1 @@
oldnews-2018.html.j2 \ No newline at end of file