Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content edits #14

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions src/components/Contact.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,38 @@
import H2 from "./atoms/H2.astro";

interface Props {
title: string;
description: string;
title?: string;
description?: string;
blurb?: boolean;
}

const { title, description } = Astro.props;
const {
title = "Get in touch",
description = "Interested in what I do and how I can help? Chatting to me is free, and I can work to your budget :)",
blurb,
} = Astro.props;
---

<section class="w-full mx-auto" id="contact">
<div class="lg:grid lg:grid-cols-2 lg:gap-12 items-start">
<div class="mb-6 lg:mb-0">
<H2 title={title} />
<p
class="md:text-lg text-gray-600 dark:text-white max-w-prose text-pretty"
>
{description}
</p>
</div>
{
blurb && (
<div class="mb-6 lg:mb-0">
<H2 title={title} />
<p class="md:text-lg text-gray-600 dark:text-white max-w-prose text-pretty">
{description}
</p>
</div>
)
}

<form
name="contact"
method="POST"
data-netlify="true"
data-netlify-recaptcha="true"
class="rounded-sm group transition-colors"
action="/thank-you"
autocomplete="on"
>
<p class="hidden">
Expand Down Expand Up @@ -81,7 +89,10 @@ const { title, description } = Astro.props;

<div class="mt-4">
<input type="checkbox" id="consent" name="consent" required />
<label for="consent" class="text-sm text-gray-600 dark:text-white">
<label
for="consent"
class="text-sm text-pretty text-gray-600 dark:text-white"
>
I agree to the processing of my personal data in accordance with the <a
href="/privacy-policy"
class="dark:text-white font-sembiold underline">Privacy Policy</a
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function getImageUrl(image: ImageMetadata | string): string {
<CookieBanner client:load GA_MEASUREMENT_ID="G-63R54V45CT" />
<Nav>
<NavLink url="/#posts" caption="Posts" />
<NavLink url="/#contact" caption="Contact" />
<NavLink url="/contact" caption="Contact" />
</Nav>
<main class="min-h-screen flex flex-col my-2 mx-auto">
{
Expand Down
12 changes: 12 additions & 0 deletions src/pages/contact/index.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
import Subpage from "../../layouts/Subpage.astro";
import Contact from "../../components/Contact.astro";
---

<Subpage
title="Get in touch"
subtitle="Interested in what I do and how I can help? Chatting to me is free, and I can work to your budget :)"
description="Get in touch!"
>
<Contact/>
</Subpage>
2 changes: 1 addition & 1 deletion src/pages/tags/[tag].astro
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const otherActiveTags = data.tags.nodes.filter(
<ul class="flex flex-wrap gap-2">
{
otherActiveTags.map((activeTag: TagNode) => (
<TagCard tag={activeTag.name} />
<TagCard link tag={activeTag.name} />
))
}
</ul>
Expand Down
15 changes: 15 additions & 0 deletions src/pages/thank-you/index.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
import Subpage from "../../layouts/Subpage.astro";
import Button from "../../components/atoms/Button.astro";
---

<Subpage
title="Thank you!"
subtitle="Your submission has now been sent. I'll get back to you soon!"
description="How I use your data"
noindex={true}
>
<a href="/" title="Return to homepage" class="w-fit"
><Button caption="Return to homepage" /></a
>
</Subpage>
Loading