Fix language switche, adapt contact form and add gitea action.

This commit is contained in:
2026-04-14 17:06:10 +02:00
parent d257c1b2a1
commit 94b6155c68
9 changed files with 135 additions and 47 deletions
@@ -42,7 +42,7 @@
{{ end }}
<!-- Language Switcher -->
{{/* {{ partial "language-switcher" . }} */}}
{{ partial "language-switcher" . }}
</div>
<!-- CTA Buttons -->
@@ -16,7 +16,7 @@
<a href="{{ $langURL }}" class="language-switch-link block {{ $dropdownConfig.item_padding | default "px-8 py-3" }} {{ $dropdownConfig.text_size | default "text-sm" }} {{ $dropdownConfig.text_color | default "text-gray-700" }} {{ $dropdownConfig.hover_background | default "hover:bg-gray-50" }}" data-lang="{{ .Lang }}">
{{ .LanguageName }}
</a>
{{ end }}
{{ end }}
{{ end }}
</div>
</div>
@@ -1,12 +1,9 @@
{{ $form := .Page.Params.contactForm }}
{{ $baseURL := default "http://localhost" (getenv "BASE_URL") }}
{{ $normalizedBaseURL := strings.TrimSuffix "/" $baseURL }}
{{ $defaultContactAction := printf "%s:3001/contact" $normalizedBaseURL }}
{{ $contactFormUrl := default "https://facteur-cl.sobrietech.be/contact.php" (getenv "CONTACT_FORM_URL") }}
<form id="contactForm" class="max-w-lg mx-auto p-6 bg-white rounded shadow" method="POST"
action="{{ $form.action | default $defaultContactAction }}">
action="{{ $form.action | default $contactFormUrl }}" target="_blank">
<h3 class="text-2xl font-bold mb-4">{{ $form.title }}</h3>
{{ range $form.fields }}
<div class="mb-4">
@@ -88,7 +85,7 @@
}
})
.catch(() => {
showResult('Erreur réseau', false);
showResult('Erreur réseau, veuillez ré-essayer.', false);
});
});
});