- commit
- a3a05de9027d32d875a6e874433a5a106f44fdbb
- parent
- 0c62e577c81429c50dfa3ad38eb5efb00c3e6b09
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2025-02-12 02:55
refactor: inherit series template from collection
Diffstat
M | templates/collection.html | 8 | ++++---- |
M | templates/series.html | 35 | +++++++++++------------------------ |
2 files changed, 15 insertions, 28 deletions
diff --git a/templates/collection.html b/templates/collection.html
@@ -3,15 +3,15 @@ 3 3 {% block title %}{{ col.title }} - {{ super() }}{% endblock %} 4 4 5 5 {% block head %}6 -1 {% if ORIGIN and col.type == 'playlist' %}7 -1 <link rel="alternate" type="application/atom+xml" href="/{{ col.type }}/{{ col.id }}.rss">8 -1 {% endif %}-1 6 <link rel="alternate" type="application/atom+xml" href="/{{ col.type }}/{{ col.id }}.rss"> 9 7 {% endblock %} 10 8 11 9 {% block content %} 12 10 <div class="wrapper-wide"> 13 11 <h1>{{ col.title }}</h1> 14 12 {%+ if col.description %}<div class="description">{{ col.description|linebreaks }}</div>{% endif %}15 -1 {% include '_list.html' %}-1 13 {% block list %} -1 14 {% include '_list.html' %} -1 15 {% endblock %} 16 16 </div> 17 17 {% endblock %}
diff --git a/templates/series.html b/templates/series.html
@@ -1,25 +1,12 @@1 -1 {% extends 'base.html' %}2 -13 -1 {% block title %}{{ col.title }} - {{ super() }}{% endblock %}4 -15 -1 {% block head %}6 -1 {% if ORIGIN %}7 -1 <link rel="alternate" type="application/atom+xml" href="/series/{{ col.id }}.rss">8 -1 {% endif %}9 -1 {% endblock %}10 -111 -1 {% block content %}12 -1 <div class="wrapper-wide">13 -1 <h1>{{ col.title }}</h1>14 -1 {%+ if col.description %}<div class="description">{{ col.description|linebreaks }}</div>{% endif %}15 -116 -1 {% for season in seasons|reverse %}17 -1 <h2 id="season-{{ season.season_number }}">{{ season.title }}</h2>18 -1 <time title="{{ season.created_at }}">{{ season.created_at|dt }}</time>19 -1 {%+ if season.description %}<div class="description">{{ season.description|linebreaks }}</div>{% endif %}20 -1 {% with items = season.episodes %}21 -1 {% include '_list.html' %}22 -1 {% endwith %}23 -1 {% endfor %}24 -1 </div>-1 1 {% extends 'collection.html' %} -1 2 -1 3 {% block list %} -1 4 {% for season in seasons|reverse %} -1 5 <h2 id="season-{{ season.season_number }}">{{ season.title }}</h2> -1 6 <time title="{{ season.created_at }}">{{ season.created_at|dt }}</time> -1 7 {%+ if season.description %}<div class="description">{{ season.description|linebreaks }}</div>{% endif %} -1 8 {% with items = season.episodes %} -1 9 {% include '_list.html' %} -1 10 {% endwith %} -1 11 {% endfor %} 25 12 {% endblock %}