From 56b8511e879c609d739efa5d44161fbf7f217f5b Mon Sep 17 00:00:00 2001 From: brongniart Date: Wed, 6 Nov 2024 18:35:32 +0100 Subject: [PATCH] routeur londres --- index.php | 5 +++-- src/Gateway/Connection.php | 2 +- vue/accueil.php | 10 +--------- vue/quote.php | 4 ++-- vue/templates/bandeau.html.twig | 6 +++--- 5 files changed, 10 insertions(+), 17 deletions(-) diff --git a/index.php b/index.php index 7c13a02..22d42ce 100644 --- a/index.php +++ b/index.php @@ -11,14 +11,15 @@ require_once __DIR__ . '/config/config.php'; require __DIR__ . '/vendor/autoload.php'; -$co = new \Gateway\Connection('pgsql:host=localhost;dbname=dbkekentin;', 'kekentin', ''); +$co = new \Gateway\Connection('pgsql:host=localhost;dbname=dbkekentin;', 'kekentin', 'Chocolat-77'); //twig $loader = new \Twig\Loader\FilesystemLoader('vue/templates'); $twig = new \Twig\Environment($loader, [ - 'cache' => 'cache', + 'cache' => false, ]); +$twig->addGlobal('racine','/~kekentin/WF/WF-Website'); $cont = new Controleur\FrontControler($co); diff --git a/src/Gateway/Connection.php b/src/Gateway/Connection.php index 2632683..cd1b420 100644 --- a/src/Gateway/Connection.php +++ b/src/Gateway/Connection.php @@ -1,7 +1,7 @@ false, - ]); - // + global $twig; echo $twig->render('head.html.twig', array( 'title' => "Accueil", diff --git a/vue/quote.php b/vue/quote.php index 809a8c1..647c322 100644 --- a/vue/quote.php +++ b/vue/quote.php @@ -4,12 +4,12 @@ echo $twig->render('head.html.twig', array( 'title' => "Quote", - 'style' => "../public/styles/styleQuote.css", + 'style' => "public/styles/styleQuote.css", )); echo $twig->render('bandeau.html.twig'); echo $twig->render('quote.html', array( - 'srcImg' => "../public/images/Dark_Vador.jpg", + 'srcImg' => "public/images/Dark_Vador.jpg", 'nameCarac' => "Dark Vador", 'quoteContent' => "Je suis ton père", 'sourceName' => "Star Wars V : L’Empire contre-attaque", diff --git a/vue/templates/bandeau.html.twig b/vue/templates/bandeau.html.twig index b6c7941..be606e7 100644 --- a/vue/templates/bandeau.html.twig +++ b/vue/templates/bandeau.html.twig @@ -2,13 +2,13 @@
- user + user
\ No newline at end of file