Commit c872b612aa

c872b612aa30b59ee03808ae10a6a8f25605a9d1

parent: 09987b08da

Unsigned

Alicia Sykes <alicia@omg.lol> · 2024-02-18 19:35 UTC

Brought together everything for homepage

Layout: unified · split

web/src/pages/index.astro +53 −6
@@ -9,16 +9,18 @@ import SectionList from '@components/things/SectionList.astro';
99import { fetchData } from '@utils/fetch-data';
1010import Button from '@components/form/Button.astro';
1111
12const categories = (await fetchData()).categories;
12const categories = (await fetchData())?.categories || [];
1313
1414---
1515
1616<Layout title="Awesome Privacy" hideNav={true}>
1717 <Hero />
1818 <main>
19 <h2>Search</h2>
19 <h2>
20 <a href="/search">Search</a>
21 </h2>
2022 <Search />
21 <h2 class="browse-title">Browse</h2>
23 <h2 class="browse-title"><a href="/browse">Browse</a></h2>
2224 <ul class="categories">
2325 {categories.map((category) => (
2426 <li class="category">
@@ -27,8 +29,32 @@ const categories = (await fetchData()).categories;
2729 ))}
2830 </ul>
2931 <div class="view-all">
30 <Button url="/all" text="View All" />
32 <span>Or, just</span>
33 <Button url="/all" text="View Everything" />
3134 </div>
35 <h2>
36 <a href="/about">About</a>
37 </h2>
38 <div class="about-summary">
39 <p>
40 Awesome Privacy is a collection of privacy-respecting services and tools.
41 The aim is to help you escape big tech, and choose software that respects your privacy.
42 </p>
43 <p>
44 Noticed something that should be added / removed / ammended?
45 We're a community-driven resource, so welcome contributions of any nature.
46 All content and code is <a href="https://github.com/lissy93/awesome-privacy">open source</a>.
47 </p>
48 <p>
49 If you've found Awesome Privacy useful, help us out by sharing it with others,
50 contributing, or consider <a href="https://github.com/sponsors/lissy93">sponsoring me</a> on GitHub.
51 </p>
52 </div>
53 <div class="view-all">
54 <span>Want to learn more?</span>
55 <Button url="/about" text="Keep Reading..." />
56 </div>
57
3258 </main>
3359</Layout>
3460
@@ -41,15 +67,36 @@ const categories = (await fetchData()).categories;
4167 font-size: 20px;
4268 line-height: 1.6;
4369 .view-all {
44 width: 8rem;
70 text-align: center;
71 width: 16rem;
4572 margin: 0 auto;
73 span {
74 opacity: 0.5;
75 font-size: 1rem;
76 }
4677 }
4778 }
4879 h2 {
49 font-size: 2.5rem;
80 font-size: 3rem;
5081 color: var(--accent-3);
5182 font-family: "Lekton", sans-serif;
5283 text-align: center;
84 margin: 3rem 0 1rem 0;
85 a {
86 text-decoration: none;
87 color: var(--accent-3);
88 font-family: "Lekton", sans-serif;
89 }
90 }
91
92 .about-summary {
93 background: var(--accent-fg);
94 border: 2px solid var(--foreground);
95 border-radius: var(--curve-sm);
96 box-shadow: 4px 4px 0 var(--foreground);
97 padding: 1rem;
98 width: 85%;
99 margin: 0 auto;
53100 }
54101
55102 .categories {