add: following timeline
This commit is contained in:
parent
6141910059
commit
1ee1f29cdf
15 changed files with 176 additions and 9 deletions
|
@ -163,6 +163,14 @@
|
|||
<span>{{ text "general:link.home" }}</span>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="/following"
|
||||
class="{% if selected == 'following' %}active{% endif %}"
|
||||
>
|
||||
{{ icon "earth" }}
|
||||
<span>{{ text "general:link.following" }}</span>
|
||||
</a>
|
||||
|
||||
<a href="/popular" class="{% if selected == 'popular' %}active{% endif %}">
|
||||
{{ icon "trending-up" }}
|
||||
<span>{{ text "general:link.popular" }}</span>
|
||||
|
|
16
crates/app/src/public/html/timelines/following.html
Normal file
16
crates/app/src/public/html/timelines/following.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% extends "root.html" %} {% block head %}
|
||||
<title>Following - {{ config.name }}</title>
|
||||
{% endblock %} {% block body %} {{ macros::nav() }}
|
||||
<main class="flex flex-col gap-2">
|
||||
{{ macros::timelines_nav(selected="following") }}
|
||||
|
||||
<!-- 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 %}
|
||||
|
||||
{{ components::pagination(page=page, items=list|length) }}
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
|
@ -5,7 +5,7 @@
|
|||
<!-- prettier-ignore -->
|
||||
{{ macros::timelines_nav(selected="home") }}
|
||||
|
||||
{% if list|length == 0 %}
|
||||
{% if list|length == 0 and page == 0 %}
|
||||
<div class="card-nest">
|
||||
<div class="card">
|
||||
<b>✨ Welcome to <i>{{ config.name }}</i>!</b>
|
||||
|
@ -21,6 +21,8 @@
|
|||
{% for post in list %}
|
||||
{{ components::post(post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true) }}
|
||||
{% endfor %}
|
||||
|
||||
{{ components::pagination(page=page, items=list|length) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</main>
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
{% for post in list %}
|
||||
{{ components::post(post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true) }}
|
||||
{% endfor %}
|
||||
|
||||
{{ components::pagination(page=page, items=list|length) }}
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue