From e39a483affc660ab54c51aa844f171803b950a41 Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Fri, 17 Jul 2026 03:08:28 +0200 Subject: [PATCH] community --- partials/landing/main/home.php | 32 +++++++++++++++++++++++ partials/structure/nav.php | 2 ++ public/assets/css/app.css | 2 ++ public/assets/js/app.js | 46 +++++++++++++++++++++++++++++----- 4 files changed, 76 insertions(+), 6 deletions(-) diff --git a/partials/landing/main/home.php b/partials/landing/main/home.php index 31fa730..dec6bad 100755 --- a/partials/landing/main/home.php +++ b/partials/landing/main/home.php @@ -3,6 +3,7 @@ $app = app(); $flash = $app->flash()->get(); $eventsForJs = []; +$threadsForJs = []; try { $pdo = $app->pdo(); if ($pdo) { @@ -29,9 +30,24 @@ try { 'lng' => $r['lng'] !== null ? (float)$r['lng'] : null, ]; } + + $communityCfg = require __DIR__ . '/../../../config/community.php'; + $community = new \App\Community($pdo, $communityCfg); + $threads = $community->listThreads(8); + foreach ($threads as $thread) { + $threadsForJs[] = [ + 'id' => (int)$thread['id'], + 'title' => (string)$thread['title'], + 'body' => (string)$thread['body'], + 'displayName' => (string)($thread['display_name'] ?: 'Mitglied'), + 'createdAt' => (string)$thread['created_at'], + 'answers' => (int)$thread['answers'], + ]; + } } } catch (Throwable $e) { $eventsForJs = []; + $threadsForJs = []; } ?>
@@ -110,6 +126,21 @@ try { +
+
+
+

Tausch dich in der Community aus

+
+
+ +
+
+
+ +
+
+
+
@@ -146,6 +177,7 @@ try {