add user posts view

This commit is contained in:
2026-04-29 02:06:41 +03:00
parent afdf182bd1
commit d5e627ed7f
6 changed files with 81 additions and 17 deletions

View File

@@ -1,7 +1,6 @@
{%- from 'common/icons.html' import icn_info, icn_warn, icn_error, icn_bookmark -%}
{% macro timestamp(unix_ts) -%}
{#<span class="timestamp" data-utc="{{ unix_ts }}">{{ unix_ts | ts_datetime('%Y-%m-%d %H:%M')}} <abbr title="Server Time">ST</abbr></span>#}
<time datetime="{{ unix_ts | iso8601 }}">{{ unix_ts | ts_datetime('%Y-%m-%d %H:%M')}} <abbr title="Server Time">ST</abbr></time>
{%- endmacro %}
@@ -114,7 +113,7 @@
{% macro full_post(
post, render_sig=true, is_latest=false,
show_toolbar=true, is_editing=false, thread=none,
show_reactions=true
show_reactions=true, show_thread=false
) -%}
{%- if is_logged_in() -%}
{%- set can_delete = post.user_id == get_active_user().id or is_mod() -%}
@@ -143,13 +142,18 @@
</div>
<div class="post-content">
<div class="plank even minimal secondary-bg no-shadow post-info">
<a href="{{get_post_url(post.id, _anchor=true)}}">
{%- if post.edited_at <= post.created_at -%}
<i>Posted on {{timestamp(post.created_at)}}</i>
{%- else -%}
<i>Edited on {{timestamp(post.edited_at)}}</i>
<span>
<a href="{{get_post_url(post.id, _anchor=true)}}">
{%- if post.edited_at <= post.created_at -%}
<i>Posted on {{timestamp(post.created_at)}}</i>
{%- else -%}
<i>Edited on {{timestamp(post.edited_at)}}</i>
{%- endif -%}
</a>
{%- if show_thread -%}
<span> in thread <a href="{{url_for('threads.thread_by_id', thread_id=post.thread_id)}}"> {{post.thread_title}}</a></span>
{%- endif -%}
</a>
</span>
{%- if show_toolbar -%}
<span class="thread-actions">
{%- if owns -%}