Commit e543ccbbd1

e543ccbbd1d1bb8ddf1723cfde3cbddba6e0cb41

parent: 5f0c95eb75

Unsigned

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

Finished item list page and all

Layout: unified · split

web/src/pages/[...section].astro +10 −1
@@ -27,6 +27,7 @@ export async function getStaticPaths() {
27 27
28const pages = await fetchData().then((data) => { 28const pages = await fetchData().then((data) => {
29 const results: Array<Props> = []; 29 const results: Array<Props> = [];
30 if (!data || !data.categories) return results;
30 (data as AwesomePrivacy).categories.forEach((category) => { 31 (data as AwesomePrivacy).categories.forEach((category) => {
31 const sections = category.sections.map((section) => ({ 32 const sections = category.sections.map((section) => ({
32 slug: `${slugify(category.name)}/${slugify(section.name)}`, 33 slug: `${slugify(category.name)}/${slugify(section.name)}`,
@@ -205,10 +206,18 @@ h2 {
205 } 206 }
206 } 207 }
207 } 208 }
208 ul { 209 :global(strong) {
210 font-weight: 500;
211 }
212 :global(h4) {
213 font-size: 1.2rem;
214 margin: 0.5rem 0 0 0;
215 }
216 :global(ul) {
209 list-style: circle; 217 list-style: circle;
210 padding-left: 1rem; 218 padding-left: 1rem;
211 font-size: 0.9rem; 219 font-size: 0.9rem;
220 opacity: 0.7;
212 li { 221 li {
213 margin-bottom: 0.25rem; 222 margin-bottom: 0.25rem;
214 :global(p) { 223 :global(p) {
web/src/pages/all.astro +19 −3
@@ -8,9 +8,9 @@ import ServiceList from '@components/things/ServiceList.astro';
8import type { AwesomePrivacy, Section, Service, ShortService } from '../types/Service'; 8import type { AwesomePrivacy, Section, Service, ShortService } from '../types/Service';
9import { fetchData, slugify } from '@utils/fetch-data'; 9import { fetchData, slugify } from '@utils/fetch-data';
10import { parseMarkdown } from '@utils/parse-markdown'; 10import { parseMarkdown } from '@utils/parse-markdown';
11import FontAwesome from '@components/form/FontAwesome.svelte';
11 12
12 13const categories = (await fetchData() as AwesomePrivacy)?.categories || [];
13const categories = (await fetchData() as AwesomePrivacy).categories;
14 14
15--- 15---
16 16
@@ -39,6 +39,7 @@ const toggleSidebar = () => {
39 <button id="toggle-sidebar">Show Contents</button> 39 <button id="toggle-sidebar">Show Contents</button>
40 {categories.map((category) => ( 40 {categories.map((category) => (
41 <h2 id={`${slugify(category.name)}`}> 41 <h2 id={`${slugify(category.name)}`}>
42 <FontAwesome iconName={slugify(category.name)} />
42 <a href={`/${slugify(category.name)}`}>{category.name}</a> 43 <a href={`/${slugify(category.name)}`}>{category.name}</a>
43 </h2> 44 </h2>
44 45
@@ -48,7 +49,13 @@ const toggleSidebar = () => {
48 <h3 id={`${slugify(category.name)}-${slugify(section.name)}`}> 49 <h3 id={`${slugify(category.name)}-${slugify(section.name)}`}>
49 <a href={`/${slugify(category.name)}/${slugify(section.name)}`}>{section.name}</a> 50 <a href={`/${slugify(category.name)}/${slugify(section.name)}`}>{section.name}</a>
50 </h3> 51 </h3>
51 <ServiceList title={section.name} services={section.services} subHeading={true} buttonLink={`/${slugify(category.name)}/${slugify(section.name)}`} /> 52 <ServiceList
53 title={section.name}
54 services={section.services}
55 subHeading={true}
56 buttonLink={`/${slugify(category.name)}/${slugify(section.name)}`}
57 noGitHubMetrics={true}
58 />
52 </section> 59 </section>
53 ))} 60 ))}
54 </article> 61 </article>
@@ -167,10 +174,19 @@ h2 {
167 font-size: 3rem; 174 font-size: 3rem;
168 text-align: center; 175 text-align: center;
169 opacity: 0.6; 176 opacity: 0.6;
177 display: flex;
178 justify-content: center;
179 align-items: center;
180 gap: 1rem;
170 a { 181 a {
171 color: var(--accent-3); 182 color: var(--accent-3);
172 text-decoration: none; 183 text-decoration: none;
173 } 184 }
185 :global(svg) {
186 width: 3rem;
187 height: 3rem;
188 color: var(--accent-3);
189 }
174} 190}
175 191
176h3 { 192h3 {