Anthony RICHARD 1 year ago
commit 9aa4ab4676

@ -155,4 +155,9 @@ class AbsController
$mdl->deconnection(); $mdl->deconnection();
$this->home(); $this->home();
} }
public function resultatsJeux(): void{
global $twig;
echo $twig->render('resultatsJeux.html');
}
} }

@ -10,9 +10,10 @@ body {
#memory-game { #memory-game {
display: grid; display: grid;
grid-template-columns: repeat(7, 1fr); grid-template-columns: repeat(7, minmax(0, 1fr));
grid-template-rows: repeat(4, 140px); grid-template-rows: repeat(4, minmax(0, 1fr));
gap: 10px; gap: 10px;
margin: auto;
} }
.card { .card {
@ -26,7 +27,10 @@ body {
align-items: center; align-items: center;
font-size: 18px; font-size: 18px;
cursor: pointer; cursor: pointer;
transition: background-color 0.3s ease;; transition: background-color 0.3s ease;
min-height: 10vh;
min-width: 20vh;
aspect-ratio: 1/1;
} }
.flipped { .flipped {

@ -73,6 +73,8 @@ document.addEventListener('DOMContentLoaded', function () {
} }
function checkGameCompletion(){ function checkGameCompletion(){
return; if (document.querySelectorAll('.card.found').length === cards.length) {
window.location.href = '../resultatsJeux'; // A MODIFIER POUR UN TWIG RENDER
}
} }
}); });

@ -21,7 +21,5 @@
</script> </script>
<script src="{{base}}/js/memory.js"></script> <script src="{{base}}/js/memory.js"></script>
</body> </body>
</html> </html>

@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/styles.css" rel="stylesheet" /> <link href="{{base}}/css/styles.css" rel="stylesheet" />
<title>Félicitations!</title> <title>Félicitations!</title>
<style> <style>
body { body {

Loading…
Cancel
Save