From 57dba2003046f7fffacc184bbd32e7ea3a0552d9 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 19 Oct 2023 20:54:29 +0200 Subject: [PATCH] feat: add Drupal Association message --- src/components/Message.astro | 13 +++++++++++++ src/layouts/Layout.astro | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 src/components/Message.astro diff --git a/src/components/Message.astro b/src/components/Message.astro new file mode 100644 index 000000000..824719c11 --- /dev/null +++ b/src/components/Message.astro @@ -0,0 +1,13 @@ +--- +import Markdown from "./Markdown.astro"; +--- + +
+
+ + + +
+
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index c621b6007..b8e24f61c 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -2,6 +2,7 @@ import "../../assets/css/tailwind.pcss"; import Banner from "../components/Banner.astro"; +import Message from "~/components/Message.astro"; import Navbar from "../components/Navbar.astro"; export interface Props { @@ -37,6 +38,9 @@ const footerLinks = [ const canonicalURL = new URL(Astro.url.pathname, Astro.site).toString().replace(/\/$/, ""); const isFrontPage = Astro.props.isFront; + +const showDrupalAssociationMessage = ['diagnostic', 'drupal-upgrade', 'dto', 'pricing'] + .includes(Astro.url.pathname.slice(1)); --- @@ -74,6 +78,15 @@ const isFrontPage = Astro.props.isFront;
+ {false && showDrupalAssociationMessage && ( + +

+ Work with me and support Drupal. + 10% of any Drupal-related product or service is donated to the Drupal Association. +

+
+ )} +

{title}