diff --git a/assets/js/bestellformular.js b/assets/js/bestellformular.js new file mode 100644 index 0000000..5190255 --- /dev/null +++ b/assets/js/bestellformular.js @@ -0,0 +1,34 @@ +window.onload = function () { + document.getElementById('formular').addEventListener('submit', function (e) { + e.preventDefault(); // Verhindert die Standard-Formularsendung + const form = e.target; + const data = new FormData(form); + const notification = document.getElementById('notification'); + const btn = document.getElementById('bestellformular-btn'); + fetch(form.action, { + method: 'POST', + mode: 'cors', + body: data, + }) + .then(response => { + if (!response.ok) { + throw new Error('Network response was not ok'); + } + return response.json(); + }) + .then(data => { + // Erfolgsnachricht anzeigen + notification.textContent = 'Nachricht erfolgreich gesendet!'; + btn.className = 'submitbutton text-white mx-auto submit-after-valid-captchaaaa .fadeOut'; + // notification.className = 'bg-green-500 text-white px-4 py-2 rounded block'; + // setTimeout(() => notification.className = 'bg-green-500 text-white px-4 py-2 rounded hidden', 5000); // Benachrichtigung nach 5 Sekunden ausblenden + }) + .catch((error) => { + // Fehlermeldung anzeigen + notification.textContent = 'Fehler beim Senden der Nachricht.'; + console.log(error); + notification.className = 'bg-red-500 text-white px-4 py-2 rounded block'; + // setTimeout(() => notification.className = 'bg-red-500 text-white px-4 py-2 rounded hidden', 5000); // Benachrichtigung nach 5 Sekunden ausblenden + }); + }); +}; \ No newline at end of file diff --git a/assets/js/veruaslider.js b/assets/js/veruaslider.js new file mode 100644 index 0000000..f4d1eaa --- /dev/null +++ b/assets/js/veruaslider.js @@ -0,0 +1,30 @@ +window.onload = function(){ +setInterval(nextSlide, 5000); +} +let slideNumber = 0; +const prevSlide = () =>{ +const slides = document.getElementsByClassName('slides'); +const slider = document.getElementById("verua-slider"); +const currentSlide = slider.getElementsByClassName('current'); +currentSlide[0].classList.remove("current"); +if(slideNumber == 0){ +slideNumber = slides.length-1; +} +else{ +slideNumber = slideNumber-1; +} +slides[slideNumber].classList.add("current"); +} +const nextSlide = () =>{ +const slides = document.getElementsByClassName('slides'); +const slider = document.getElementById("verua-slider"); +const currentSlide = slider.getElementsByClassName('current'); +currentSlide[0].classList.remove("current"); +if(slideNumber == (slides.length-1)){ +slideNumber = 0; +} +else{ +slideNumber = slideNumber+1; +} +slides[slideNumber].classList.add("current"); +} \ No newline at end of file diff --git a/assets/scss/custom.scss b/assets/scss/custom.scss index 0112379..f7bfadf 100755 --- a/assets/scss/custom.scss +++ b/assets/scss/custom.scss @@ -15,12 +15,15 @@ a { text-decoration: none; transition: 0.3s ease-in-out; } +.nav-link.active, a.nav-dropdown-link.active { + color: #a9cd2e; +} h1, h2, h3, h4, h5, h6 { font-weight:normal; margin-bottom: 16px; } -h1, h2 { +h1, h2, .content h1, .content h2{ font-weight:bold; } h3 { @@ -151,17 +154,17 @@ table .far { } /* Formular */ -#bestellformular { +#formular { max-width: 64rem; margin-left: auto; margin-right: auto; } - #bestellformular div { + #formular div { margin-bottom: 1rem; } - #bestellformular label { + #formular label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; @@ -169,24 +172,24 @@ table .far { color: #4B5563; } - #bestellformular select, - #bestellformular input, - #bestellformular textarea { + #formular select, + #formular input, + #formular textarea { width: 100%; padding: 0.5rem 1rem; border: 1px solid #D1D5DB; border-radius: 0.375rem; } - #bestellformular select:focus, - #bestellformular input:focus, - #bestellformular textarea:focus { + #formular select:focus, + #formular input:focus, + #formular textarea:focus { outline: none; border-color: #3B82F6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5); } - #bestellformular button { + #formular button { width:350px; padding: 0.5rem 1rem; margin-bottom:10px; @@ -197,15 +200,15 @@ table .far { border-radius: 0.375rem; } - #bestellformular .submitbutton{ + #formular .submitbutton{ background-color: #a9cd2e; align-self: center; width:100%; } - #bestellformular button:hover { + #formular button:hover { background-color: #2563EB; } - #bestellformular .submitbutton:hover{ + #formular .submitbutton:hover{ background-color: #88a625; } .captcha-container { @@ -218,6 +221,13 @@ table .far { margin-right: auto; } +.fadeOut { + @apply transition-opacity duration-500 ease-in-out opacity-0 invisible; + } + .fadeIn { + @apply transition-opacity duration-500 ease-in-out opacity-100 visible; + } + /**************** Component Styles ******************/ // Icons diff --git a/content/german/bestellung/freiberufliche.md b/content/german/bestellung/freiberufliche.md index ad201f8..9b5ae8f 100644 --- a/content/german/bestellung/freiberufliche.md +++ b/content/german/bestellung/freiberufliche.md @@ -3,12 +3,12 @@ date = '2024-02-21T08:49:32Z' draft = false title = 'Freiberufliche' +++ -{{% veruaslider %}} +{{% veruaslider height="450px" %}} {{% slide image="../bestellungen-header.jpg" first="true " %}} {{% /veruaslider %}} {{% section %}} {{% aligncenter %}} -#### Bestellformular +#### Bestellformular ## VeruA ** Verwaltung und Abrechnung ### Freiberufliche
@@ -19,64 +19,72 @@ title = 'Freiberufliche' {{% /aligncenter %}} -
+
+
- - + +
- - + + +
+
+ +
- +
- +
- +
- +
- +
- +
- +
-
- +
- @@ -84,7 +92,7 @@ title = 'Freiberufliche'
- @@ -92,7 +100,7 @@ title = 'Freiberufliche'
- @@ -100,47 +108,21 @@ title = 'Freiberufliche'
-
- +
- + +
- - - - {{% /section %}} + + +{{% /section %}} diff --git a/content/german/bestellung/online-testversion.md b/content/german/bestellung/online-testversion.md index ebf87f8..1236eb6 100644 --- a/content/german/bestellung/online-testversion.md +++ b/content/german/bestellung/online-testversion.md @@ -4,7 +4,7 @@ draft = false title = 'Online Testversion' +++ -{{% veruaslider %}} +{{% veruaslider height="450px" %}} {{% slide image="../online-testversion-header.jpg" first="true " %}} {{% /veruaslider %}} diff --git a/content/german/bestellung/zusatzmodule-freiberufliche.md b/content/german/bestellung/zusatzmodule-freiberufliche.md new file mode 100644 index 0000000..b116231 --- /dev/null +++ b/content/german/bestellung/zusatzmodule-freiberufliche.md @@ -0,0 +1,34 @@ ++++ +date = '2024-02-21T13:22:03Z' +draft = false +title = 'Zusatzmodule Freiberufliche' ++++ + +{{% veruaslider height="450px" %}} +{{% slide image="../bestellungen-header.jpg" first="true " %}} +{{% /veruaslider %}} +{{% section %}} +{{% aligncenter %}} +#### Bestellformular +## VeruA ** Verwaltung und Abrechnung +### Zsatzmodule für Freiberufliche +
+ +--- + +
+ +{{% /aligncenter %}} + + + + + + + + + + + + +{{% /section %}} \ No newline at end of file diff --git a/content/german/preisliste/freiberufliche.md b/content/german/preisliste/freiberufliche.md index c63ab27..3313832 100644 --- a/content/german/preisliste/freiberufliche.md +++ b/content/german/preisliste/freiberufliche.md @@ -4,7 +4,7 @@ draft = false title = 'Verua Preisliste für Freiberufliche' +++ -{{% veruaslider %}} +{{% veruaslider height="450px" %}} {{% slide image="../freiberufliche-header-slide-1.jpg" first="true " %}} {{% slide image="../freiberufliche-header-slide-2.jpg" %}} {{% /veruaslider %}} diff --git a/content/german/preisliste/organisationen.md b/content/german/preisliste/organisationen.md index 855c5b9..bb95ce6 100644 --- a/content/german/preisliste/organisationen.md +++ b/content/german/preisliste/organisationen.md @@ -4,7 +4,7 @@ draft = false title = 'Organisationen' +++ -{{% veruaslider %}} +{{% veruaslider height="450px" %}} {{% slide image="../freiberufliche-header-slide-1.jpg" first="true " %}} {{% slide image="../freiberufliche-header-slide-2.jpg" %}} {{% /veruaslider %}} diff --git a/content/german/preisliste/weitere-dienstleistungen.md b/content/german/preisliste/weitere-dienstleistungen.md index 03a391c..24a2f08 100644 --- a/content/german/preisliste/weitere-dienstleistungen.md +++ b/content/german/preisliste/weitere-dienstleistungen.md @@ -4,7 +4,7 @@ draft = false title = 'Weitere Dienstleistungen' +++ -{{% veruaslider %}} +{{% veruaslider height="450px" %}} {{% slide image="../freiberufliche-header-slide-1.jpg" first="true " %}} {{% slide image="../freiberufliche-header-slide-2.jpg" %}} {{% /veruaslider %}} diff --git a/themes/hugoplate/layouts/_default/single.html b/themes/hugoplate/layouts/_default/single.html index 6723709..20ba4a3 100755 --- a/themes/hugoplate/layouts/_default/single.html +++ b/themes/hugoplate/layouts/_default/single.html @@ -1,5 +1,12 @@ {{ define "main" }} +{{/* Lade JS nur wenn wir es brauchen */}}
-{{ .Content }} + {{ .Content }}
+ +{{ if eq .Section "bestellung" }} +{{ $js := resources.Get "js/bestellformular.js" | minify }} + + +{{ end }} {{ end }} diff --git a/themes/hugoplate/layouts/shortcodes/veruaslider.html b/themes/hugoplate/layouts/shortcodes/veruaslider.html index 1cb8453..f31fcf6 100644 --- a/themes/hugoplate/layouts/shortcodes/veruaslider.html +++ b/themes/hugoplate/layouts/shortcodes/veruaslider.html @@ -1,43 +1,13 @@ {{/* TODO ADD S M L Modes */}} {{/* TODO FIX HEIGHT ISSUE */}} {{/* TODO FIX Slider Height on Mobile when no Headline is given */}} -
+
-
+
{{ .Inner }}
- +{{ $vsjs := resources.Get "js/veruaslider.js" | minify }} + \ No newline at end of file