add: communities list page

TODO(ui): implement community creation, community viewing, community posting
TODO(ui): implement profile following, followers, and posts feed
This commit is contained in:
trisua 2025-03-27 18:10:47 -04:00
parent 5cfca49793
commit d6fbfc3cd6
28 changed files with 497 additions and 313 deletions

View file

@ -0,0 +1,30 @@
{% import "macros.html" as macros %} {% extends "root.html" %} {% block head %}
<title>My communities - {{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav(selected="communities") }}
<main class="flex flex-col gap-2">
<div class="card-nest">
<div class="card">
<b>{{ text "communities:label.create_new" }}</b>
</div>
<form class="card flex flex-col gap-2">
<div class="flex flex-col gap-1">
<label for="">{{ text "communities:label.name" }}</label>
<input
type="text"
name="title"
id="title"
placeholder="name"
required
minlength="2"
maxlength="32"
/>
</div>
<button class="primary">
{{ text "communities:action.create" }}
</button>
</form>
</div>
</main>
{% endblock %}

View file

@ -14,11 +14,29 @@
{{ icon "house" }}
<span class="desktop">{{ text "general:link.home" }}</span>
</a>
<a
href="/communities"
class="button {% if selected == 'communities' %}active{% endif %}"
>
{{ icon "book-heart" }}
<span class="desktop"
>{{ text "general:link.communities" }}</span
>
</a>
{% endif %}
</div>
<div class="flex nav_side">
{% if user %}
<a href="/notifs" class="button" title="Notifications">
{{ icon "bell" }} {% if user.notification_count > 0 %}
<span class="notification tr"
>{{ user.notification_count }}</span
>
{% endif %}
</a>
<div class="dropdown">
<!-- prettier-ignore -->
<button
@ -34,7 +52,7 @@
<div class="inner">
<b class="title">{{ user.username }}</b>
<a href="/user/{{ user.username }}">
{{ icon "book-heart" }}
{{ icon "circle-user-round" }}
<span>{{ text "auth:link.my_profile" }}</span>
</a>

View file

@ -1,6 +1,6 @@
{% import "macros.html" as macros %} {% extends "root.html" %} {% block head %}
<title>{{ error_text }} - Tetratto</title>
{% endblock %} {% block body %} {{ macros::nav(selected="home") }}
<title>{{ error_text }} - {{ config.name }}</title>
{% endblock %} {% block body %} {{ macros::nav() }}
<main class="flex flex-col gap-2">
<div class="card-nest">
<div class="card">