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';
9import { fetchData } from '@utils/fetch-data'; 9import { fetchData } from '@utils/fetch-data';
10import Button from '@components/form/Button.astro'; 10import Button from '@components/form/Button.astro';
11 11
12const categories = (await fetchData()).categories; 12const categories = (await fetchData())?.categories || [];
13 13
14--- 14---
15 15
16<Layout title="Awesome Privacy" hideNav={true}> 16<Layout title="Awesome Privacy" hideNav={true}>
17 <Hero /> 17 <Hero />
18 <main> 18 <main>
19 <h2>Search</h2> 19 <h2>
20 <a href="/search">Search</a>
21 </h2>
20 <Search /> 22 <Search />
21 <h2 class="browse-title">Browse</h2> 23 <h2 class="browse-title"><a href="/browse">Browse</a></h2>
22 <ul class="categories"> 24 <ul class="categories">
23 {categories.map((category) => ( 25 {categories.map((category) => (
24 <li class="category"> 26 <li class="category">
@@ -27,8 +29,32 @@ const categories = (await fetchData()).categories;
27 ))} 29 ))}
28 </ul> 30 </ul>
29 <div class="view-all"> 31 <div class="view-all">
30 <Button url="/all" text="View All" /> 32 <span>Or, just</span>
33 <Button url="/all" text="View Everything" />
31 </div> 34 </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
32 </main> 58 </main>
33</Layout> 59</Layout>
34 60
@@ -41,15 +67,36 @@ const categories = (await fetchData()).categories;
41 font-size: 20px; 67 font-size: 20px;
42 line-height: 1.6; 68 line-height: 1.6;
43 .view-all { 69 .view-all {
44 width: 8rem; 70 text-align: center;
71 width: 16rem;
45 margin: 0 auto; 72 margin: 0 auto;
73 span {
74 opacity: 0.5;
75 font-size: 1rem;
76 }
46 } 77 }
47 } 78 }
48 h2 { 79 h2 {
49 font-size: 2.5rem; 80 font-size: 3rem;
50 color: var(--accent-3); 81 color: var(--accent-3);
51 font-family: "Lekton", sans-serif; 82 font-family: "Lekton", sans-serif;
52 text-align: center; 83 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;
53 } 100 }
54 101
55 .categories { 102 .categories {