diff --git a/.gitignore b/.gitignore index b41c274..afda6ef 100644 --- a/.gitignore +++ b/.gitignore @@ -55,6 +55,7 @@ Icon /kirby /media /vendor +/site/plugins/ # Node # --------------- @@ -63,3 +64,4 @@ Icon # CSS files # --------------- assets/css/styles.css + diff --git a/composer.json b/composer.json index fa37377..07db368 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,8 @@ }, "require": { "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": { "allow-plugins": { diff --git a/composer.lock b/composer.lock index 20135ef..e76fe3a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "43770e3691ceb6a19553beb3dbca1057", + "content-hash": "9c8fcd821a223ac622d59eac3a763ea2", "packages": [ { "name": "christian-riesen/base32", @@ -597,6 +597,183 @@ }, "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", "version": "v6.10.0", diff --git a/content/6_kontakt/kontakt.txt b/content/6_kontakt/kontakt.txt index fbe7b04..197dcbb 100644 --- a/content/6_kontakt/kontakt.txt +++ b/content/6_kontakt/kontakt.txt @@ -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 \ No newline at end of file diff --git a/site/controllers/kontakt.php b/site/controllers/kontakt.php new file mode 100644 index 0000000..8c9731c --- /dev/null +++ b/site/controllers/kontakt.php @@ -0,0 +1,33 @@ + [ + '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'); + }; diff --git a/site/snippets/blocks/kontaktformular.php b/site/snippets/blocks/kontaktformular.php new file mode 100644 index 0000000..e69de29 diff --git a/site/snippets/navbar.php b/site/snippets/navbar.php index c87eac3..2da9425 100644 --- a/site/snippets/navbar.php +++ b/site/snippets/navbar.php @@ -116,17 +116,17 @@
Wir freuen uns über Ihre Nachricht!
Sie können uns auf verschiedene Arten kontaktieren!