Commit e543ccbbd1
Unsigned
Layout: unified · split
web/src/pages/[...section].astro +10 −1
| @@ -27,6 +27,7 @@ export async function getStaticPaths() { | ||
| 27 | 27 | |
| 28 | 28 | const pages = await fetchData().then((data) => { |
| 29 | 29 | const results: Array<Props> = []; |
| 30 | if (!data || !data.categories) return results; | |
| 30 | 31 | (data as AwesomePrivacy).categories.forEach((category) => { |
| 31 | 32 | const sections = category.sections.map((section) => ({ |
| 32 | 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 | 217 | list-style: circle; |
| 210 | 218 | padding-left: 1rem; |
| 211 | 219 | font-size: 0.9rem; |
| 220 | opacity: 0.7; | |
| 212 | 221 | li { |
| 213 | 222 | margin-bottom: 0.25rem; |
| 214 | 223 | :global(p) { |
web/src/pages/all.astro +19 −3
| @@ -8,9 +8,9 @@ import ServiceList from '@components/things/ServiceList.astro'; | ||
| 8 | 8 | import type { AwesomePrivacy, Section, Service, ShortService } from '../types/Service'; |
| 9 | 9 | import { fetchData, slugify } from '@utils/fetch-data'; |
| 10 | 10 | import { parseMarkdown } from '@utils/parse-markdown'; |
| 11 | import FontAwesome from '@components/form/FontAwesome.svelte'; | |
| 11 | 12 | |
| 12 | ||
| 13 | const categories = (await fetchData() as AwesomePrivacy).categories; | |
| 13 | const categories = (await fetchData() as AwesomePrivacy)?.categories || []; | |
| 14 | 14 | |
| 15 | 15 | --- |
| 16 | 16 | |
| @@ -39,6 +39,7 @@ const toggleSidebar = () => { | ||
| 39 | 39 | <button id="toggle-sidebar">Show Contents</button> |
| 40 | 40 | {categories.map((category) => ( |
| 41 | 41 | <h2 id={`${slugify(category.name)}`}> |
| 42 | <FontAwesome iconName={slugify(category.name)} /> | |
| 42 | 43 | <a href={`/${slugify(category.name)}`}>{category.name}</a> |
| 43 | 44 | </h2> |
| 44 | 45 | |
| @@ -48,7 +49,13 @@ const toggleSidebar = () => { | ||
| 48 | 49 | <h3 id={`${slugify(category.name)}-${slugify(section.name)}`}> |
| 49 | 50 | <a href={`/${slugify(category.name)}/${slugify(section.name)}`}>{section.name}</a> |
| 50 | 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 | 59 | </section> |
| 53 | 60 | ))} |
| 54 | 61 | </article> |
| @@ -167,10 +174,19 @@ h2 { | ||
| 167 | 174 | font-size: 3rem; |
| 168 | 175 | text-align: center; |
| 169 | 176 | opacity: 0.6; |
| 177 | display: flex; | |
| 178 | justify-content: center; | |
| 179 | align-items: center; | |
| 180 | gap: 1rem; | |
| 170 | 181 | a { |
| 171 | 182 | color: var(--accent-3); |
| 172 | 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 | |
| 176 | 192 | h3 { |