diff options
| author | Dennis Fink | 2026-11-18 19:18:18 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-18 19:18:18 +0100 |
| commit | beb0131b089293512c2dab2243b9b2ff314e2387 (patch) | |
| tree | 2690eaa17c689a77bccdc1268e971a96ec0e368f /webmentions_ssg/templates/sent.html | |
| parent | e3e195ea07fd57288d32c842689ebed7fba636f0 (diff) | |
| download | webmentions-ssg-beb0131b089293512c2dab2243b9b2ff314e2387.tar.gz webmentions-ssg-beb0131b089293512c2dab2243b9b2ff314e2387.zip | |
feat(core): show relative timestamps
Add reusable UTC template filters backed by `humanize` so timestamps
render as relative ages while preserving machine-readable `<time
datetime>` values.
Keep exact UTC timestamps available in tooltips across dashboard,
received, sent, detail, and public status views.
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/templates/sent.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/webmentions_ssg/templates/sent.html b/webmentions_ssg/templates/sent.html index d949f01..d2a319d 100644 --- a/webmentions_ssg/templates/sent.html +++ b/webmentions_ssg/templates/sent.html @@ -58,13 +58,15 @@ SPDX-License-Identifier: BSD-3-Clause <td>{{ source.sent_webmentions | length }}</td> <td class="d-none d-md-table-cell">{{ source.revision }}</td> <td class="text-nowrap d-none d-md-table-cell"> - <time datetime="{{ source.created_at.isoformat() }}"> - {{ source.created_at.strftime("%Y-%m-%d %H:%M:%S") }} + <time datetime="{{ source.created_at | utc_isoformat }}" + title="{{ source.created_at | utc_timestamp }}"> + {{ source.created_at | relative_time }} </time> </td> <td class="text-nowrap d-none d-md-table-cell"> - <time datetime="{{ source.last_seen_at.isoformat() }}"> - {{ source.last_seen_at.strftime("%Y-%m-%d %H:%M:%S") }} + <time datetime="{{ source.last_seen_at | utc_isoformat }}" + title="{{ source.last_seen_at | utc_timestamp }}"> + {{ source.last_seen_at | relative_time }} </time> </td> <td> |
