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