diff --git a/src/Controleur/FrontControler.php b/src/Controleur/FrontControler.php index f9d30b4..65421c0 100644 --- a/src/Controleur/FrontControler.php +++ b/src/Controleur/FrontControler.php @@ -37,7 +37,7 @@ Class FrontControler{ '' => '[^/\.]++' */ - $router->map('GET|POST', '/quote/[i:idQuote]?', 'VisitorControler','quote'); + $router->map('GET|POST', '/quote/[i:idQuote]', 'VisitorControler','quote'); $router->map('GET|POST', '/login', 'VisitorControler','login'); $router->map('GET|POST', '/signin', 'VisitorControler','signin'); diff --git a/src/Controleur/VisitorControler.php b/src/Controleur/VisitorControler.php index bbf20a5..fd855c7 100644 --- a/src/Controleur/VisitorControler.php +++ b/src/Controleur/VisitorControler.php @@ -20,9 +20,8 @@ Class VisitorControler{ public function quote(array $arg){ global $vues; - $id=$arg['idQuote'] ?? 1; + $id=$arg['idQuote']; $q = $this->qMod->searchId($id); - //echo "{$id}"; require_once $vues['quote']; } diff --git a/vue/accueil.php b/vue/accueil.php index 5c6d764..e958d5e 100644 --- a/vue/accueil.php +++ b/vue/accueil.php @@ -4,6 +4,7 @@ echo $twig->render('head.html.twig', array( 'title' => "Accueil", 'style' => "public/styles/styleAccueil.css", + 'scripts' => array("public/script/theme-toggle.js") )); echo $twig->render('bandeau.html.twig'); diff --git a/vue/login.php b/vue/login.php index 8abfc20..39ec7a4 100644 --- a/vue/login.php +++ b/vue/login.php @@ -5,6 +5,7 @@ echo $twig->render('head.html.twig', array( 'title' => "Login", 'style' => "public/styles/styleLogin.css", + 'scripts' => array("public/script/theme-toggle.js") )); echo $twig->render('bandeau.html.twig'); diff --git a/vue/quote.php b/vue/quote.php index 0b7f5e2..9466ceb 100644 --- a/vue/quote.php +++ b/vue/quote.php @@ -5,6 +5,7 @@ echo $twig->render('head.html.twig', array( 'title' => "Quote", 'style' => "../public/styles/styleQuote.css", + 'scripts' => array("../public/script/theme-toggle.js") )); echo $twig->render('bandeau.html.twig'); echo $twig->render('quote.html', array( @@ -14,7 +15,6 @@ 'sourceName' => $q->getTitleSrc(), 'dateSortie' => $q->getDateSrc(), 'nbLike' => $q->getLike(), - 'timeCode' =>"1h45", )); ?> \ No newline at end of file diff --git a/vue/signin.php b/vue/signin.php index 4cef884..efb8cd3 100644 --- a/vue/signin.php +++ b/vue/signin.php @@ -5,6 +5,7 @@ echo $twig->render('head.html.twig', array( 'title' => "Sign in", 'style' => "public/styles/styleSignin.css", + 'scripts' => array("public/script/theme-toggle.js") )); echo $twig->render('bandeau.html.twig'); diff --git a/vue/templates/head.html.twig b/vue/templates/head.html.twig index 31c1ef9..8d9e7ce 100644 --- a/vue/templates/head.html.twig +++ b/vue/templates/head.html.twig @@ -6,6 +6,10 @@