diff --git a/config/_default/params.toml b/config/_default/params.toml
index 47ed15e..4f87d36 100644
--- a/config/_default/params.toml
+++ b/config/_default/params.toml
@@ -60,9 +60,9 @@ link = "contact"
# matomo tracking: see https://matomo.org/
[matomo]
-enable = false
-url = "" # your matomo url
-id = "" # your matomo id
+enable = true
+url = "https://matomo.amperion.at" # your matomo url
+id = "1" # your matomo id
# site verifications
diff --git a/layouts/_default/contact.html b/layouts/_default/contact.html
index 96a15e5..89111af 100644
--- a/layouts/_default/contact.html
+++ b/layouts/_default/contact.html
@@ -30,9 +30,8 @@
.stack{display:grid;gap:16px}
.stack-lg{display:grid;gap:24px}
.info-list{list-style:none;margin:0;padding:0;display:grid;gap:12px}
- .info-item{display:flex;gap:.75rem;align-items:flex-start; justify-content:center; text-align:center}
- .info-item .ico{flex:0 0 auto;line-height:0}
- .info-item .txt a{ text-decoration:none;color:inherit; }
+ .info-item{display:flex;gap:.75rem;align-items:flex-start}
+ .info-item .ico{flex:0 0 auto;line-height:0;color:#F5A623}
/* CTA-Buttons & Socials: nutzt eure bestehenden Klassen – nur Layout-Hooks */
.cta__actions{display:flex;gap:.75rem;flex-wrap:wrap}
@@ -51,8 +50,8 @@
}
textarea.form-control{min-height:160px;resize:vertical}
.form-control:focus{border-color:#F5A623;box-shadow:0 0 0 3px rgba(245,166,35,.18)}
- .form-legal{margin:0;opacity:.9}
- .card h3{margin:0 0 .5rem}
+ .form-legal{margin:0;opacity:.9} /* p-Standardgröße bleibt erhalten */
+ .card h3{margin:0 0 .5rem} /* nur Abstand, Typo kommt global von h3 */
Server-Fehler. Bitte später erneut versuchen.
"; + exit; } curl_close($ch); - $response_data = json_decode($response, true); // E-Mail mit PHPMailer senden, wenn Captcha ok if (!empty($response_data['success']) && $response_data['success'] === true) { $mail = new PHPMailer(true); try { + $mail->SMTPDebug = 0; // Debug-Ausgabe deaktiviert $mail->isSMTP(); $mail->Host = $smtp_config['smtp_host']; $mail->Port = $smtp_config['smtp_port']; @@ -62,17 +69,18 @@ if (!empty($response_data['success']) && $response_data['success'] === true) { $mail->Username = $smtp_config['smtp_username']; $mail->Password = $smtp_config['smtp_password']; $mail->SMTPSecure = $smtp_config['smtp_encryption']; + $mail->CharSet = 'UTF-8'; + $mail->Encoding = 'base64'; + // Absenderadresse prüfen + if (empty($smtp_config['smtp_from'])) { + throw new Exception("Absenderadresse nicht konfiguriert."); + } $mail->setFrom($smtp_config['smtp_from'], $smtp_config['smtp_from_name']); $mail->addAddress('office@amperion.at'); // Empfänger if (!empty($email)) { $mail->addReplyTo($email, $name); } - - // UTF-8 für Betreff und Inhalt erzwingen - $mail->CharSet = 'UTF-8'; // <-- WICHTIG - $mail->Encoding = 'base64'; // <-- WICHTIG - $mail->Subject = mb_encode_mimeheader("Neue Kontaktanfrage: $subject", 'UTF-8'); $mail->Body = " Name: $name @@ -85,13 +93,14 @@ if (!empty($response_data['success']) && $response_data['success'] === true) { "; $mail->send(); - header("Location: /danke/"); // Leitet zu /danke/index.html um + header("Location: /danke/"); exit(); } catch (Exception $e) { - error_log("E-Mail-Fehler: " . $mail->ErrorInfo); + error_log("E-Mail-Fehler: " . $e->getMessage()); echo "Es gab ein Problem beim Senden der Nachricht. Bitte versuche es später erneut.
"; } } else { error_log("hCaptcha-Überprüfung fehlgeschlagen: " . print_r($response_data, true)); echo "Bitte bestätige, dass du kein Roboter bist.
"; } +?> diff --git a/themes/airspace-hugo/layouts/_default/baseof.html b/themes/airspace-hugo/layouts/_default/baseof.html index e33e1ca..e21cf44 100644 --- a/themes/airspace-hugo/layouts/_default/baseof.html +++ b/themes/airspace-hugo/layouts/_default/baseof.html @@ -19,6 +19,27 @@ AUTHOR WEBSITE: https://gethugothemes.com {{ else }} {{ partial "style.html" . }} {{ end }} + + + + + + + + + diff --git a/themes/airspace-hugo/layouts/partials/head.html b/themes/airspace-hugo/layouts/partials/head.html index eca144e..ebe6ac3 100644 --- a/themes/airspace-hugo/layouts/partials/head.html +++ b/themes/airspace-hugo/layouts/partials/head.html @@ -147,6 +147,13 @@ {{ end }} {{ end }} + + + + + + + {{ if site.Params.baidu.enable }} {{ with site.Params.baidu.analytics_id }}