refactor: rename template files

This commit is contained in:
Ayo Ayco 2025-01-19 10:04:04 +01:00
parent 26cb6d0c84
commit 75425e33df
4 changed files with 5 additions and 5 deletions

View file

@ -319,7 +319,7 @@
<main class={{ "thread" if threads|length==1 else "home" }}> <main class={{ "thread" if threads|length==1 else "home" }}>
{% if tags is defined%} {% if tags is defined%}
{% with tags=tags %} {% with tags=tags %}
{% include "tags.html" %} {% include "tag-pills.html" %}
{% endwith %} {% endwith %}
{% endif %} {% endif %}
<div class="back"> <div class="back">

View file

@ -307,7 +307,7 @@
<main class={{ "thread" if threads|length==1 else "home" }}> <main class={{ "thread" if threads|length==1 else "home" }}>
{% if tags is defined%} {% if tags is defined%}
{% with tags=tags %} {% with tags=tags %}
{% include "tags.html" %} {% include "tag-pills.html" %}
{% endwith %} {% endwith %}
{% endif %} {% endif %}
<div class="back"> <div class="back">

View file

@ -65,7 +65,7 @@ async def home():
# List featured hashtags # List featured hashtags
tags = masto.featured_tags() tags = masto.featured_tags()
return render_template('threads.html', threads=statuses, tags=tags, app=app, attribution=attribution, render_date=datetime.now()) return render_template('home.html', threads=statuses, tags=tags, app=app, attribution=attribution, render_date=datetime.now())
@threads.route('/tag/<path:id>') @threads.route('/tag/<path:id>')
@ -83,7 +83,7 @@ async def tag(id):
return render_template('tag.html', threads=statuses, tag=id, app=app, tags=tags, attribution=attribution, render_date=datetime.now()) return render_template('tag-page.html', threads=statuses, tag=id, app=app, tags=tags, attribution=attribution, render_date=datetime.now())
@threads.route('/<path:id>') @threads.route('/<path:id>')
@ -96,7 +96,7 @@ def thread(id):
status['summary'] = utils.clean_html(status['content']).strip() status['summary'] = utils.clean_html(status['content']).strip()
if len(status['summary']) > 69: if len(status['summary']) > 69:
status['summary'] = status['summary'][:69] + '...' status['summary'] = status['summary'][:69] + '...'
return render_template('threads.html', threads=[status], app=app, attribution=attribution, render_date=datetime.now()) return render_template('home.html', threads=[status], app=app, attribution=attribution, render_date=datetime.now())
else: else:
return '<h1>Not Found</h1><p>🤷🤷‍♀️🤷‍♂️</p><a href="/">go home</a>', 404 return '<h1>Not Found</h1><p>🤷🤷‍♀️🤷‍♂️</p><a href="/">go home</a>', 404