aboutsummaryrefslogtreecommitdiff
path: root/template/news/index.html.j2
blob: e3c3b3f19f59114f33840f515e68b3118c588db4 (plain) (blame)
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
{% extends "common/base.j2" %}
{% block body_content %}
  <div class="container-fluid">
    <div class="container">
      <article>
        <div class="row">
          <div class="container text-center">
            <h1>{{ _("News") }}<a name="news"></a></h1>
            <section>
              <p>
                {% trans %}
                News posts about changes related to
                GNUnet such as releases and events
                {% endtrans %}
                &#8211;
                <a href="{{ url_localized('rss.xml') }}">{{ _("subscribe to our RSS feed") }}</a>
              </p>
            </section>
          </div>
        </div>
        <div class="row">
          {% for year, yitem in newsdata|selectattr('date.year', 'gt', 2022)|groupby('date.year')|reverse %}
          <b>{{ year }}</b>
          <ul class="timeline">
          {% for item in yitem %}
          <li>
              <section class="item-preview">
               <header>
                  <h3>{{ item['title']|e }}</h3>
                  <p class="item-date">
                    {{ item['date'] }}
                  </p>
                </header>
                <p class="item-abstract">
                  {{ get_abstract('news/' + item['page'], 500) }} <br/>
                  [<a href="{{ url_localized('news/' + item['page']) }}" title="{{ item['date']}}">{{ _("read more") }}</a>]
                </p>
              </section>
            </li>
          {% endfor %}
          </ul>
          {% endfor %}
        </div>
        <h2>
          {% trans %}
          News archives:
          {% endtrans %}
        </h2>
        <ul>
        {% for year, yitem in newsdata|selectattr('date.year', 'lt', 2023)|groupby('date.year')|reverse %}
          <li><a href="{{ 'oldnews-' + year|string + '.html' }}">{{ year }} ({{yitem|length}})</a></li>
        {% endfor %}
        </ul>
      </article>
    </div>
  </div>
{% endblock body_content %}