diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php index 55a4425..9840c7f 100644 --- a/src/Controller/HomeController.php +++ b/src/Controller/HomeController.php @@ -20,7 +20,7 @@ class HomeController extends AbstractController return $this->render('home/index.html.twig', [ 'controller_name' => 'HomeController', 'posts' => $repo->getPublished($page*5, 5), - 'pages' => round(count($repo->getPublished())/5, 0, PHP_ROUND_HALF_UP), + 'pages' => round(count($repo->getPublished())/5, 0, PHP_ROUND_HALF_UP)-1, 'page' => $page ]); } diff --git a/templates/home/index.html.twig b/templates/home/index.html.twig index 41ddbed..cbf0855 100644 --- a/templates/home/index.html.twig +++ b/templates/home/index.html.twig @@ -19,11 +19,11 @@ {% endblock %}