add: questions timelines

This commit is contained in:
trisua 2025-04-13 12:15:14 -04:00
parent 5d53ceb09c
commit 063e33899e
22 changed files with 407 additions and 90 deletions

View file

@ -2,7 +2,8 @@
<title>Latest posts - {{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav() }}
<main class="flex flex-col gap-2">
{{ macros::timelines_nav(selected="all") }}
{{ macros::timelines_nav(selected="all") }} {{
macros::timelines_secondary_nav(posts="/all", questions="/all/questions") }}
<!-- prettier-ignore -->
<div class="card w-full flex flex-col gap-2">

View file

@ -0,0 +1,18 @@
{% extends "root.html" %} {% block head %}
<title>Latest questions - {{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav() }}
<main class="flex flex-col gap-2">
{{ macros::timelines_nav(selected="all") }} {{
macros::timelines_secondary_nav(posts="/all", questions="/all/questions",
selected="questions") }}
<!-- prettier-ignore -->
<div class="card w-full flex flex-col gap-2">
{% for question in list %}
{{ components::global_question(question=question, can_manage_questions=false, secondary=true) }}
{% endfor %}
{{ components::pagination(page=page, items=list|length) }}
</div>
</main>
{% endblock %}

View file

@ -2,7 +2,9 @@
<title>Following - {{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav() }}
<main class="flex flex-col gap-2">
{{ macros::timelines_nav(selected="following") }}
{{ macros::timelines_nav(selected="following") }} {{
macros::timelines_secondary_nav(posts="/following",
questions="/following/questions") }}
<!-- prettier-ignore -->
<div class="card w-full flex flex-col gap-2">

View file

@ -0,0 +1,18 @@
{% extends "root.html" %} {% block head %}
<title>Following (questions) - {{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav() }}
<main class="flex flex-col gap-2">
{{ macros::timelines_nav(selected="following") }} {{
macros::timelines_secondary_nav(posts="/following",
questions="/following/questions", selected="questions") }}
<!-- prettier-ignore -->
<div class="card w-full flex flex-col gap-2">
{% for question in list %}
{{ components::global_question(question=question, can_manage_questions=false, secondary=true) }}
{% endfor %}
{{ components::pagination(page=page, items=list|length) }}
</div>
</main>
{% endblock %}

View file

@ -3,7 +3,8 @@
{% endblock %} {% block body %} {{ macros::nav(selected="home") }}
<main class="flex flex-col gap-2">
<!-- prettier-ignore -->
{{ macros::timelines_nav(selected="home") }}
{{ macros::timelines_nav(selected="home") }} {{
macros::timelines_secondary_nav(posts="/", questions="/questions") }}
{% if list|length == 0 and page == 0 %}
<div class="card-nest">

View file

@ -0,0 +1,18 @@
{% extends "root.html" %} {% block head %}
<title>From my communities (questions) - {{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav() }}
<main class="flex flex-col gap-2">
{{ macros::timelines_nav(selected="home") }} {{
macros::timelines_secondary_nav(posts="/", questions="/questions",
selected="questions") }}
<!-- prettier-ignore -->
<div class="card w-full flex flex-col gap-2">
{% for question in list %}
{{ components::global_question(question=question, can_manage_questions=false, secondary=true) }}
{% endfor %}
{{ components::pagination(page=page, items=list|length) }}
</div>
</main>
{% endblock %}