From 92f2750a0db4e78b944885f8fe710b629d67a372 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 17 Feb 2024 16:45:50 +0000 Subject: [PATCH] Made a route that shows everything, all at once --- web/src/pages/all.astro | 192 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 web/src/pages/all.astro diff --git a/web/src/pages/all.astro b/web/src/pages/all.astro new file mode 100644 index 0000000..38d5129 --- /dev/null +++ b/web/src/pages/all.astro @@ -0,0 +1,192 @@ +--- + + +import Layout from '@layouts/Layout.astro'; +import Button from '@components/form/Button.astro'; +import Main from '@components/scafold/MainCard.astro'; +import ServiceList from '@components/things/ServiceList.astro'; +import type { AwesomePrivacy, Section, Service, ShortService } from '../types/Service'; +import { fetchData, slugify } from '@utils/fetch-data'; +import { parseMarkdown } from '@utils/parse-markdown'; + + +const categories = (await fetchData() as AwesomePrivacy).categories; + +--- + + + + +
+
+ + {categories.map((category) => ( +

+ {category.name} +

+ +
+ {category.sections.map((section: Section) => ( +
+

+ {section.name} +

+ +
+ ))} +
+ + ))} +
+ +
+ +
+ +