aboutsummaryrefslogtreecommitdiffstats
path: root/templates/devtest
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-03-12 23:37:02 +0100
committerGitHub <noreply@github.com>2024-03-12 22:37:02 +0000
commit857243bed7f9dccdc597c2941df41e821781cb0f (patch)
tree2472a56ed5eff0f212a200d72ba707407c68097f /templates/devtest
parent225fc405283a21c9ef966aa0bf8dabfe687804a8 (diff)
downloadgitea-857243bed7f9dccdc597c2941df41e821781cb0f.tar.gz
gitea-857243bed7f9dccdc597c2941df41e821781cb0f.zip
Fix date rendering by adding `<gitea-absolute-date>` (#29725)
Alternative to: https://github.com/go-gitea/gitea/pull/29698 Fixes: https://github.com/go-gitea/gitea/issues/29034 <img width="278" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/12ecd967-2723-410d-8a28-a1b0f41b7bba"> It also fixes a secondary issue that we were showing timestamp tooltips over date, which makes no sense, so these are now gone as well: <img width="284" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/a70432f3-97b6-41e6-b202-b53b76924a66">
Diffstat (limited to 'templates/devtest')
-rw-r--r--templates/devtest/gitea-ui.tmpl10
1 files changed, 10 insertions, 0 deletions
diff --git a/templates/devtest/gitea-ui.tmpl b/templates/devtest/gitea-ui.tmpl
index ccf188609c..e551572b96 100644
--- a/templates/devtest/gitea-ui.tmpl
+++ b/templates/devtest/gitea-ui.tmpl
@@ -111,6 +111,16 @@
</div>
<div>
+ <h1>GiteaAbsoluteDate</h1>
+ <div><gitea-absolute-date date="2024-03-11" year="numeric" day="numeric" month="short"></gitea-absolute-date></div>
+ <div><gitea-absolute-date date="2024-03-11" year="numeric" day="numeric" month="long"></gitea-absolute-date></div>
+ <div><gitea-absolute-date date="2024-03-11" year="" day="numeric" month="numeric"></gitea-absolute-date></div>
+ <div><gitea-absolute-date date="2024-03-11" year="" day="numeric" month="numeric" weekday="long"></gitea-absolute-date></div>
+ <div><gitea-absolute-date date="2024-03-11T19:00:00-05:00" year="" day="numeric" month="numeric" weekday="long"></gitea-absolute-date></div>
+ <div class="tw-text-text-light-2">relative-time: <relative-time format="datetime" datetime="2024-03-11" year="" day="numeric" month="numeric"></relative-time></div>
+ </div>
+
+ <div>
<h1>LocaleNumber</h1>
<div>{{ctx.Locale.PrettyNumber 1}}</div>
<div>{{ctx.Locale.PrettyNumber 12}}</div>