Experiments with time
All checks were successful
/ weblog.lol (push) Successful in 9s

This commit is contained in:
Gordon Pedersen 2024-05-07 11:28:33 +10:00
parent fdd8794932
commit a7c55f7604
3 changed files with 14 additions and 5 deletions

View file

@ -36,8 +36,8 @@ Next page template: <span class="next-page"><a href="$next_page">Next Page →</
; You can use a timezone value from the "TZ database name" column on this ; You can use a timezone value from the "TZ database name" column on this
; web page: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones ; web page: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
Timezone: UTC Timezone: Australia/Melbourne
Date format: F j, Y g:i A Date format: Y-m-d\TH:i:sO
;; Feeds ;; Feeds

View file

@ -17,10 +17,10 @@
<main> <main>
<article> <article>
{body}
<aside class="post-info"> <aside class="post-info">
<i class="fa-solid fa-clock"></i> {date} <i class="fa-solid fa-clock"></i> <time class="dt-published" datetime="{date}">{date}</time>
</aside> </aside>
{body}
<aside class="post-tags"> <aside class="post-tags">
{tags} {tags}
</aside> </aside>
@ -38,5 +38,13 @@
<p>Made with <a href="https://weblog.lol">weblog.lol</a>.</p> <p>Made with <a href="https://weblog.lol">weblog.lol</a>.</p>
</footer> </footer>
<script src="https://cdn.jsdelivr.net/npm/luxon/build/global/luxon.min.js" crossorigin="anonymous"></script>
<script>
document.querySelectorAll('time:not(.dt-start):not(.dt-end)').forEach(time => {
const datetime = luxon.DateTime.fromISO(time.getAttribute('datetime'))
time.innerText = datetime.toRelative()
});
</script>
</body> </body>
</html> </html>

View file

@ -1,6 +1,7 @@
--- ---
date: 2011-03-03 date: 2011-03-03
Location: /B1.01/pro-tanto location: /B1.01/pro-tanto
title: B1.01 Pro Tanto
--- ---
# Pro Tanto # Pro Tanto