web/src/pages/search/index.astro

55 lines · 1167 bytes

 1---
 2import Layout from '@layouts/Layout.astro';
 3import { fetchData } from '@utils/fetch-data';
 4
 5import Search from '@components/things/Search.svelte';
 6
 7const categories = (await fetchData())?.categories;
 8---
 9
10<Layout title="Search | Awesome Privacy">
11	<section>
12		<h1>Search</h1>
13		<Search client:visible data={categories} />
14		<p class="sitemap-link">
15			Browse <a href="/all">all listings</a>, or see all pages in the <a
16				href="/sitemap">Sitemap</a
17			>
18		</p>
19	</section>
20</Layout>
21
22<style lang="scss">
23	section {
24		display: flex;
25		flex-direction: column;
26		padding: 1rem;
27		box-shadow: 4px 4px 0 var(--box-outline);
28		background: var(--accent-fg);
29		border: 2px solid var(--box-outline);
30		border-radius: var(--curve-sm);
31		margin: 2rem auto;
32		padding: 1rem;
33		width: calc(100% - 5rem);
34		max-width: 1100px;
35		min-height: 80vh;
36
37		h1 {
38			font-size: 3rem;
39			color: var(--accent-3);
40			font-family: 'Lekton', sans-serif;
41			text-align: center;
42			margin: 1rem 0;
43		}
44		.sitemap-link {
45			opacity: 0.6;
46			text-align: center;
47			font-size: 0.8rem;
48			margin: 2rem auto;
49			transition: all 0.2s ease-in-out;
50			&:hover {
51				opacity: 0.8;
52			}
53		}
54	}
55</style>