eratic / sites / blog / src / pages / index.astro
106 words
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
import Base from '@eratic/core/layouts/Base.astro';
import EntryList from '@eratic/core/components/EntryList.astro';
import { allEntries, entryPath, entryKicker } from '../lib/entries';

const entries = await allEntries();

const listed = entries.map((entry) => ({
	path: entryPath(entry),
	title: entry.data.title,
	summary: entry.data.summary,
	pubDate: entry.data.pubDate,
	kicker: entryKicker(entry),
}));
---

<Base site="blog" path="/">
	<header class="intro">
		<h1>blog</h1>
		<p class="intro__text">Essays and photographs, in one feed.</p>
	</header>

	<EntryList entries={listed} empty="The first post is not written yet." />
</Base>

<style>
	.intro {
		margin-block: var(--space-xl) var(--space-2xl);
		display: flex;
		flex-direction: column;
		gap: var(--space-2xs);
	}

	.intro h1 {
		font-family: var(--font-prose);
		font-size: var(--step-4);
		font-weight: 600;
		line-height: 1.05;
		letter-spacing: -0.022em;
		font-optical-sizing: auto;
	}

	.intro__text {
		font-family: var(--font-prose);
		font-size: var(--step-1);
		color: var(--ink-muted);
		text-wrap: pretty;
	}
</style>

static mirror of HEAD · about · clone: git clone https://git.makefuture.ro/eratic.git