Clean code
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user