web/src/pages/changelog.astro

97 lines · 2376 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				<h2>Changelog</h2>
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	h2 {
68		font-size: var(--text-3xl);
69		margin: 0;
70	}
71	.rss-link {
72		display: inline-flex;
73		align-items: center;
74		gap: var(--space-xs);
75		font-family: var(--font-subtitle);
76		font-size: var(--text-sm);
77		font-weight: bold;
78		text-decoration: none;
79		color: var(--accent-fg);
80		background: var(--accent-3);
81		border: var(--border-light);
82		box-shadow: var(--shadow-sm);
83		padding: var(--space-xs) var(--space-md);
84		transition: var(--transition-normal);
85		&:hover {
86			box-shadow: var(--shadow-sm-hover);
87		}
88	}
89	p {
90		font-size: var(--text-md);
91		margin: 0 0 var(--space-md) 0;
92	}
93	.fallback {
94		text-align: center;
95		opacity: var(--opacity-muted);
96	}
97</style>