add: profile is_verified

add: better profile not found page
TODO: use error page for fallback service
This commit is contained in:
trisua 2025-03-26 21:46:21 -04:00
parent 7d96a3d20f
commit 5cfca49793
13 changed files with 234 additions and 20 deletions

View file

@ -324,6 +324,10 @@ table ol {
border-radius: var(--radius);
}
.card.small {
padding: 0.5rem 1rem;
}
.card.secondary {
background: var(--color-surface);
}

View file

@ -0,0 +1,21 @@
{% import "macros.html" as macros %} {% extends "root.html" %} {% block head %}
<title>{{ error_text }} - Tetratto</title>
{% endblock %} {% block body %} {{ macros::nav(selected="home") }}
<main class="flex flex-col gap-2">
<div class="card-nest">
<div class="card">
<b>Error! 😦</b>
</div>
<div class="card flex flex-col gap-4">
<p>{{ error_text }}</p>
<div class="w-full flex gap-2">
<a class="button primary" href="/">Home</a>
<a class="button secondary" href="javascript:history.back()"
>Back</a
>
</div>
</div>
</div>
</main>
{% endblock %}

View file

@ -13,10 +13,19 @@
{{ macros::avatar(username=profile.username,size="72px")
}}
<div class="flex flex-col">
<h3 id="username">
{% if profile.settings.display_name %} {{
profile.settings.display_name }} {% else %} {{
profile.username }} {% endif %}
<!-- prettier-ignore -->
<h3 id="username" class="username">
{% if profile.settings.display_name %}
{{ profile.settings.display_name }}
{% else %}
{{ profile.username }}
{% endif %}
{% if profile.is_verified %}
<span title="Verified">
{{ icon "badge-check" }}
</span>
{% endif %}
</h3>
<span class="fade">{{ profile.username }}</span>
@ -24,23 +33,25 @@
</div>
<div class="card flex" id="social">
<div
<a
href="/user/{{ profile.username }}/followers"
class="w-full flex justify-center items-center gap-2"
>
<h4>{{ profile.follower_count }}</h4>
<span>{{ text "auth:label.followers" }}</span>
</div>
<div
</a>
<a
href="/user/{{ profile.username }}/following"
class="w-full flex justify-center items-center gap-2"
>
<h4>{{ profile.following_count }}</h4>
<span>{{ text "auth:label.following" }}</span>
</div>
</a>
</div>
</div>
<div class="card-nest flex flex-col">
<div id="bio" class="card">
<div id="bio" class="card small">
{{ profile.settings.biography }}
</div>
@ -64,7 +75,7 @@
</div>
<div class="card-nest">
<div class="card flex gap-2 items-center">
<div class="card small flex gap-2 items-center">
{{ icon "users-round" }}
<span>{{ text "auth:label.joined_journals" }}</span>
</div>