~homeworkprod/byceps

ref: 0a6eac9a01fd428cc44328179d735a4ec73a4418 byceps/byceps/blueprints/site/party/templates/site/party/archive.html -rw-r--r-- 1.3 KiB
0a6eac9a — Jochen Kupperschmidt Move party blueprint into `site` subpackage 1 year, 3 months ago
                                                                                
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
{% extends 'layout/base.html' %}
{% from 'macros/datetime.html' import render_datetime_long %}
{% from 'macros/icons.html' import render_icon %}
{% from 'macros/user_avatar.html' import render_user_avatar_20_and_link %}
{% set current_page = 'party.archive' %}
{% set title = 'Party-Archiv' %}

{% block head %}
  <style>
    .attendees {
      columns: 10rem;
    }
    .attendees {
      line-height: 1.6;
      padding-right: 2rem;
    }
  </style>
{%- endblock %}

{% block body %}

  <h1>{{ title }}</h1>

  <div class="party-archive">
  {%- for party in parties %}
    <h2>{{ party.title }}</h2>
    <p class="meta"><time datetime="{{ party.starts_at|format_date_iso }}">{{ party.starts_at|utc_to_local_tz|format_date_long }}{{ party.ends_at|utc_to_local_tz|format_date_long }}</time></p>

    {%- with attendees = attendees_by_party_id[party.id]|sort(attribute='screen_name') %}
      {%- if attendees %}
      <h3>{{ render_icon('users') }} Teilnehmer</h3>
      <ol class="attendees">
        {%- for user in attendees -%}
          {%- if not user.deleted %}
        <li>{{- render_user_avatar_20_and_link(user) -}}</li>
          {%- endif %}
        {%- endfor %}
      </ol>
      {%- endif %}
    {%- endwith %}
  {%- else %}
    <p class="dimmed">Es haben noch keine Partys stattgefunden.</p>
  {%- endfor %}
  </div>

{%- endblock %}