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/dashboard.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/dashboard.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/webmentions_ssg/templates/dashboard.html b/webmentions_ssg/templates/dashboard.html index 70e2bf0..b020d46 100644 --- a/webmentions_ssg/templates/dashboard.html +++ b/webmentions_ssg/templates/dashboard.html @@ -118,8 +118,10 @@ SPDX-License-Identifier: BSD-3-Clause <div class="card-body"> <h3 class="h6 text-body-secondary">Last completed source scan</h3> {% if last_scan %} - <time datetime="{{ last_scan.isoformat() }}" class="fs-5"> - {{ last_scan.strftime("%Y-%m-%d %H:%M:%S") }} UTC + <time datetime="{{ last_scan | utc_isoformat }}" + class="fs-5" + title="{{ last_scan | utc_timestamp }}"> + {{ last_scan | relative_time }} </time> {% else %} <p class="text-body-secondary mb-0">No completed scan yet</p> |
