astro - uspojnienie stron, seo unifikacja, favicon
This commit is contained in:
@@ -1,20 +1,35 @@
|
||||
---
|
||||
import path from "node:path";
|
||||
import DefaultLayout from "../../layouts/DefaultLayout.astro";
|
||||
import MapGoogle from "../../components/maps/MapGoogle.astro";
|
||||
import Markdown from "../../islands/Markdown.jsx";
|
||||
import { loadYamlFile } from "../../lib/loadYaml";
|
||||
import { loadYaml } from "../../lib/astro-helpers";
|
||||
import "../../styles/contact.css";
|
||||
|
||||
type SeoYaml = any;
|
||||
const seo = loadYamlFile<SeoYaml>(
|
||||
path.join(process.cwd(), "src", "content", "contact", "seo.yaml"),
|
||||
);
|
||||
type ContactData = {
|
||||
title: string;
|
||||
description: string;
|
||||
contactFormTitle: string;
|
||||
lat: number;
|
||||
lng: number;
|
||||
markerTitle: string;
|
||||
markerAddress: string;
|
||||
maps: { mapId: string };
|
||||
form: {
|
||||
firstName: { placeholder: string };
|
||||
lastName: { placeholder: string };
|
||||
email: { placeholder: string };
|
||||
phone: { placeholder: string };
|
||||
subject: { placeholder: string };
|
||||
message: { placeholder: string; rows: number };
|
||||
rodo: { label: string; policyLink: string; policyTitle: string; policyText: string };
|
||||
submit: { label: string; title: string };
|
||||
successMessage: string;
|
||||
errorMessage: string;
|
||||
};
|
||||
};
|
||||
|
||||
type ContactData = any;
|
||||
const data = loadYamlFile<ContactData>(
|
||||
path.join(process.cwd(), "src", "content", "contact", "contact.yaml"),
|
||||
);
|
||||
const seo = loadYaml("./src/content/contact/seo.yaml");
|
||||
const data = loadYaml<ContactData>("./src/content/contact/contact.yaml");
|
||||
|
||||
const apiKey = import.meta.env.PUBLIC_GOOGLE_MAPS_KEY;
|
||||
const form = data.form;
|
||||
@@ -83,7 +98,6 @@ const form = data.form;
|
||||
class="f-input"
|
||||
required></textarea>
|
||||
|
||||
<!-- widoczne tylko gdy jest oferta -->
|
||||
<div id="offerSummaryWrap" class="hidden">
|
||||
<textarea
|
||||
id="offerSummary"
|
||||
@@ -134,7 +148,6 @@ const form = data.form;
|
||||
<div id="toast" class="f-toast"></div>
|
||||
</section>
|
||||
|
||||
<!-- ReCaptcha v3 -->
|
||||
<script
|
||||
is:inline
|
||||
define:vars={{ siteKey: import.meta.env.PUBLIC_RECAPTCHA_SITE_KEY }}
|
||||
@@ -257,4 +270,4 @@ const form = data.form;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</DefaultLayout>
|
||||
</DefaultLayout>
|
||||
Reference in New Issue
Block a user