From 1689b5457082de306792f23cb4883102d1f01cbc Mon Sep 17 00:00:00 2001 From: adrien Date: Thu, 24 Apr 2025 17:25:50 +0200 Subject: [PATCH] title and hash --- Grille.php | 8 ++++++ index.php | 75 ++++++++++++++++++++++++++++++++++++++++++++---------- style.css | 35 ++++++++++++++----------- 3 files changed, 90 insertions(+), 28 deletions(-) diff --git a/Grille.php b/Grille.php index 7760780..60b7625 100644 --- a/Grille.php +++ b/Grille.php @@ -130,4 +130,12 @@ class Grille { unset($this->mots_utilises[$mot_col]); } } + + public function hash() { + $string = ""; + foreach ($this->grille as $ligne) { + $string .= implode("", $ligne); + } + return hash('sha256', $string); + } } \ No newline at end of file diff --git a/index.php b/index.php index f98a0fb..0f655f0 100644 --- a/index.php +++ b/index.php @@ -38,6 +38,33 @@ $grille = new Grille($hauteur, $largeur); +

+ + + + + + + + + + + + + + + + + + + + + + + + +
M
croisés
t
s
+

@@ -84,22 +111,24 @@ $grille = new Grille($hauteur, $largeur); \ No newline at end of file diff --git a/style.css b/style.css index b92a97c..9660152 100644 --- a/style.css +++ b/style.css @@ -6,6 +6,15 @@ body { flex-flow: column; justify-content: space-evenly; } + +h1 table { + margin: auto; +} + +h1, h2 { + font-variant-caps: petite-caps; + text-align: center; +} .grille { margin: 2rem auto; @@ -17,35 +26,36 @@ body { margin: 0 auto; } -tr:nth-of-type(2) td { +.grille tr:nth-of-type(2) td { border-top: 3px solid black; } -tr:last-of-type td { +.grille tr:last-of-type td { border-bottom: 3px solid black; } -td:first-of-type { +.grille td:first-of-type { border-left: 3px solid black; } -td:last-child { +.grille td:last-child { border-right: 3px solid black; } -td { +.grille td { border: 1px solid black; padding: 2px; } -th, td { +.grille th, +.grille td { width: 30px; height: 30px; text-align: center; } -.case.noire { +.grille .case.noire { background-color: black; } -input { +.grille input { width: 100%; height: 100%; border: none; @@ -54,7 +64,7 @@ input { font-size: 1.2em; } -input[disabled] { +.grille input[disabled] { background-color: black; } @@ -68,11 +78,6 @@ input[disabled] { width: 45%; } -.definitions h2 { - font-variant-caps: petite-caps; - text-align: center; -} - -li::marker { +.definitions li::marker { font-weight: bold; } \ No newline at end of file