From 096883b0ee6377aaae21a4c768f6cb274464a2a9 Mon Sep 17 00:00:00 2001 From: k Date: Sun, 20 Jul 2025 14:28:13 +0200 Subject: [PATCH] Add contact form and WhatsApp integration - Created a new, styled contact form with input validation. - Added WhatsApp Chat link for direct communication. - Introduced `ContactForm.css` with responsive styles to improve usability. --- src/pages/Contact.astro | 41 ++++++++-- styles/components/ContactForm.css | 127 ++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+), 5 deletions(-) create mode 100644 styles/components/ContactForm.css diff --git a/src/pages/Contact.astro b/src/pages/Contact.astro index 643f347..284ab59 100644 --- a/src/pages/Contact.astro +++ b/src/pages/Contact.astro @@ -1,11 +1,42 @@ --- import Layout from "../components/Layout.astro"; +import "../../styles/components/ContactForm.css"; --- - -

Contact

- -

Hier findest du alle aktuellen und kommenden Contact im Gallus Pub.

- +
+

Kontakt

+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ +
+

Oder kontaktiere uns direkt über WhatsApp:

+ + 📱 + WhatsApp Chat starten + +
+
diff --git a/styles/components/ContactForm.css b/styles/components/ContactForm.css new file mode 100644 index 0000000..25e00df --- /dev/null +++ b/styles/components/ContactForm.css @@ -0,0 +1,127 @@ +/* styles/components/ContactForm.css */ + +.contact-container { + max-width: 800px; + margin: 2rem auto; + padding: 0 1rem; +} + +.contact-title { + margin-top: 70px; + padding-top: 2rem; + text-align: center; + margin-bottom: 2rem; + font-size: 2.5rem; + color: var(--color-text); +} + +.contact-form { + background-color: rgba(33, 59, 40, 0.05); + padding: 2rem; + border-radius: 8px; + margin-bottom: 2rem; +} + +.form-group { + margin-bottom: 1.5rem; +} + +.form-group label { + display: block; + margin-bottom: 0.5rem; + font-weight: bold; + color: var(--color-text); +} + +.form-group input, +.form-group textarea { + width: 100%; + padding: 0.75rem; + border: 1px solid #ccc; + border-radius: 4px; + font-family: inherit; + font-size: 1rem; + background-color: #fff; +} + +.form-group textarea { + resize: vertical; +} + +.form-group input:focus, +.form-group textarea:focus { + outline: none; + border-color: #213b28; + box-shadow: 0 0 0 2px rgba(33, 59, 40, 0.2); +} + +.submit-button { + background-color: #213b28; + color: white; + border: none; + padding: 0.75rem 1.5rem; + font-size: 1rem; + font-weight: bold; + border-radius: 4px; + cursor: pointer; + transition: background-color 0.3s ease; +} + +.submit-button:hover { + background-color: #2a4c35; +} + +.whatsapp-container { + text-align: center; + margin: 2rem 0; +} + +.whatsapp-link { + display: inline-flex; + align-items: center; + background-color: #25D366; + color: white; + text-decoration: none; + padding: 0.75rem 1.5rem; + border-radius: 4px; + font-weight: bold; + transition: background-color 0.3s ease; + margin-top: 0.5rem; +} + +.whatsapp-link:hover { + background-color: #128C7E; +} + +.whatsapp-icon { + font-size: 1.2rem; + margin-right: 0.5rem; + display: inline-block; +} + +/* Responsive adjustments */ +@media (max-width: 768px) { + .contact-form { + padding: 1.5rem; + } + + .contact-title { + font-size: 2rem; + } +} + +@media (max-width: 480px) { + .contact-form { + padding: 1rem; + } + + .contact-title { + font-size: 1.75rem; + } + + .submit-button, + .whatsapp-link { + width: 100%; + justify-content: center; + } +} \ No newline at end of file