diff --git a/Project/php/config/config.php b/Project/php/config/config.php
index ae9c833..0fbb5bc 100755
--- a/Project/php/config/config.php
+++ b/Project/php/config/config.php
@@ -18,4 +18,4 @@ global $password;
$password = 'achanger';
global $altorouterPath;
-$altorouterPath = "/~lugoigoux1/SAE_2A_Anglais/Project/php";
+$altorouterPath = "/SAE_2A_Anglais/Project/php";
diff --git a/Project/php/controller/FrontController.php b/Project/php/controller/FrontController.php
index 1d3873d..2d69b2e 100755
--- a/Project/php/controller/FrontController.php
+++ b/Project/php/controller/FrontController.php
@@ -88,6 +88,12 @@ class FrontController
public static function home(): void {
global $twig;
- echo $twig->render('home.html');
+ global $user;
+ if(isset($user)){
+ echo $twig->render('home.html', ['userID' => $user->getId(), 'userRole' => $user->getRoles()]);
+ }
+ else{
+ echo $twig->render('home.html', );
+ }
}
}
\ No newline at end of file
diff --git a/Project/php/controller/VisitorController.php b/Project/php/controller/VisitorController.php
index 3db78b2..5d6d07b 100755
--- a/Project/php/controller/VisitorController.php
+++ b/Project/php/controller/VisitorController.php
@@ -87,6 +87,7 @@ class VisitorController
}
public function confirmLogin(): void {
+ global $user;
$model = new MdlUser();
if($_POST['logemail']!=null && $_POST['logpass']!=null) {
$login = strip_tags($_POST['logemail']);
diff --git a/Project/php/css/memory.css b/Project/php/css/memory.css
index 00968b9..a68874f 100755
--- a/Project/php/css/memory.css
+++ b/Project/php/css/memory.css
@@ -2,10 +2,9 @@ body {
display: flex;
justify-content: center;
align-items: center;
- height: 100vh;
+ height: 90vh;
background-color: #f0f0f0;
- margin-left: 15vh;
- margin-right: 15vh;
+ margin: 2vh 15vh;
overflow: hidden;
}
@@ -31,8 +30,8 @@ body {
cursor: pointer;
transition: transform 0.6s ease;
transform-style: preserve-3d;
- min-height: 10vh;
- min-width: 20vh;
+ min-height: 5vh;
+ max-width: 100%;
aspect-ratio: 1/1;
}
diff --git a/Project/php/css/styles.css b/Project/php/css/styles.css
index af587db..dc9fd35 100755
--- a/Project/php/css/styles.css
+++ b/Project/php/css/styles.css
@@ -616,7 +616,7 @@ progress {
.logo {
margin-top: 10%;
- height: 10vh;
+ max-height: 8vh;
}
.figure-caption {
@@ -11070,7 +11070,7 @@ body {
padding: 0.9rem 0;
}
#secondNav .navbar-nav .nav-item:hover {
- color: fade(#fff, 80%);
+ color: #7464a1;
outline: none;
background-color: transparent;
}
@@ -11101,13 +11101,13 @@ body {
color: #fff;
}
#secondNav.navbar-shrink {
- background-color: #fff;
+ background-color: #7464a1;
}
#secondNav.navbar-shrink .navbar-brand {
color: #000;
}
#secondNav.navbar-shrink .nav-link {
- color: #000;
+ color: #fff;
padding: 1.5rem 1.5rem 1.25rem;
border-bottom: 0.25rem solid transparent;
}
@@ -11338,4 +11338,8 @@ body {
.app-badge {
height: 3rem;
+}
+
+.content{
+ padding : 12vh;
}
\ No newline at end of file
diff --git a/Project/php/js/scripts.js b/Project/php/js/scripts.js
index 80e45f3..d9af6e5 100755
--- a/Project/php/js/scripts.js
+++ b/Project/php/js/scripts.js
@@ -11,7 +11,7 @@ window.addEventListener('DOMContentLoaded', event => {
// Navbar shrink function
var navbarShrink = function () {
- const navbarCollapsible = document.body.querySelector('#mainNav');
+ const navbarCollapsible = document.body.querySelector('#secondNav');
if (!navbarCollapsible) {
return;
}
@@ -30,10 +30,10 @@ window.addEventListener('DOMContentLoaded', event => {
document.addEventListener('scroll', navbarShrink);
// Activate Bootstrap scrollspy on the main nav element
- const mainNav = document.body.querySelector('#mainNav');
+ const mainNav = document.body.querySelector('#secondNav');
if (mainNav) {
new bootstrap.ScrollSpy(document.body, {
- target: '#mainNav',
+ target: '#secondNav',
rootMargin: '0px 0px -40%',
});
};
diff --git a/Project/php/templates/addVocabList.html b/Project/php/templates/addVocabList.html
index 461ebc3..3f6da50 100755
--- a/Project/php/templates/addVocabList.html
+++ b/Project/php/templates/addVocabList.html
@@ -17,29 +17,30 @@
-
-Add words
- {% if user is defined %}
-
- {% endif %}
-