From c9d6f4d5c75fbd8c03061d0ab47d99e1a6594d7c Mon Sep 17 00:00:00 2001 From: Divlo <contact@divlo.fr> Date: Tue, 31 Dec 2019 14:54:48 +0100 Subject: [PATCH] Hotfix: Nombre d'armstrong et toDoList css --- css/style.css | 113 ------------------------------- css/toDoList.css | 112 ++++++++++++++++++++++++++++++ incl/header.php | 3 + php/config.php | 2 + scripts/fonctions_principales.js | 6 +- 5 files changed, 120 insertions(+), 116 deletions(-) create mode 100644 css/toDoList.css diff --git a/css/style.css b/css/style.css index 710c5ed..3d52e85 100644 --- a/css/style.css +++ b/css/style.css @@ -150,117 +150,4 @@ footer i:hover #realDateTime { font-size: 18px; font-family: 'Roboto', 'sans-serif'; -} - -/* ToDo List */ - -/* ------------ header ------------ */ -.header{ - height:100%; - background-color: #fff; - border-radius: 15px 15px 0 0; - position: relative; - border-bottom: 1px solid rgba(0,0,0,0.3); -} -.toDoListTitle { - color: #181818; - font-family: 'Montserrat', 'Arial', sans-serif; -} -.clear{ - width : 30px; -} -.clear i{ - font-size: 27px; - color: #181818; -} -.clear i:hover{ - cursor: pointer; - transform: rotate(60deg); -} - -/* ------------ content ------------ */ -.content{ - height: 350px; - max-height:350px; - overflow: auto; - background-color: #fff; -} -.content::-webkit-scrollbar { - display: none; -} -.content ul{ - padding:0; - margin:0; -} -.item{ - height: 100%; - min-height: 45px; - position: relative; - border-bottom: 1px solid rgba(0,0,0,0.1); - list-style: none; - padding: 0; - margin: 0; -} -.item i.co{ - position: absolute; - font-size: 25px; - padding-left:5px; - left:15px; - top:10px; -} -.item i.co:hover{ - cursor: pointer; -} -.fa-check-circle{ - color:#6eb200; -} -.item p.text { - margin-top: 10px; - font-size: 20px; - transition: 0.2s; - color: #181818; -} -.lineThrough { - text-decoration: line-through; - color : #ccc; -} -.item i.de{ - color: #363636; - position: absolute; - font-size: 25px; - right:15px; - top:10px; -} -.item i.de:hover{ - color:#af0000; - cursor: pointer; -} -/* ------------ add item ------------ */ -.add-to-do{ - position: relative; - height:80px; - padding: 10px; - border-top: 1px solid rgba(0,0,0,0.1); - border-radius: 0 0 15px 15px; - background-color: #fff; -} -.add-to-do i{ - position: absolute; - font-size: 40px; - color: #4162f6; -} - -.add-to-do input{ - position: absolute; - left: 50px; - height: 35px; - border: none; - font-size: 20px; - padding-left:10px; - max-width: 50%; -} -.add-to-do input::-webkit-input-placeholder { - color: #4162f6; - font-family: sans-serif; - font-size: 20px; } \ No newline at end of file diff --git a/css/toDoList.css b/css/toDoList.css new file mode 100644 index 0000000..4de50e0 --- /dev/null +++ b/css/toDoList.css @@ -0,0 +1,112 @@ +/* ToDo List */ + +/* ------------ header ------------ */ +.header{ + height:100%; + background-color: #fff; + border-radius: 15px 15px 0 0; + position: relative; + border-bottom: 1px solid rgba(0,0,0,0.3); +} +.toDoListTitle { + color: #181818; + font-family: 'Montserrat', 'Arial', sans-serif; +} +.clear{ + width : 30px; +} +.clear i{ + font-size: 27px; + color: #181818; +} +.clear i:hover{ + cursor: pointer; + transform: rotate(60deg); +} + +/* ------------ content ------------ */ +.content{ + height: 350px; + max-height:350px; + overflow: auto; + background-color: #fff; +} +.content::-webkit-scrollbar { + display: none; +} +.content ul{ + padding:0; + margin:0; +} +.item{ + height: 100%; + min-height: 45px; + position: relative; + border-bottom: 1px solid rgba(0,0,0,0.1); + list-style: none; + padding: 0; + margin: 0; +} +.item i.co{ + position: absolute; + font-size: 25px; + padding-left:5px; + left:15px; + top:10px; +} +.item i.co:hover{ + cursor: pointer; +} +.fa-check-circle{ + color:#6eb200; +} +.item p.text { + margin-top: 10px; + font-size: 20px; + transition: 0.2s; + color: #181818; +} +.lineThrough { + text-decoration: line-through; + color : #ccc; +} +.item i.de{ + color: #363636; + position: absolute; + font-size: 25px; + right:15px; + top:10px; +} +.item i.de:hover{ + color:#af0000; + cursor: pointer; +} +/* ------------ add item ------------ */ +.add-to-do{ + position: relative; + height:80px; + padding: 10px; + border-top: 1px solid rgba(0,0,0,0.1); + border-radius: 0 0 15px 15px; + background-color: #fff; +} +.add-to-do i{ + position: absolute; + font-size: 40px; + color: #4162f6; +} + +.add-to-do input{ + position: absolute; + left: 50px; + height: 35px; + border: none; + font-size: 20px; + padding-left:10px; + max-width: 50%; +} +.add-to-do input::-webkit-input-placeholder { + color: #4162f6; + font-family: sans-serif; + font-size: 20px; +} \ No newline at end of file diff --git a/incl/header.php b/incl/header.php index d08e24a..4c5245d 100644 --- a/incl/header.php +++ b/incl/header.php @@ -39,6 +39,9 @@ <link rel="stylesheet" href="/css/animationsScroll.css"> <link rel="stylesheet" href="/css/loader.css"> <link rel="stylesheet" href="/css/style.css"> + <?php if($toDoListCSS) { ?> + <link rel="stylesheet" href="/css/toDoList.css"> + <?php } ?> <!-- Preload Script --> <script> diff --git a/php/config.php b/php/config.php index 9b0d7d9..d01e4ce 100644 --- a/php/config.php +++ b/php/config.php @@ -5,6 +5,7 @@ $currentpage = $_SERVER['PHP_SELF']; $indexActive = ''; $functionlistActive = ''; $feedbackActive = ''; +$toDoListCSS = false; switch ($currentpage) { case '/index.php': @@ -114,6 +115,7 @@ switch ($currentpage) { $title = 'Liste de choses à faire'; $description = "La liste des choses à faire."; $image = 'https://function.divlo.fr/img/function-image/toDoList.png'; + $toDoListCSS = true; break; default: $title = 'Erreur 404'; diff --git a/scripts/fonctions_principales.js b/scripts/fonctions_principales.js index aaa0a16..1f98698 100644 --- a/scripts/fonctions_principales.js +++ b/scripts/fonctions_principales.js @@ -549,11 +549,11 @@ function armstrongNumber(number) { resultString = resultString + " + " + numberString[i] + "<sup>" + numberStringLength + "</sup>"; } - number = formatNumberResult(number); + const formattedNumber = formatNumberResult(number); if (result === number) { - return `${number} est un nombre d'Armstrong, car ${resultString.slice(2)} = ${formatNumberResult(result)}.`; + return `${formattedNumber} est un nombre d'Armstrong, car ${resultString.slice(2)} = ${formatNumberResult(result)}.`; } else { - return `${number} n'est pas un nombre d'Armstrong, car ${resultString.slice(2)} = ${formatNumberResult(result)}.`; + return `${formattedNumber} n'est pas un nombre d'Armstrong, car ${resultString.slice(2)} = ${formatNumberResult(result)}.`; } }