add: "all" timeline

add: only show most popular posts from the past week
This commit is contained in:
trisua 2025-04-12 12:17:30 -04:00
parent fc9c0f294e
commit 24f67221ca
13 changed files with 143 additions and 27 deletions

View file

@ -1,6 +1,6 @@
{% extends "root.html" %} {% block head %}
<title>Create post - {{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav(selected="") }}
{% endblock %} {% block body %} {{ macros::nav() }}
<main class="flex flex-col gap-2">
<div class="card-nest">
<div class="card small flex items-center justify-between gap-2">

View file

@ -3,17 +3,20 @@
{% endblock %} {% block body %} {{ macros::nav() }}
<main class="flex flex-col gap-2">
<div class="pillmenu">
<a href="#/general" data-tab-button="general" class="active"
>{{ text "settings:tab.general" }}</a
>
<a href="#/general" data-tab-button="general" class="active">
{{ icon "settings" }}
<span>{{ text "settings:tab.general" }}</span>
</a>
<a href="#/profile" data-tab-button="profile"
>{{ text "settings:tab.profile" }}</a
>
<a href="#/images" data-tab-button="images">
{{ icon "image" }}
<span>{{ text "settings:tab.images" }}</span>
</a>
<a href="#/members" data-tab-button="members"
>{{ text "communities:tab.members" }}</a
>
<a href="#/members" data-tab-button="members">
{{ icon "users-round" }}
<span>{{ text "communities:tab.members" }}</span>
</a>
</div>
<div class="w-full flex flex-col gap-2" data-tab="general">
@ -159,7 +162,7 @@
<div
class="card tertiary w-full hidden flex flex-col gap-2"
data-tab="profile"
data-tab="images"
>
<div class="card-nest" ui_ident="change_avatar">
<div class="card small">

View file

@ -534,6 +534,10 @@ user %} {% if user.settings.theme_hue %}
{{ components::theme_color(color=user.settings.theme_color_secondary, css="color-secondary") }}
{{ components::theme_color(color=user.settings.theme_color_text_secondary, css="color-text-secondary") }}
{{ components::theme_color(color=user.settings.theme_color_secondary_lowered, css="color-secondary-lowered") }}
{% if user.permissions|has_supporter %}
<style>{{ user.settings.theme_custom_css }}</style>
{% endif %}
</div>
{% endif %} {%- endmacro %} {% macro theme_color(color, css) -%} {% if color %}
<!-- prettier-ignore -->

View file

@ -163,19 +163,24 @@
<span>{{ text "general:link.home" }}</span>
</a>
<a href="/popular" class="{% if selected == 'popular' %}active{% endif %}">
{{ icon "trending-up" }}
<span>{{ text "general:link.popular" }}</span>
</a>
{% if user %}
<a
href="/following"
class="{% if selected == 'following' %}active{% endif %}"
>
{{ icon "earth" }}
{{ icon "rss" }}
<span>{{ text "general:link.following" }}</span>
</a>
{% endif %}
<a href="/popular" class="{% if selected == 'popular' %}active{% endif %}">
{{ icon "trending-up" }}
<span>{{ text "general:link.popular" }}</span>
<a href="/all" class="{% if selected == 'all' %}active{% endif %}">
{{ icon "earth" }}
<span>{{ text "general:link.all" }}</span>
</a>
{% endif %}
</div>
{%- endmacro %}

View file

@ -1,6 +1,6 @@
{% extends "root.html" %} {% block head %}
<title>{{ profile.username }} (warning) - {{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav(selected="") }}
{% endblock %} {% block body %} {{ macros::nav() }}
<main class="flex flex-col gap-2">
<div class="card-nest">
<div class="card small flex items-center justify-between gap-2">

View file

@ -0,0 +1,20 @@
{% extends "root.html" %} {% block head %}
<title>Latest posts - {{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav() }}
<main class="flex flex-col gap-2">
{{ macros::timelines_nav(selected="all") }}
<!-- prettier-ignore -->
<div class="card w-full flex flex-col gap-2">
{% for post in list %}
{% if post[0].context.repost and post[0].context.repost.reposting %}
{{ components::repost(repost=post[3], post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true) }}
{% else %}
{{ components::post(post=post[0], owner=post[1], secondary=true, community=post[2]) }}
{% endif %}
{% endfor %}
{{ components::pagination(page=page, items=list|length) }}
</div>
</main>
{% endblock %}