Merge pull request 'WEB-13: Kontaktseite einbauen' (#16) from develop into main

Reviewed-on: https://git.feigel.it/SFBadSteben/schachfreunde-badsteben/pulls/16
This commit is contained in:
2025-07-13 16:50:28 +02:00
9 changed files with 354 additions and 9 deletions
+2
View File
@@ -55,6 +55,7 @@ Icon
/kirby /kirby
/media /media
/vendor /vendor
/site/plugins/
# Node # Node
# --------------- # ---------------
@@ -63,3 +64,4 @@ Icon
# CSS files # CSS files
# --------------- # ---------------
assets/css/styles.css assets/css/styles.css
+2 -1
View File
@@ -22,7 +22,8 @@
}, },
"require": { "require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"getkirby/cms": "^5.0" "getkirby/cms": "^5.0",
"mzur/kirby-uniform": "^5.6"
}, },
"config": { "config": {
"allow-plugins": { "allow-plugins": {
Generated
+178 -1
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "43770e3691ceb6a19553beb3dbca1057", "content-hash": "9c8fcd821a223ac622d59eac3a763ea2",
"packages": [ "packages": [
{ {
"name": "christian-riesen/base32", "name": "christian-riesen/base32",
@@ -597,6 +597,183 @@
}, },
"time": "2016-12-13T01:01:17+00:00" "time": "2016-12-13T01:01:17+00:00"
}, },
{
"name": "mzur/kirby-flash",
"version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/mzur/kirby-flash.git",
"reference": "298df11e3adc8d872db8cd48ef3736c3cbdb6c6e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mzur/kirby-flash/zipball/298df11e3adc8d872db8cd48ef3736c3cbdb6c6e",
"reference": "298df11e3adc8d872db8cd48ef3736c3cbdb6c6e",
"shasum": ""
},
"require": {
"getkirby/composer-installer": "^1.2"
},
"require-dev": {
"getkirby/cms": "^3.0",
"mzur/kirby-defuse-session": "^1.0",
"phpunit/phpunit": "^9.0"
},
"type": "kirby-plugin",
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Jevets\\Kirby\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Steve Jamesson",
"email": "steve@evendev.com"
},
{
"name": "Martin Zurowietz",
"email": "martin@the-inspired-ones.de"
}
],
"description": "Stores data in the session for the next request. Data is removed after the next page load.",
"keywords": [
"flash",
"kirby",
"session"
],
"support": {
"issues": "https://github.com/mzur/kirby-flash/issues",
"source": "https://github.com/mzur/kirby-flash/tree/v2.2.0"
},
"time": "2023-01-05T18:59:28+00:00"
},
{
"name": "mzur/kirby-form",
"version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/mzur/kirby-form.git",
"reference": "8dc211b321375dbf77c43e1287e9fe0be2762ec0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mzur/kirby-form/zipball/8dc211b321375dbf77c43e1287e9fe0be2762ec0",
"reference": "8dc211b321375dbf77c43e1287e9fe0be2762ec0",
"shasum": ""
},
"require": {
"getkirby/composer-installer": "^1.2",
"mzur/kirby-flash": "^2.0"
},
"require-dev": {
"getkirby/cms": "^3.0",
"mzur/kirby-defuse-session": "^1.0",
"phpunit/phpunit": "^9.0"
},
"type": "kirby-plugin",
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Jevets\\Kirby\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Steve Jamesson",
"email": "steve@evendev.com"
},
{
"name": "Martin Zurowietz",
"email": "martin@the-inspired-ones.de"
}
],
"description": "A form helper for Kirby-based websites, using the Post/Redirect/Get pattern.",
"keywords": [
"form",
"kirby"
],
"support": {
"issues": "https://github.com/mzur/kirby-form/issues",
"source": "https://github.com/mzur/kirby-form/tree/v3.3.0"
},
"time": "2023-02-19T09:51:38+00:00"
},
{
"name": "mzur/kirby-uniform",
"version": "v5.6.1",
"source": {
"type": "git",
"url": "https://github.com/mzur/kirby-uniform.git",
"reference": "b16b507e36b710c21044eba8cc3ae36c512be554"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mzur/kirby-uniform/zipball/b16b507e36b710c21044eba8cc3ae36c512be554",
"reference": "b16b507e36b710c21044eba8cc3ae36c512be554",
"shasum": ""
},
"require": {
"getkirby/composer-installer": "^1.2",
"mzur/kirby-form": "^3.0"
},
"require-dev": {
"getkirby/cms": "^3.5 || ^4.0",
"phpunit/phpunit": "^9.0"
},
"type": "kirby-plugin",
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Uniform\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Martin Zurowietz",
"email": "martin@the-inspired-ones.de"
}
],
"description": "A versatile Kirby plugin to handle web form actions.",
"keywords": [
"form",
"kirby"
],
"support": {
"docs": "http://kirby-uniform.readthedocs.io",
"issues": "https://github.com/mzur/kirby-uniform/issues",
"source": "https://github.com/mzur/kirby-uniform"
},
"funding": [
{
"url": "https://www.paypal.me/drmzur",
"type": "custom"
},
{
"url": "https://github.com/mzur",
"type": "github"
}
],
"time": "2024-03-07T10:29:12+00:00"
},
{ {
"name": "phpmailer/phpmailer", "name": "phpmailer/phpmailer",
"version": "v6.10.0", "version": "v6.10.0",
+25
View File
@@ -2,4 +2,29 @@ Title: Kontakt
---- ----
Blocks:
[
{
"content": [],
"id": "d77eb3be-0de2-44f2-bda9-4043475d471f",
"isHidden": false,
"type": "kontaktformular"
}
]
----
Herotext: Haben Sie Fragen? Möchten Sie Mitglied werden? Dann nehmen Sie doch direkt Kontakt zu unserem Vorstand auf!
----
Herobutton:
----
Buttonlink:
----
Uuid: usx96dfncvtmlu4y Uuid: usx96dfncvtmlu4y
+33
View File
@@ -0,0 +1,33 @@
<?php
use Uniform\Form;
return function ($kirby)
{
$form = new Form([
'email' => [
'rules' => ['required', 'email'],
'message' => 'Bitte geben Sie eine gültige E-Mail Adresse ein.',
],
'name' => [
'rules' => ['required'],
'message' => 'Bitte geben Sie Ihren Namen ein.',
],
'message' => [
'rules' => ['required'],
'message' => 'Bitte geben Sie eine Nachricht ein.',
],
]);
if ($kirby->request()->is('POST')) {
$form->emailAction([
'to' => [
'info@feigel.it'
],
'from' => 'webmaster@schachfreunde-badsteben.de',
'subject' => 'Kontaktanfrage über die Homepage der Schachfreunde Bad Steben',
])->done();
}
return compact('form');
};
+6 -6
View File
@@ -116,17 +116,17 @@
<div class="invisible absolute left-0 z-10 mt-2 w-48 rounded-md bg-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100"> <div class="invisible absolute left-0 z-10 mt-2 w-48 rounded-md bg-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100">
<div class="py-1"> <div class="py-1">
<a href="/verein/gmkosteniuk" <a href="/verein/gmkosteniuk"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">GM Kosteniuk</a> class="block px-4 py-2 text-m text-gray-700 hover:bg-gray-100">GM Kosteniuk</a>
<a href="/verein/mitgliedschaft" <a href="/verein/mitgliedschaft"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Mitgliedschaft</a> class="block px-4 py-2 text-m text-gray-700 hover:bg-gray-100">Mitgliedschaft</a>
<a href="/verein/vorstand" <a href="/verein/vorstand"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Vorstand</a> class="block px-4 py-2 text-m text-gray-700 hover:bg-gray-100">Vorstand</a>
<a href="/verein/dwz" <a href="/verein/dwz"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">DWZ-Liste</a> class="block px-4 py-2 text-m text-gray-700 hover:bg-gray-100">DWZ-Liste</a>
<a href="/verein/chronik" <a href="/verein/chronik"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Chronik</a> class="block px-4 py-2 text-m text-gray-700 hover:bg-gray-100">Chronik</a>
<a href="/verein/memoriam" <a href="/verein/memoriam"
class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">In Memoriam</a> class="block px-4 py-2 text-m text-gray-700 hover:bg-gray-100">In Memoriam</a>
</div> </div>
</div> </div>
</div> </div>
+104
View File
@@ -0,0 +1,104 @@
<?php snippet('layout', slots: true) ?>
<div id="contact">
<div class="relative isolate bg-white">
<div class="mx-auto grid max-w-7xl grid-cols-1 lg:grid-cols-2">
<div class="relative px-6 pt-24 pb-20 sm:pt-32 lg:static lg:px-8 lg:py-12">
<div class="mx-auto max-w-xl lg:mx-0 lg:max-w-lg">
<div class="absolute inset-y-0 left-0 -z-10 w-full overflow-hidden bg-gray-100 ring-1 ring-gray-900/10 lg:w-1/2">
<svg class="absolute inset-0 size-full mask-[radial-gradient(100%_100%_at_top_right,white,transparent)] stroke-gray-200" aria-hidden="true">
<defs>
<pattern id="83fd4e5a-9d52-42fc-97b6-718e5d7ee527" width="200" height="200" x="100%" y="-1" patternUnits="userSpaceOnUse">
<path d="M130 200V.5M.5 .5H200" fill="none" />
</pattern>
</defs>
<rect width="100%" height="100%" stroke-width="0" fill="white" />
<svg x="100%" y="-1" class="overflow-visible fill-gray-50">
<path d="M-470.5 0h201v201h-201Z" stroke-width="0" />
</svg>
<rect width="100%" height="100%" stroke-width="0" fill="url(#83fd4e5a-9d52-42fc-97b6-718e5d7ee527)" />
</svg>
</div>
<p class="mt-6 text-lg/8 text-gray-600">Wir freuen uns über Ihre Nachricht!<br /> Sie können uns auf verschiedene Arten kontaktieren!</p>
<dl class="mt-10 space-y-4 text-base/7 text-gray-600">
<div class="flex gap-x-4">
<dt class="flex-none">
<span class="sr-only">Adresse unseres Spiellokals:</span>
<svg class="h-7 w-6 text-gray-400" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z" />
</svg>
</dt>
<dd>
Vereinsheim TV Reinersreuth<br />
Reinersreuth 91<br />
95234 Sparneck
</dd>
</div>
<div class="flex gap-x-4">
<dt class="flex-none">
<span class="sr-only">Telefon</span>
<svg class="h-7 w-6 text-gray-400" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z" />
</svg>
</dt>
<dd>
1. Vorsitzender Bernd Haberzettl<br />
<a class="hover:text-gray-900" href="tel:+49 (9286) 7631">+49 (9286) 7631</a>
</dd>
</div>
<div class="flex gap-x-4">
<dt class="flex-none">
<span class="sr-only">E-Mail</span>
<svg class="h-7 w-6 text-gray-400" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true" data-slot="icon">
<path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75" />
</svg>
</dt>
<dd><a class="hover:text-gray-900" href="mailto:vorsitzender@schachfreunde-badsteben.de">vorsitzender@schachfreunde-badsteben.de</a></dd>
</div>
</dl>
</div>
</div>
<form action="<?php echo $page->url() ?>" method="POST" class="px-6 pt-20 pb-24 sm:pb-32 lg:px-8 lg:py-12">
<div class="mx-auto max-w-xl lg:mr-0 lg:max-w-lg">
<div class="grid grid-cols-1 gap-x-8 gap-y-6 sm:grid-cols-2">
<div class="sm:col-span-2">
<label for="name" class="block text-sm/6 font-semibold text-gray-900">Name</label>
<div class="mt-2.5">
<input type="text" id="name" name="name" class="<?php if ($form->error('name')): ?>error <?php endif; ?>block w-full rounded-md bg-white px-3.5 py-2 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600" value="<?php echo $form->old('name') ?>" />
</div>
</div>
<div class="sm:col-span-2">
<label for="email" class="block text-sm/6 font-semibold text-gray-900">E-Mail-Adresse</label>
<div class="mt-2.5">
<input type="email" name="email" id="email" autocomplete="email" class="<?php if ($form->error('email')): ?>error <?php endif; ?>block w-full rounded-md bg-white px-3.5 py-2 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600" value="<?php echo $form->old('email') ?>"/>
</div>
</div>
<div class="sm:col-span-2">
<label for="message" class="block text-sm/6 font-semibold text-gray-900">Nachricht</label>
<div class="mt-2.5">
<textarea name="message" id="message" rows="4" class="<?php if ($form->error('message')): ?>error <?php endif; ?>block w-full rounded-md bg-white px-3.5 py-2 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600"><?php echo $form->old('message') ?></textarea>
</div>
</div>
</div>
<div class="mt-8 flex justify-end">
<button type="submit" class="rounded-md bg-sf_blau-500 px-3.5 py-2.5 text-center text-sm font-semibold text-white shadow-xs hover:bg-sf_gelb-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">Absenden</button>
</div>
</div>
<?php echo csrf_field() ?>
<?php echo honeypot_field() ?>
<?php if ($form->success()): ?>
Thank you for your message. We will get back to you soon!
<?php else: ?>
<div class="text-red-500 pt-12">
<?php snippet('uniform/errors', ['form' => $form]) ?>
</div>
<?php endif; ?>
</form>
</div>
</div>
</div>
<?php endsnippet() ?>
+4 -1
View File
@@ -70,5 +70,8 @@
@apply text-sf_blau-500 font-bold hover:text-sf_gelb-600; @apply text-sf_blau-500 font-bold hover:text-sf_gelb-600;
} }
.uniform__potty {
position: absolute;
left: -9999px;
}
} }