moved some stuff around and made luxon local
All checks were successful
/ weblog.lol (push) Successful in 13s
All checks were successful
/ weblog.lol (push) Successful in 13s
This commit is contained in:
parent
c4649e2386
commit
8942d2b4f3
8 changed files with 112 additions and 93 deletions
|
@ -18,9 +18,9 @@
|
||||||
</header>
|
</header>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main class="weblog">
|
<main class="weblog">
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
<aside class="post-info">
|
<aside class="post-info">
|
||||||
<a href="{location}"><i class="fa-solid fa-clock"></i> <time class="dt-published" datetime="{date}">{date}</time></a>
|
<a href="{location}"><i class="fa-solid fa-clock"></i> <time class="dt-published" datetime="{date}">{date}</time></a>
|
||||||
</aside>
|
</aside>
|
||||||
|
@ -33,29 +33,28 @@
|
||||||
<aside class="post-tags">
|
<aside class="post-tags">
|
||||||
{tags}
|
{tags}
|
||||||
</aside>
|
</aside>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<h2>Recent posts</h2>
|
<h2>Recent posts</h2>
|
||||||
|
{recent-posts}
|
||||||
|
|
||||||
{recent-posts}
|
</main>
|
||||||
|
|
||||||
</main>
|
<footer>
|
||||||
|
|
||||||
<footer>
|
|
||||||
<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 src="/js/luxon.min.js" crossorigin="anonymous"></script>
|
||||||
<script src="/fediverse.js"></script>
|
<script src="/js/fediverse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
document.querySelectorAll('time:not(.dt-start):not(.dt-end)').forEach(time => {
|
document.querySelectorAll('time:not(.dt-start):not(.dt-end)').forEach(time => {
|
||||||
const datetime = luxon.DateTime.fromISO(time.getAttribute('datetime'))
|
const datetime = luxon.DateTime.fromISO(time.getAttribute('datetime'))
|
||||||
time.innerText = datetime.toRelative()
|
time.innerText = datetime.toRelative()
|
||||||
});
|
});
|
||||||
fediverse()
|
fediverse()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
1
js/luxon.min.js
vendored
Symbolic link
1
js/luxon.min.js
vendored
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
./weblog/B0. Template/luxon.min.js.md
|
|
@ -2,7 +2,7 @@
|
||||||
Type: file
|
Type: file
|
||||||
Content-Type: application/javascript
|
Content-Type: application/javascript
|
||||||
Title: Fediverse script
|
Title: Fediverse script
|
||||||
Location: /fediverse.js
|
Location: /js/fediverse.js
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
const SUBSCRIBE_LINK_REL = 'http://ostatus.org/schema/1.0/subscribe'
|
const SUBSCRIBE_LINK_REL = 'http://ostatus.org/schema/1.0/subscribe'
|
8
weblog/B0. Template/js/luxon.min.js.md
Normal file
8
weblog/B0. Template/js/luxon.min.js.md
Normal file
File diff suppressed because one or more lines are too long
|
@ -12,39 +12,39 @@ Title: Landing Page Template
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<header>
|
<header>
|
||||||
<img class="avatar" src="https://cdn.some.pics/deathau/663da4619fdb6.svg" alt="My avatar — A pixelated self-portrait in the style of the 'bitizens' in the mobile game Tiny Tower">
|
<img class="avatar" src="https://cdn.some.pics/deathau/663da4619fdb6.svg" alt="My avatar — A pixelated self-portrait in the style of the 'bitizens' in the mobile game Tiny Tower" />
|
||||||
<h1 class="weblog-title"><a href="{base-path}">{weblog-title}</a></h1>
|
<h1 class="weblog-title"><a href="{base-path}">{weblog-title}</a></h1>
|
||||||
{navigation}
|
{navigation}
|
||||||
<fedi-social></fedi-social>
|
<fedi-social></fedi-social>
|
||||||
</header>
|
</header>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main class="landing">
|
<main class="landing">
|
||||||
|
|
||||||
{body}
|
{body}
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
{next-page}
|
{next-page}
|
||||||
{previous-page}
|
{previous-page}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<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 src="/js/luxon.min.js" crossorigin="anonymous"></script>
|
||||||
<script src="/fediverse.js"></script>
|
<script src="/js/fediverse.js"></script>
|
||||||
<script>
|
<script>
|
||||||
document.querySelectorAll('time:not(.dt-start):not(.dt-end)').forEach(time => {
|
document.querySelectorAll('time:not(.dt-start):not(.dt-end)').forEach(time => {
|
||||||
const datetime = luxon.DateTime.fromISO(time.getAttribute('datetime'))
|
const datetime = luxon.DateTime.fromISO(time.getAttribute('datetime'))
|
||||||
time.innerText = datetime.toRelative()
|
time.innerText = datetime.toRelative()
|
||||||
})
|
})
|
||||||
fediverse()
|
fediverse()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -12,22 +12,33 @@ Title: Page Template
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<header>
|
<div class="header">
|
||||||
|
<header>
|
||||||
|
<img class="avatar" src="https://cdn.some.pics/deathau/663da4619fdb6.svg" alt="My avatar — A pixelated self-portrait in the style of the 'bitizens' in the mobile game Tiny Tower" />
|
||||||
<h1 class="weblog-title"><a href="{base-path}">{weblog-title}</a></h1>
|
<h1 class="weblog-title"><a href="{base-path}">{weblog-title}</a></h1>
|
||||||
{navigation}
|
{navigation}
|
||||||
</header>
|
<fedi-social></fedi-social>
|
||||||
|
</header>
|
||||||
|
</div>
|
||||||
|
|
||||||
<main class="page">
|
<main class="page">
|
||||||
|
{body}
|
||||||
|
<hr>
|
||||||
|
</main>
|
||||||
|
|
||||||
{body}
|
<footer>
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<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="/js/luxon.min.js" crossorigin="anonymous"></script>
|
||||||
|
<script src="/js/fediverse.js"></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()
|
||||||
|
})
|
||||||
|
fediverse()
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -2,16 +2,16 @@ Type: Template
|
||||||
Title: Post Template
|
Title: Post Template
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
<aside class="post-info">
|
<aside class="post-info">
|
||||||
<a href="{location}"><i class="fa-solid fa-clock"></i> <time class="dt-published" datetime="{date}">{date}</time></a>
|
<a href="{location}"><i class="fa-solid fa-clock"></i> <time class="dt-published" datetime="{date}">{date}</time></a>
|
||||||
</aside>
|
</aside>
|
||||||
<i data-emoji="{emoji}"></i>
|
<i data-emoji="{emoji}"></i>
|
||||||
{body}
|
{body}
|
||||||
<aside class="post-info">
|
<aside class="post-info">
|
||||||
<a class="status_url" href="{status_url}" target="_blank"><i class="omg-icon omg-prami"></i> via status.lol</a>
|
<a class="status_url" href="{status_url}" target="_blank"><i class="omg-icon omg-prami"></i> via status.lol</a>
|
||||||
<a class="external_url" href="{external_url}" target="_blank"><i class="omg-icon omg-fediverse"></i> Interact on the Fediverse</a>
|
<a class="external_url" href="{external_url}" target="_blank"><i class="omg-icon omg-fediverse"></i> Interact on the Fediverse</a>
|
||||||
</aside>
|
</aside>
|
||||||
<aside class="post-tags">
|
<aside class="post-tags">
|
||||||
{tags}
|
{tags}
|
||||||
</aside>
|
</aside>
|
||||||
</article>
|
</article>
|
Loading…
Reference in a new issue