This commit is contained in:
parent
a5869d2b83
commit
b8cd4f0789
5 changed files with 16 additions and 11 deletions
3
src/config/contact.ts
Normal file
3
src/config/contact.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export const defaultContactFormEndpoint = "https://formspree.io/f/mjgqnrvj";
|
||||
export const defaultContactSubmissionsUrl = "https://formspree.io/forms/mjgqnrvj/submissions";
|
||||
export const defaultContactRecipients = "directors@familyfed.ie,info@familyfed.ie,media@familyfed.ie";
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
---
|
||||
import { getArchiveEntries } from "../../lib/archive";
|
||||
import { speechAdminEntryFromArchiveEntry } from "../../lib/admin-speeches";
|
||||
import { defaultContactFormEndpoint, defaultContactSubmissionsUrl } from "../../config/contact";
|
||||
import { calendarEvents, recurringCalendarEvents } from "../../data/events";
|
||||
|
||||
const entries = await getArchiveEntries();
|
||||
const blogEntries = entries.filter((entry) => entry.data.type === "blog");
|
||||
const speechEntries = entries.filter((entry) => entry.data.type === "speech");
|
||||
const contactFormEndpoint = import.meta.env.PUBLIC_CONTACT_FORM_ENDPOINT ?? "";
|
||||
const contactSubmissionsUrl = import.meta.env.PUBLIC_CONTACT_SUBMISSIONS_URL ?? "";
|
||||
const contactFormEndpoint = import.meta.env.PUBLIC_CONTACT_FORM_ENDPOINT || defaultContactFormEndpoint;
|
||||
const contactSubmissionsUrl = import.meta.env.PUBLIC_CONTACT_SUBMISSIONS_URL || defaultContactSubmissionsUrl;
|
||||
const analyticsDashboardUrl = import.meta.env.PUBLIC_ANALYTICS_DASHBOARD_URL ?? "";
|
||||
const plausibleDomain = import.meta.env.PUBLIC_PLAUSIBLE_DOMAIN ?? "";
|
||||
const today = new Date().toISOString().slice(0, 10);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
---
|
||||
import SiteLayout from "../components/SiteLayout.astro";
|
||||
import TwoColumnPage from "../components/TwoColumnPage.astro";
|
||||
import { defaultContactFormEndpoint, defaultContactRecipients } from "../config/contact";
|
||||
import articleHtml from "../content/pages/contact.html?raw";
|
||||
|
||||
const contactFormEndpoint = import.meta.env.PUBLIC_CONTACT_FORM_ENDPOINT ?? "";
|
||||
const contactRecipients = import.meta.env.PUBLIC_CONTACT_RECIPIENTS ?? "directors@familyfed.ie,info@familyfed.ie,media@familyfed.ie";
|
||||
const contactFormEndpoint = import.meta.env.PUBLIC_CONTACT_FORM_ENDPOINT || defaultContactFormEndpoint;
|
||||
const contactRecipients = import.meta.env.PUBLIC_CONTACT_RECIPIENTS || defaultContactRecipients;
|
||||
const contactFormAction = contactFormEndpoint || `mailto:${contactRecipients}`;
|
||||
const contactFormConfig = JSON.stringify({
|
||||
endpoint: contactFormEndpoint,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue