From 0889d4487a9970530f6e915a93ea620f821884ce Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 17 Feb 2024 16:44:19 +0000 Subject: [PATCH] Compentized common functionalities --- web/src/components/things/SectionList.astro | 73 +++++++++++++ web/src/components/things/ServiceList.astro | 111 ++++++++++++++++++++ 2 files changed, 184 insertions(+) create mode 100644 web/src/components/things/SectionList.astro create mode 100644 web/src/components/things/ServiceList.astro diff --git a/web/src/components/things/SectionList.astro b/web/src/components/things/SectionList.astro new file mode 100644 index 0000000..4630f1f --- /dev/null +++ b/web/src/components/things/SectionList.astro @@ -0,0 +1,73 @@ +--- + +import { slugify } from '../../utils/fetch-data'; + +import type { Section } from '../../types/Service'; + +interface Props { + title: string; + sections: Section[]; + bigTitle?: boolean; +} + +const { title, sections, bigTitle } = Astro.props; + +--- + +{ bigTitle ? +

{title}

: +

{title}

+} + + + + + diff --git a/web/src/components/things/ServiceList.astro b/web/src/components/things/ServiceList.astro new file mode 100644 index 0000000..9b06248 --- /dev/null +++ b/web/src/components/things/ServiceList.astro @@ -0,0 +1,111 @@ +--- + +import Button from '@components/form/Button.astro'; +import { parseMarkdown, formatLink } from '@utils/parse-markdown'; +import type { Service } from 'src/types/Service'; + +const { title, services, subHeading, buttonLink } = Astro.props; + +--- + + +
+ {services ? ( + + ) : ( +

+ ⚠️ This section is still a work in progress ⚠️
+ Check back soon, or help us complete it by submiting a pull request on GitHub. +

+ )} + + {buttonLink && (
+ + +