[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[www] branch master updated: less hacky old news
From: |
gnunet |
Subject: |
[www] branch master updated: less hacky old news |
Date: |
Fri, 07 May 2021 16:24:25 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository www.
The following commit(s) were added to refs/heads/master by this push:
new 4347e80 less hacky old news
4347e80 is described below
commit 4347e801511f46233b1bd8b53a4728e7c5a40b95
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri May 7 16:22:09 2021 +0200
less hacky old news
---
.../oldnews-2018.html.j2 => common/old-news.j2.inc | 16 +++----
template/news/oldnews-2011.html.j2 | 6 ++-
template/news/oldnews-2013.html.j2 | 6 ++-
template/news/oldnews-2018.html.j2 | 49 +---------------------
template/news/oldnews-2019.html.j2 | 6 ++-
5 files changed, 22 insertions(+), 61 deletions(-)
diff --git a/template/news/oldnews-2018.html.j2 b/common/old-news.j2.inc
similarity index 69%
copy from template/news/oldnews-2018.html.j2
copy to common/old-news.j2.inc
index b5833a3..c11ac0c 100644
--- a/template/news/oldnews-2018.html.j2
+++ b/common/old-news.j2.inc
@@ -1,16 +1,10 @@
-{% 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.
--->
+{% macro oldnews(year) %}
<div class="container-fluid">
<div class="container">
<article>
<div class="row">
<div class="container text-center">
- <h1>{{ _("News") + " " +
self._TemplateReference__context.name[13:17] }}<a name="news"></a></h1>
+ <h1>{{ _("News") + " " + (year|string) }}<a name="news"></a></h1>
<section>
<p>
{% trans %}
@@ -24,9 +18,9 @@
</div>
</div>
<div class="row">
- <b>{{ self._TemplateReference__context.name[13:17] }}</b>
+ <b>{{ year }}</b>
<ul class="timeline">
- {% for item in newsdata|selectattr('date.year', 'eq',
self._TemplateReference__context.name[13:17]|int) %}
+ {% for item in newsdata|selectattr('date.year', 'eq', year) %}
<li>
<section class="item-preview">
<header>
@@ -47,4 +41,4 @@
</article>
</div>
</div>
-{% endblock body_content %}
+{% endmacro %}
diff --git a/template/news/oldnews-2011.html.j2
b/template/news/oldnews-2011.html.j2
deleted file mode 120000
index ef5fcbe..0000000
--- a/template/news/oldnews-2011.html.j2
+++ /dev/null
@@ -1 +0,0 @@
-oldnews-2018.html.j2
\ No newline at end of file
diff --git a/template/news/oldnews-2011.html.j2
b/template/news/oldnews-2011.html.j2
new file mode 100644
index 0000000..39e76a4
--- /dev/null
+++ b/template/news/oldnews-2011.html.j2
@@ -0,0 +1,5 @@
+{% extends "common/base.j2" %}
+{% from "common/old-news.j2.inc" import oldnews with context %}
+{% block body_content %}
+{{ oldnews(2011) }}
+{% endblock body_content %}
diff --git a/template/news/oldnews-2013.html.j2
b/template/news/oldnews-2013.html.j2
deleted file mode 120000
index ef5fcbe..0000000
--- a/template/news/oldnews-2013.html.j2
+++ /dev/null
@@ -1 +0,0 @@
-oldnews-2018.html.j2
\ No newline at end of file
diff --git a/template/news/oldnews-2013.html.j2
b/template/news/oldnews-2013.html.j2
new file mode 100644
index 0000000..d725f00
--- /dev/null
+++ b/template/news/oldnews-2013.html.j2
@@ -0,0 +1,5 @@
+{% extends "common/base.j2" %}
+{% from "common/old-news.j2.inc" import oldnews with context %}
+{% block body_content %}
+{{ oldnews(2013) }}
+{% endblock body_content %}
diff --git a/template/news/oldnews-2018.html.j2
b/template/news/oldnews-2018.html.j2
index b5833a3..3056892 100644
--- a/template/news/oldnews-2018.html.j2
+++ b/template/news/oldnews-2018.html.j2
@@ -1,50 +1,5 @@
{% extends "common/base.j2" %}
+{% from "common/old-news.j2.inc" import oldnews with context %}
{% 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") + " " +
self._TemplateReference__context.name[13:17] }}<a name="news"></a></h1>
- <section>
- <p>
- {% trans %}
- News posts about changes related to
- GNUnet such as releases and events
- {% endtrans %}
- –
- <a href="{{ url_localized('rss.xml') }}">{{ _("subscribe to
our RSS feed") }}</a>
- </p>
- </section>
- </div>
- </div>
- <div class="row">
- <b>{{ self._TemplateReference__context.name[13:17] }}</b>
- <ul class="timeline">
- {% 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>
- <p class="item-date">
- {{ item['date'] }}
- </p>
- </header>
- <p class="item-abstract">
- {{ item['abstract'] }} <br/>
- [<a href="{{ item['page'] }}" title="{{ item['date']}}">{{
_("read more") }}</a>]
- </p>
- </section>
- </li>
- {% endfor %}
- </ul>
- </div>
- </article>
- </div>
- </div>
+{{ oldnews(2018) }}
{% endblock body_content %}
diff --git a/template/news/oldnews-2019.html.j2
b/template/news/oldnews-2019.html.j2
deleted file mode 120000
index ef5fcbe..0000000
--- a/template/news/oldnews-2019.html.j2
+++ /dev/null
@@ -1 +0,0 @@
-oldnews-2018.html.j2
\ No newline at end of file
diff --git a/template/news/oldnews-2019.html.j2
b/template/news/oldnews-2019.html.j2
new file mode 100644
index 0000000..23691b6
--- /dev/null
+++ b/template/news/oldnews-2019.html.j2
@@ -0,0 +1,5 @@
+{% extends "common/base.j2" %}
+{% from "common/old-news.j2.inc" import oldnews with context %}
+{% block body_content %}
+{{ oldnews(2019) }}
+{% endblock body_content %}
--
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: less hacky old news,
gnunet <=