feat: Kontaktformular als Popup, Grid zentriert, Straße gefixt

- Kontaktformular als Modal-Popup (Name, Organisation, E-Mail, Nachricht)
- Oeffnet per Button-Klick, schliessbar per X/Overlay/Escape
- Submit erstellt mailto-Link mit vorausgefuellten Feldern
- Feature-Grid: letzte 2 Cards zentriert statt linksbuendig
- Gladbacher Strasse -> Gladbacher Straße

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
Claude Code
2026-04-06 19:48:40 +02:00
Ursprung 6ec058b874
Commit fa36d7267d
3 geänderte Dateien mit 107 neuen und 3 gelöschten Zeilen

Datei anzeigen

@@ -325,6 +325,55 @@ function mdToHtml(md) {
setTimeout(function () { mapInstance.invalidateSize(); }, 300);
}
/* ==================== CONTACT MODAL ==================== */
window.openContactModal = function () {
document.getElementById('contact-modal').style.display = 'flex';
document.body.style.overflow = 'hidden';
};
window.closeContactModal = function () {
document.getElementById('contact-modal').style.display = 'none';
document.body.style.overflow = '';
};
// Close on overlay click
var modalOverlay = document.getElementById('contact-modal');
if (modalOverlay) {
modalOverlay.addEventListener('click', function (e) {
if (e.target === modalOverlay) closeContactModal();
});
}
// Close on Escape
document.addEventListener('keydown', function (e) {
if (e.key === 'Escape' && modalOverlay && modalOverlay.style.display === 'flex') {
closeContactModal();
}
});
// Form submit -> mailto fallback (no backend yet)
window.submitContact = function (e) {
e.preventDefault();
var name = document.getElementById('cf-name').value;
var org = document.getElementById('cf-org').value;
var email = document.getElementById('cf-email').value;
var msg = document.getElementById('cf-message').value;
var subject = 'Anfrage von ' + name + (org ? ' (' + org + ')' : '');
var body = 'Name: ' + name + '
Organisation: ' + (org || '-') + '
E-Mail: ' + email + '
Nachricht:
' + msg;
window.location.href = 'mailto:info@aegis-sight.de?subject=' + encodeURIComponent(subject) + '&body=' + encodeURIComponent(body);
document.getElementById('contact-form').style.display = 'none';
document.getElementById('form-success').style.display = 'block';
return false;
};
/* ==================== INIT ==================== */
loadLiveData();
})();