mirror of
https://github.com/svemagie/indiekit-endpoint-activitypub.git
synced 2026-04-02 15:44:58 +02:00
feat: relative timestamps in reader (Release 2)
Add Alpine.js directive x-relative-time that converts absolute dates to human-friendly relative strings: just now, 5m, 3h, 2d, Mar 3. Updates every 60s for posts less than 24h old. Server-rendered absolute time stays as no-JS fallback and hover tooltip. Applied to item cards, quote embeds, and notification cards. Bump version to 2.5.2. Confab-Link: http://localhost:8080/sessions/e9d666ac-3c90-4298-9e92-9ac9d142bc06
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
|
||||
{# Timestamp #}
|
||||
{% if item.published %}
|
||||
<time datetime="{{ item.published }}" class="ap-notification__time">
|
||||
<time datetime="{{ item.published }}" class="ap-notification__time" x-data x-relative-time>
|
||||
{{ item.published | date("PPp") }}
|
||||
</time>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user