From ea57742e70639821ad50b54d584985274f3ab5b4 Mon Sep 17 00:00:00 2001 From: Korbs Date: Fri, 7 Jun 2024 03:17:00 -0400 Subject: [PATCH] Add global components --- src/components/global/Analytics.astro | 42 +++++++++++++++++++++++++++ src/components/global/Head.astro | 24 +++++++++++++++ src/components/global/Header.astro | 17 +++++++++++ 3 files changed, 83 insertions(+) create mode 100644 src/components/global/Analytics.astro create mode 100644 src/components/global/Head.astro create mode 100644 src/components/global/Header.astro diff --git a/src/components/global/Analytics.astro b/src/components/global/Analytics.astro new file mode 100644 index 0000000..38ec193 --- /dev/null +++ b/src/components/global/Analytics.astro @@ -0,0 +1,42 @@ +--- +// Environment Variables +import { + ANALYTICS, + MATOMO_ID, + MATOMO_SRC, + PLAUSIBLE_DOMAIN, + PLAUSIBLE_SRC, + UMAMI_ID, + UMAMI_SRC, + AMPLITUDE_APIKEY +} from '@utils/GetConfig' + +// Get Astro Analytics +import { + Fathom, + Metrical, + Plausible, + SimpleAnalytics, + Umami, + Amplitude, + Matomo, + MinimalAnalytics +} from 'astro-analytics'; +--- + + +{ + ()=> { + if (ANALYTICS === "None") { + return null + } else if (ANALYTICS === "Plausible") { + + } else if (ANALYTICS === "Umami") { + + } else if (ANALYTICS === "Amplitude") { + + } else if (ANALYTICS === "Matomo") { + + } + } + } \ No newline at end of file diff --git a/src/components/global/Head.astro b/src/components/global/Head.astro new file mode 100644 index 0000000..48ce609 --- /dev/null +++ b/src/components/global/Head.astro @@ -0,0 +1,24 @@ +--- +// Properties +const { Title } = Astro.props; + +// Components +import Analytics from "@components/global/Analytics.astro" +--- + + + + {Title} + + + + + + + + + + + + + diff --git a/src/components/global/Header.astro b/src/components/global/Header.astro new file mode 100644 index 0000000..0af31b6 --- /dev/null +++ b/src/components/global/Header.astro @@ -0,0 +1,17 @@ +--- +// Environment Variables +import { + SITE_NAME, + META_COLOR, + COLOR, + THEME +} from '@utils/GetConfig' +--- + +
+
+ +
+
\ No newline at end of file