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() {
2727
2828const pages = await fetchData().then((data) => {
2929 const results: Array<Props> = [];
30 if (!data || !data.categories) return results;
3031 (data as AwesomePrivacy).categories.forEach((category) => {
3132 const sections = category.sections.map((section) => ({
3233 slug: `${slugify(category.name)}/${slugify(section.name)}`,
@@ -205,10 +206,18 @@ h2 {
205206 }
206207 }
207208 }
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) {
209217 list-style: circle;
210218 padding-left: 1rem;
211219 font-size: 0.9rem;
220 opacity: 0.7;
212221 li {
213222 margin-bottom: 0.25rem;
214223 :global(p) {
web/src/pages/all.astro +19 −3
@@ -8,9 +8,9 @@ import ServiceList from '@components/things/ServiceList.astro';
88import type { AwesomePrivacy, Section, Service, ShortService } from '../types/Service';
99import { fetchData, slugify } from '@utils/fetch-data';
1010import { parseMarkdown } from '@utils/parse-markdown';
11import FontAwesome from '@components/form/FontAwesome.svelte';
1112
12
13const categories = (await fetchData() as AwesomePrivacy).categories;
13const categories = (await fetchData() as AwesomePrivacy)?.categories || [];
1414
1515---
1616
@@ -39,6 +39,7 @@ const toggleSidebar = () => {
3939 <button id="toggle-sidebar">Show Contents</button>
4040 {categories.map((category) => (
4141 <h2 id={`${slugify(category.name)}`}>
42 <FontAwesome iconName={slugify(category.name)} />
4243 <a href={`/${slugify(category.name)}`}>{category.name}</a>
4344 </h2>
4445
@@ -48,7 +49,13 @@ const toggleSidebar = () => {
4849 <h3 id={`${slugify(category.name)}-${slugify(section.name)}`}>
4950 <a href={`/${slugify(category.name)}/${slugify(section.name)}`}>{section.name}</a>
5051 </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 />
5259 </section>
5360 ))}
5461 </article>
@@ -167,10 +174,19 @@ h2 {
167174 font-size: 3rem;
168175 text-align: center;
169176 opacity: 0.6;
177 display: flex;
178 justify-content: center;
179 align-items: center;
180 gap: 1rem;
170181 a {
171182 color: var(--accent-3);
172183 text-decoration: none;
173184 }
185 :global(svg) {
186 width: 3rem;
187 height: 3rem;
188 color: var(--accent-3);
189 }
174190}
175191
176192h3 {