diff --git a/.gitea/workflows/deploy-test.yml b/.gitea/workflows/deploy-test.yml index b6cd506..365abc0 100755 --- a/.gitea/workflows/deploy-test.yml +++ b/.gitea/workflows/deploy-test.yml @@ -109,6 +109,7 @@ jobs: --exclude='scripts/' \ ./ /deploy/ + echo "✅ Deployment complete!" - name: Set permissions diff --git a/AGENTS.md b/AGENTS.md index b7727c7..1082fa0 100755 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,7 +36,7 @@ | Pfad | Beschreibung | | --------------------------- | -------------------------------------------- | -| `haus-schleusingen.html` | Einstiegsseite (einzige HTML-Datei) | +| `public/index.php` | Einstiegsseite (PHP-Entry-Point) | | `css/haus-schleusingen.css` | Hauptstylesheet | | `js/haus-schleusingen.js` | Haupt-JavaScript | | `js/masonry.pkgd.min.js` | Masonry-Layout-Bibliothek (nicht bearbeiten) | diff --git a/README.md b/README.md index 699b9e4..58a18fb 100755 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Das Projekt basiert auf reinem HTML, CSS und JavaScript und wird über einen Ngi ## Projektstruktur ``` -├── haus-schleusingen.html # Einstiegsseite (einzige HTML-Datei) +├── public/index.php # Einstiegsseite (PHP-Entry-Point) ├── css/ │ └── haus-schleusingen.css # Hauptstylesheet ├── js/ @@ -172,6 +172,20 @@ npm run lint ## Git-Workflow +### Pre-Commit Hooks aktivieren + +Die Pre-Commit Hooks (Husky + lint-staged) werden automatisch beim Installieren der Abhängigkeiten eingerichtet: + +```bash +npm install +``` + +Der `prepare`-Script in `package.json` (`"prepare": "husky"`) sorgt dafür, dass Husky die Git Hooks im `.husky/`-Verzeichnis registriert. Nach `npm install` sind die Hooks aktiv – kein manueller Schritt nötig. + +> **Falls Hooks nicht laufen:** Prüfe ob `.husky/pre-commit` ausführbar ist (`chmod +x .husky/pre-commit`) und ob `core.hooksPath` nicht überschrieben wurde (`git config core.hooksPath`). + +### Was wird beim Commit geprüft? + Beim Committen führt **Husky** automatisch den Pre-Commit Hook (`.husky/pre-commit`) aus, der **lint-staged** startet. ### lint-staged prüft automatisch: diff --git a/nginx.conf b/nginx.conf index b82c87a..d595439 100755 --- a/nginx.conf +++ b/nginx.conf @@ -3,7 +3,7 @@ server { server_name localhost; root /usr/share/nginx/html; - index haus-schleusingen.html; + index index.php; # Gzip aktivieren gzip on; @@ -12,7 +12,7 @@ server { gzip_vary on; location / { - try_files $uri $uri/ /haus-schleusingen.html; + try_files $uri $uri/ /index.php; } # Lange Cache-Dauer für Bilder und statische Assets diff --git a/public/js/haus-schleusingen.js b/public/js/haus-schleusingen.js index 205e143..8ab087a 100755 --- a/public/js/haus-schleusingen.js +++ b/public/js/haus-schleusingen.js @@ -176,40 +176,7 @@ document.addEventListener("DOMContentLoaded", function () { }); // Form submit is handled server-side by PHP – no JS intervention needed. - // Form submit – opens email client with pre-filled mailto: link - document.getElementById("contactForm").addEventListener("submit", function (e) { - e.preventDefault(); - - var fname = document.getElementById("fname").value.trim(); - var lname = document.getElementById("lname").value.trim(); - var email = document.getElementById("email").value.trim(); - var phone = document.getElementById("phone").value.trim(); - var interest = document.getElementById("interest").value; - var message = document.getElementById("message").value.trim(); - - var subject = "Kontaktanfrage: " + interest; - var body = "Von: " + fname + " " + lname + "\n"; - body += "E-Mail: " + email + "\n"; - if (phone) body += "Telefon: " + phone + "\n"; - body += "Anliegen: " + interest + "\n\n"; - body += message; - - var mailto = - "mailto:mki@kies-media.de" + - "?subject=" + encodeURIComponent(subject) + - "&body=" + encodeURIComponent(body); - - window.location.href = mailto; - - // Show success message - this.style.display = "none"; - var success = document.getElementById("formSuccess"); - success.style.display = "block"; - success.style.opacity = "0"; - success.style.transition = "opacity 0.4s ease"; - requestAnimationFrame(function () { - success.style.opacity = "1"; - }); + // Success feedback is shown via #form-result after server redirect. }); }); diff --git a/public/robots.txt b/public/robots.txt index 516c855..eccce85 100755 --- a/public/robots.txt +++ b/public/robots.txt @@ -1,3 +1,3 @@ User-agent: * Allow: / -Sitemap: https://haus-schleusingen.de/haus-schleusingen.html +Sitemap: https://haus-schleusingen.de/