[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[www] branch master updated: fix #5522
From: |
gnunet |
Subject: |
[www] branch master updated: fix #5522 |
Date: |
Fri, 26 Feb 2021 18:38:17 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository www.
The following commit(s) were added to refs/heads/master by this push:
new 2a25de3 fix #5522
2a25de3 is described below
commit 2a25de3b4440921a5c6704ca7b7d696a9fdfae53
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Fri Feb 26 18:36:55 2021 +0100
fix #5522
---
news/index.html.j2 | 17 +++++++++++++++--
news/{index.html.j2 => oldnews-2018.html.j2} | 12 +++++++++---
news/oldnews-2019.html.j2 | 1 +
3 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/news/index.html.j2 b/news/index.html.j2
index ae8f5e3..6db6600 100644
--- a/news/index.html.j2
+++ b/news/index.html.j2
@@ -19,9 +19,11 @@
</div>
</div>
<div class="row">
+ {% for year, yitem in newsdata|selectattr('date.year', 'gt',
2019)|groupby('date.year') %}
+ <b>{{ year }}</b>
<ul class="timeline">
- {% for item in newsdata %}
- <li>
+ {% for item in yitem %}
+ <li>
<section class="item-preview">
<header>
<h3>{{ item['title']|e }}</h3>
@@ -37,7 +39,18 @@
</li>
{% endfor %}
</ul>
+ {% endfor %}
</div>
+ <h2>
+ {% trans %}
+ News archives:
+ {% endtrans %}
+ </h2>
+ <ul>
+ {% for year, yitem in newsdata|selectattr('date.year', 'lt',
2020)|groupby('date.year')|reverse %}
+ <li><a href="{{ 'oldnews-' + year|string + '.html' }}">{{ year }}
({{yitem|length}})</a></li>
+ {% endfor %}
+ </ul>
</article>
</div>
</div>
diff --git a/news/index.html.j2 b/news/oldnews-2018.html.j2
similarity index 69%
copy from news/index.html.j2
copy to news/oldnews-2018.html.j2
index ae8f5e3..b5833a3 100644
--- a/news/index.html.j2
+++ b/news/oldnews-2018.html.j2
@@ -1,11 +1,16 @@
{% extends "common/base.j2" %}
{% block body_content %}
+<!-- Simply link to or copy this file as-is (no modifications required)
+ news/oldnews-::year::. This will generate a new news archive page.
+ Note that you may still have to modify the currently displayed
+ year ranges in the index.html.j2.
+-->
<div class="container-fluid">
<div class="container">
<article>
<div class="row">
<div class="container text-center">
- <h1>{{ _("News") }}<a name="news"></a></h1>
+ <h1>{{ _("News") + " " +
self._TemplateReference__context.name[13:17] }}<a name="news"></a></h1>
<section>
<p>
{% trans %}
@@ -19,9 +24,10 @@
</div>
</div>
<div class="row">
+ <b>{{ self._TemplateReference__context.name[13:17] }}</b>
<ul class="timeline">
- {% for item in newsdata %}
- <li>
+ {% for item in newsdata|selectattr('date.year', 'eq',
self._TemplateReference__context.name[13:17]|int) %}
+ <li>
<section class="item-preview">
<header>
<h3>{{ item['title']|e }}</h3>
diff --git a/news/oldnews-2019.html.j2 b/news/oldnews-2019.html.j2
new file mode 120000
index 0000000..ef5fcbe
--- /dev/null
+++ b/news/oldnews-2019.html.j2
@@ -0,0 +1 @@
+oldnews-2018.html.j2
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [www] branch master updated: fix #5522,
gnunet <=