add: timelines, homepage

This commit is contained in:
trisua 2025-03-31 19:31:36 -04:00
parent 619184d02e
commit de53eec0e8
24 changed files with 440 additions and 40 deletions

View file

@ -0,0 +1,27 @@
{% import "macros.html" as macros %} {% extends "root.html" %} {% block head %}
<title>{{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav(selected="home") }}
<main class="flex flex-col gap-2">
<!-- prettier-ignore -->
{{ macros::timelines_nav(selected="home") }}
{% if list|length == 0 %}
<div class="card-nest">
<div class="card">
<b>✨ Welcome to <i>{{ config.name }}</i>!</b>
</div>
<div class="card">
Join some communities to populate your home timeline!
</div>
</div>
{% else %}
<!-- prettier-ignore -->
<div class="card w-full flex flex-col gap-2">
{% for post in list %}
{{ components::post(post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true) }}
{% endfor %}
</div>
{% endif %}
</main>
{% endblock %}

View file

@ -0,0 +1,14 @@
{% import "macros.html" as macros %} {% extends "root.html" %} {% block head %}
<title>Popular - {{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav(selected="popular") }}
<main class="flex flex-col gap-2">
{{ macros::timelines_nav(selected="popular") }}
<!-- prettier-ignore -->
<div class="card w-full flex flex-col gap-2">
{% for post in list %}
{{ components::post(post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true) }}
{% endfor %}
</div>
</main>
{% endblock %}