feat: add Drupal Association message
This commit is contained in:
parent
a8c0b54ae7
commit
57dba20030
2 changed files with 26 additions and 0 deletions
13
src/components/Message.astro
Normal file
13
src/components/Message.astro
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
import Markdown from "./Markdown.astro";
|
||||
---
|
||||
|
||||
<div class="mb-10 border border-gray-800 dark:border-gray-600">
|
||||
<div
|
||||
class="py-4 px-4 border-l-4 prose prose-p:first:mt-0 prose-strong:text-current border-blue-primary"
|
||||
>
|
||||
<Markdown>
|
||||
<slot />
|
||||
</Markdown>
|
||||
</div>
|
||||
</div>
|
|
@ -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));
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
@ -74,6 +78,15 @@ const isFrontPage = Astro.props.isFront;
|
|||
<Navbar />
|
||||
|
||||
<div class="py-10 px-6 mx-auto max-w-xl md:py-10">
|
||||
{false && showDrupalAssociationMessage && (
|
||||
<Message>
|
||||
<p>
|
||||
<strong>Work with me and support Drupal.</strong>
|
||||
10% of any Drupal-related product or service is donated to the <a href="https://www.drupal.org/association">Drupal Association</a>.
|
||||
</p>
|
||||
</Message>
|
||||
)}
|
||||
|
||||
<h1 class="mb-4 text-xl font-bold md:text-2xl">{title}</h1>
|
||||
|
||||
<main>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue