dropin

alternative frontend for dropout.tv
git clone https://git.ce9e.org/dropin.git

commit
4b2fa8b7119dedc1235e809fe4e0c9043a2fccd0
parent
c633dba9a615f926188f748cf36c24895f376e82
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2025-02-07 12:42
improve whitespace in rendered HTML

Diffstat

M dropin.py 2 ++
M templates/collection.html 2 +-
M templates/feed.xml 8 ++++----
M templates/series.html 4 ++--
M templates/video.html 2 +-

5 files changed, 10 insertions, 8 deletions


diff --git a/dropin.py b/dropin.py

@@ -30,6 +30,8 @@ FORMATS = [
   30    30 env = jinja2.Environment(
   31    31     loader=jinja2.FileSystemLoader(BASE_DIR / 'templates'),
   32    32     autoescape=jinja2.select_autoescape(default=True),
   -1    33     trim_blocks=True,
   -1    34     lstrip_blocks=True,
   33    35 )
   34    36 env.globals['FORMATS'] = FORMATS
   35    37 

diff --git a/templates/collection.html b/templates/collection.html

@@ -5,7 +5,7 @@
    5     5 {% block content %}
    6     6     <div class="wrapper-wide">
    7     7         <h1>{{ title }}</h1>
    8    -1         {% if description %}<div class="description">{{ description|linebreaks }}</div>{% endif %}
   -1     8         {%+ if description %}<div class="description">{{ description|linebreaks }}</div>{% endif %}
    9     9         {% include '_list.html' %}
   10    10     </div>
   11    11 {% endblock %}

diff --git a/templates/feed.xml b/templates/feed.xml

@@ -2,7 +2,7 @@
    2     2 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:podcast="https://podcastindex.org/namespace/1.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
    3     3     <channel>
    4     4         <title>{{ title }}</title>
    5    -1         {% if description %}<description>{{ description }}</description>{% endif %}
   -1     5         {%+ if description %}<description>{{ description }}</description>{% endif %}
    6     6         <link>{{ _links.collection_page.href }}</link>
    7     7         <language>en-US</language>
    8     8         <itunes:author>Dropout</itunes:author>
@@ -17,11 +17,11 @@
   17    17                     <link>{{ episode._links.video_page.href }}</link>
   18    18                     <guid>{{ episode._links.video_page.href }}</guid>
   19    19                     <pubDate>{{ episode.created_at }}</pubDate>
   20    -1                     {% if description %}<description>{{ episode.description }}</description>{% endif %}
   -1    20                     {%+ if description %}<description>{{ episode.description }}</description>{% endif %}
   21    21                     <itunes:duration>{{ episode.duration.seconds }}</itunes:duration>
   22    22                     <itunes:image href="{{ episode.additional_images.aspect_ratio_1_1.medium }}" />
   23    -1                     {% if episode.episode_number %}<itunes:episode>{{ episode.episode_number }}</itunes:episode>{% endif%}
   24    -1                     {% if episode.season_number %}<itunes:season>{{ episode.season_number }}</itunes:season>{% endif%}
   -1    23                     {%+ if episode.episode_number %}<itunes:episode>{{ episode.episode_number }}</itunes:episode>{% endif%}
   -1    24                     {%+ if episode.season_number %}<itunes:season>{{ episode.season_number }}</itunes:season>{% endif%}
   25    25                     <enclosure url="{{ ORIGIN }}/video/{{ episode.id }}-540p.mp4" type="video/mp4" />
   26    26                     {% for format, type, quality in FORMATS %}
   27    27                         <podcast:alternateEnclosure type="{{ type }}" title="{{ quality }}">

diff --git a/templates/series.html b/templates/series.html

@@ -9,12 +9,12 @@
    9     9 {% block content %}
   10    10     <div class="wrapper-wide">
   11    11         <h1>{{ title }}</h1>
   12    -1         {% if description %}<div class="description">{{ description|linebreaks }}</div>{% endif %}
   -1    12         {%+ if description %}<div class="description">{{ description|linebreaks }}</div>{% endif %}
   13    13 
   14    14         {% for season in seasons|reverse %}
   15    15             <h2 id="season-{{ season.season_number }}">{{ season.title }}</h2>
   16    16             <time title="{{ season.created_at }}">{{ season.created_at|dt }}</time>
   17    -1             {% if season.description %}<div class="description">{{ season.description|linebreaks }}</div>{% endif %}
   -1    17             {%+ if season.description %}<div class="description">{{ season.description|linebreaks }}</div>{% endif %}
   18    18             {% with items = season.episodes %}
   19    19                 {% include '_list.html' %}
   20    20             {% endwith %}

diff --git a/templates/video.html b/templates/video.html

@@ -29,7 +29,7 @@
   29    29             <time title="{{ created_at }}">{{ created_at|dt }}</time>
   30    30             {% if _links.video_page %}&middot; <a class="hidden-link" href="{{ _links.video_page.href }}" referrerpolicy="no-referrer">Watch on dropout.tv</a>{% endif %}
   31    31         </div>
   32    -1         {% if description %}<div class="description">{{ description|linebreaks }}</div>{% endif %}
   -1    32         {%+ if description %}<div class="description">{{ description|linebreaks }}</div>{% endif %}
   33    33         {% if tags %}
   34    34             <ul class="tags">
   35    35                 {% for tag in tags %}