Add a home template
All checks were successful
/ weblog.lol (push) Successful in 11s

This commit is contained in:
Gordon Pedersen 2024-05-13 13:52:37 +10:00
parent 7c882535b6
commit 5ffe61f1e5
4 changed files with 49 additions and 6 deletions

View file

@ -401,8 +401,8 @@ fedi-social i::before {
line-height: 48px;
}
main.page:has(>#details)::before,
main.page:has(>#details)::after {
main.home::before,
main.home::after {
content: '';
position: absolute;
left: -2px;
@ -416,12 +416,12 @@ main.page:has(>#details)::after {
border-radius: 1em;
}
main.page:has(>#details)::after {
main.home::after {
filter: blur(50px);
}
main.page:has(>#details){
main.home{
display: grid;
grid-template-columns: 1fr 0.95fr;
/* grid-template-rows: 1fr 1fr; */
@ -445,7 +445,7 @@ main.page:has(>#details){
}
@media (max-width:720px) {
main.page:has(>#details){
main.home{
display:flex;
}
#details {

View file

@ -0,0 +1,43 @@
Type: Template
Title: Home
<!DOCTYPE html>
<html lang="en">
<head>
<title>{weblog-title}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/styles.css?v0.0.3">
{feeds}
</head>
<body>
<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>
{navigation}
<fedi-social></fedi-social>
</header>
</div>
<main class="home">
{body}
</main>
<footer>
<p>Made with <a href="https://weblog.lol">weblog.lol</a>.</p>
</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>
</html>

View file

@ -1,6 +1,7 @@
---
type: page
location: /profile
template: Home
---
{profile}

View file

@ -1,7 +1,6 @@
---
type: page
location: /blog
template: Landing Page Template
---
{post-list}