From 76e405c175edef43b610ce508b106b609212067a Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Fri, 14 Aug 2026 11:54:18 -1000 Subject: Wrap the dates in time elements --- source/ui-commit.c | 6 ++++-- source/ui-shared.c | 15 ++++++++++++--- source/ui-tag.c | 7 +++++-- 3 files changed, 21 insertions(+), 7 deletions(-) (limited to 'source') diff --git a/source/ui-commit.c b/source/ui-commit.c index 4838210..5a71954 100644 --- a/source/ui-commit.c +++ b/source/ui-commit.c @@ -34,9 +34,11 @@ static void print_ident_row(const char *role, const char *name, html_txt(email); } cgit_close_filter(ctx.repo->email_filter); - html(""); + html("\n"); } static int print_parent_rows(struct commit *commit, const char *rev, diff --git a/source/ui-shared.c b/source/ui-shared.c index 7a2255e..1f45520 100644 --- a/source/ui-shared.c +++ b/source/ui-shared.c @@ -289,9 +289,16 @@ static struct date_mode configured_date_mode(void) return mode; } +/* + * Dates render as time elements, whose datetime attribute wants the strict + * ISO 8601 form with the T separator rather than the space git prints by + * default. + */ static void print_abs_date(time_t t, int tz) { - html(""); html_txt(show_date(t, tz, configured_date_mode())); @@ -301,9 +308,11 @@ static void print_abs_date(time_t t, int tz) static void print_rel_date(time_t t, int tz, double count, const char *class, const char *suffix) { - htmlf("%.0f %s", count, suffix); + htmlf("'>%.0f %s", count, suffix); } static char *http_date(time_t t) diff --git a/source/ui-tag.c b/source/ui-tag.c index 7020ed7..8bfbd8e 100644 --- a/source/ui-tag.c +++ b/source/ui-tag.c @@ -75,10 +75,13 @@ static void print_annotated_tag(const char *revname, html_txt(revname); htmlf(" (%s)\n", oid_to_hex(oid)); if (info->tagger_date > 0) { - html("tag date"); + html("tag date\n"); } if (info->tagger) { html("tagged by"); -- cgit v2.8.0