web/src/pages/changelog.astro

98 lines · 2415 bytes

 1---
 2import Layout from '@layouts/Layout.astro';
 3import Main from '@components/scafold/MainCard.astro';
 4import ChangelogTimeline from '@components/things/ChangelogTimeline.svelte';
 5import { fetchChangelog } from '@utils/fetch-changelog';
 6
 7const changelog = await fetchChangelog();
 8---
 9
10<Layout
11	title="Changelog | Awesome Privacy"
12	description="A transparent log of all additions, removals, and amendments to the Awesome Privacy list."
13>
14	<div class="changelog-page">
15		<Main>
16			<div class="changelog-head">
17				<h1>Changelog</h1>
18				<a
19					class="rss-link"
20					href="/rss.xml"
21					type="application/rss+xml"
22					title="Subscribe to the changelog RSS feed"
23				>
24					<svg
25						aria-hidden="true"
26						viewBox="0 0 24 24"
27						width="16"
28						height="16"
29						fill="currentColor"
30					>
31						<path
32							d="M4 11a9 9 0 0 1 9 9h-3a6 6 0 0 0-6-6v-3zm0-7a16 16 0 0 1 16 16h-3A13 13 0 0 0 4 7V4zm2.5 13a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z"
33						></path>
34					</svg>
35					RSS feed
36				</a>
37			</div>
38			<p>
39				All data in awesome-privacy is managed via Git, so that we have a
40				complete and transparent changelog of exactly what was added when and by
41				whom. The corresponding PR for each change contains full details and
42				justifications.
43			</p>
44			{
45				changelog.entries.length > 0 ? (
46					<ChangelogTimeline
47						client:load
48						entries={changelog.entries}
49						rejections={changelog.rejections || []}
50					/>
51				) : (
52					<p class="fallback">Changelog data is currently unavailable.</p>
53				)
54			}
55		</Main>
56	</div>
57</Layout>
58
59<style lang="scss">
60	.changelog-head {
61		display: flex;
62		justify-content: space-between;
63		align-items: center;
64		gap: var(--space-md);
65		flex-wrap: wrap;
66	}
67	h1 {
68		font-family: var(--font-subtitle);
69		font-size: var(--text-3xl);
70		margin: 0;
71	}
72	.rss-link {
73		display: inline-flex;
74		align-items: center;
75		gap: var(--space-xs);
76		font-family: var(--font-subtitle);
77		font-size: var(--text-sm);
78		font-weight: bold;
79		text-decoration: none;
80		color: var(--accent-3-fg);
81		background: var(--accent-3);
82		border: var(--border-light);
83		box-shadow: var(--shadow-sm);
84		padding: var(--space-xs) var(--space-md);
85		transition: var(--transition-normal);
86		&:hover {
87			box-shadow: var(--shadow-sm-hover);
88		}
89	}
90	p {
91		font-size: var(--text-md);
92		margin: 0 0 var(--space-md) 0;
93	}
94	.fallback {
95		text-align: center;
96		opacity: var(--opacity-muted);
97	}
98</style>