diff --git a/partials/structure/nav.php b/partials/structure/nav.php index fd53664..7702d57 100644 --- a/partials/structure/nav.php +++ b/partials/structure/nav.php @@ -15,6 +15,7 @@ $isDebug = defined('APP_DEBUG') && APP_DEBUG === true; @@ -35,6 +36,7 @@ $isDebug = defined('APP_DEBUG') && APP_DEBUG === true;
Start Events + Suche Profil FAQ diff --git a/public/assets/js/app.js b/public/assets/js/app.js index bf944fb..d11fb1d 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -87,7 +87,7 @@ document.addEventListener('DOMContentLoaded', () => { const renderCard = (item) => { const guest = !isLoggedIn; const access = item.visibility === 'members' && guest ? '
Nur für Mitglieder
' : ''; - const desc = guest ? `

Melde dich an, um die volle Beschreibung zu sehen.

` : `

${item.description}

`; + const desc = `

${item.teaser}

`; const contact = !guest ? `
Kontakt: ${item.contact}
` : ''; const kids = item.allowKids ? 'Mit Kindern' : 'Ohne Kinder'; const tags = [ @@ -164,6 +164,7 @@ document.addEventListener('DOMContentLoaded', () => { el.modalBody.innerHTML = `
${fmtDate(ev.startsAt)} · ${ev.region || ev.city || ''}

${ev.teaser}

+

${ev.description}

${ev.locationLabel ? `

Ort: ${ev.locationLabel}

` : ''}

Kinder: ${ev.allowKids ? 'Mit Kindern' : 'Ohne Kinder'}

Sichtbarkeit: ${ev.visibility === 'public' ? 'Öffentlich' : 'Nur Mitglieder'}

diff --git a/public/page/search.php b/public/page/search.php new file mode 100644 index 0000000..3734a59 --- /dev/null +++ b/public/page/search.php @@ -0,0 +1,69 @@ +pdo(); +$q = trim((string)($_GET['q'] ?? '')); +$results = []; + +if ($q !== '' && $pdo) { + $like = '%' . $q . '%'; + $stmt = $pdo->prepare( + 'SELECT id, title, teaser_public, description, city, region, starts_at, visibility, allow_kids, location_label + FROM events + WHERE starts_at >= NOW() + AND status != "cancelled" + AND (title LIKE :q OR teaser_public LIKE :q OR description LIKE :q OR city LIKE :q OR region LIKE :q OR zip LIKE :q) + ORDER BY starts_at ASC + LIMIT 100' + ); + $stmt->execute(['q' => $like]); + $results = $stmt->fetchAll(PDO::FETCH_ASSOC) ?: []; +} +?> +
+
+

Suche

+

Events finden

+
+
+ + +
+ +
+ + +

Bitte gib einen Suchbegriff ein.

+ +

Ergebnis(se) für „

+ +

Keine passenden Events gefunden.

+ +
+ +
+
+
+ + 📍 + +
+

+

+

Kinder:

+ +

Ort:

+ +
+ Details anzeigen +

+
+
+
+ +
+ + +
+