- commit
- d17c3570e02557950f6365985844d649e13f5646
- parent
- 1a8ab535f5d2bc13d3824138f1794a756472b5e2
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2023-10-03 04:13
move subreddit to base template i.e. also show it on comments
Diffstat
M | templates/base.html | 14 | ++++++++++++++ |
M | templates/listing.html | 15 | --------------- |
2 files changed, 14 insertions, 15 deletions
diff --git a/templates/base.html b/templates/base.html
@@ -16,6 +16,20 @@ 16 16 <button hidden>Search</button> 17 17 </form> 18 18 </header> -1 19 {% if subreddit %} -1 20 <header class="post"> -1 21 {% if subreddit.data.icon_img %} -1 22 <img class="icon" src="{{ subreddit.data.icon_img }}" alt=""> -1 23 {% endif %} -1 24 <h1><a href="{{ subreddit.data.url }}">{{ subreddit.data.title }}</a></h1> -1 25 {{ subreddit.data.public_description_html|safe }} -1 26 <footer> -1 27 <span>{{ subreddit.data.subscribers|k }} Members</span> -1 28 <span>{{ subreddit.data.active_user_count|k }} Online</span> -1 29 <span>Created {{ subreddit.data.created_utc|dt }}</span> -1 30 </footer> -1 31 </header> -1 32 {% endif %} 19 33 {% block content %}{% endblock %} 20 34 <script src="/static/video.js"></script> 21 35 </body>
diff --git a/templates/listing.html b/templates/listing.html
@@ -3,21 +3,6 @@ 3 3 {% block title %}{% if subreddit %}{{ subreddit.data.title }}{% else %}{{ super() }}{% endif %}{% endblock %} 4 4 5 5 {% block content %}6 -1 {% if subreddit %}7 -1 <header class="post">8 -1 {% if subreddit.data.icon_img %}9 -1 <img class="icon" src="{{ subreddit.data.icon_img }}" alt="">10 -1 {% endif %}11 -1 <h1><a href="{{ subreddit.data.url }}">{{ subreddit.data.title }}</a></h1>12 -1 {{ subreddit.data.public_description_html|safe }}13 -1 <footer>14 -1 <span>{{ subreddit.data.subscribers|k }} Members</span>15 -1 <span>{{ subreddit.data.active_user_count|k }} Online</span>16 -1 <span>Created {{ subreddit.data.created_utc|dt }}</span>17 -1 </footer>18 -1 </header>19 -1 {% endif %}20 -121 6 <div class="post posts-sort"> 22 7 <a href="{% if subreddit %}{{ subreddit.data.url }}{% else %}/{% endif %}hot/"> 23 8 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="currentColor" d="M10.31.61a.5.5,0,0,0-.61,0C9.41.83,2.75,6.07,2.75,11.47a8.77,8.77,0,0,0,3.14,6.91.5.5,0,0,0,.75-.64,3.84,3.84,0,0,1-.55-2A7.2,7.2,0,0,1,10,9.56a7.2,7.2,0,0,1,3.91,6.23,3.84,3.84,0,0,1-.55,2,.5.5,0,0,0,.75.64,8.77,8.77,0,0,0,3.14-6.91C17.25,6.07,10.59.83,10.31.61Z"></path></svg>