add timestamp macro

This commit is contained in:
2025-06-30 17:11:24 +03:00
parent a95200caf9
commit 19bf98f5b5
5 changed files with 16 additions and 5 deletions

View File

@ -1,4 +1,4 @@
{% from 'common/macros.html' import pager %}
{% from 'common/macros.html' import pager, timestamp %}
{% extends "base.html" %}
{% block title %}browsing topic {{ topic['name'] }}{% endblock %}
{% block content %}
@ -30,11 +30,11 @@
<span>
<span class="thread-title"><a href="{{ url_for("threads.thread", slug=thread['slug']) }}">{{thread['title']}}</a></span>
&bullet;
Started by <a href="{{ url_for("users.page", username=thread['started_by']) }}">{{ thread['started_by'] }}</a> on ...
Started by <a href="{{ url_for("users.page", username=thread['started_by']) }}">{{ thread['started_by'] }}</a> on {{ timestamp(thread['created_at'])}}
</span>
<span>
Latest post by <a href="{{ url_for("users.page", username=thread['latest_post_username']) }}">{{ thread['latest_post_username'] }}</a>
on ...
on <a href="{{ url_for("threads.thread", slug=thread['slug']) }}">on {{ timestamp(thread['latest_post_created_at'] )}}</a>:
</span>
<span class="thread-info-post-preview">
{{ thread['latest_post_content'] }}