Clean code

This commit is contained in:
julien
2026-03-27 22:30:10 +01:00
parent 68c547ddcb
commit 7757628a94
29 changed files with 164 additions and 268 deletions

View File

@@ -9,12 +9,12 @@ class SiteController extends BaseController
$page = max(1, (int) ($this->f3->get('GET.page') ?? 1));
$result = (new Post($this->db))->paginateList($page);
$this->renderPublic('site/home.html', [
$this->render('site/home.html', [
'pageTitle' => 'Accueil',
'posts' => $result['posts'],
'pagination' => $result,
'paginationAlias' => 'home',
]);
], 300);
}
public function show(): void
@@ -25,9 +25,10 @@ class SiteController extends BaseController
return;
}
$this->renderPublic('site/post.html', [
$this->render('site/post.html', [
'pageTitle' => $post['title'],
'metaDescription' => $post['excerpt'],
'post' => $post,
]);
], 3600);
}
}