commit 3a337bb41eaa49df4a5ccc467911d677db5da5dd Author: Fabienmcl Date: Fri Apr 26 16:24:36 2024 +0200 initial commit diff --git a/Css/choix.css b/Css/choix.css new file mode 100644 index 0000000..5354876 --- /dev/null +++ b/Css/choix.css @@ -0,0 +1,125 @@ + +*{ + margin: 0; +} + +body{ + background-image: url("../img/91657.jpg"); + background-size: cover; +} + +.topbar{ + background-image: url("../img/91657.jpg"); +} + +.topbar{ + background-color: black; + padding: 20px; + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: solid 2px purple; +} + +.topbar a{ + color: white; + text-decoration: none; + padding: 10px; + margin: 0 10px 0 0; + font-weight: 900; + font-size: 17px; +} + + +.topbar a:hover{ + background-color: pink; + border-radius: 15px; + color: #0d134b; +} + + +.topbar .nav .active a { + color: yellow; +} + +.nav { + display: flex; + justify-content: flex-end; +} + +.topbar .titre{ + font-size: 17px; + padding: 10px; + font-weight: bold; + text-transform: uppercase; + color: pink; +} + +.topbar .titre:hover{ + background-color: pink; + border-radius: 15px; + color: #0d134b; + +} + +.bouton +{ + + text-align: center; + align-items: center; + +} + +.bouton a{ + border-radius: 10px; + padding: 10px; +} + +.titre{ + color: white;} + + +.container { + min-height: 90vh; + overflow: hidden; + display: flex; + justify-content: center; + align-items: center; + } + +.section{ + height: 300px; + text-align: center; +} + + +.bouton { + display: flex; + flex-direction: column; + align-items: center; + margin-top: 20px; +} + +.bouton a { + border-radius: 10px; + padding: 10px; + margin-top: 10px; + width: 150px; + text-decoration: none; + background-color: pink; + color: #0d134b; + border: solid 5px purple; +} + +.bouton a:hover{ + background-color: purple; + border: solid 5px pink; + color: white; + +} + + + + + + diff --git a/Css/main.css b/Css/main.css new file mode 100644 index 0000000..b1d7fb8 --- /dev/null +++ b/Css/main.css @@ -0,0 +1,115 @@ + + +:root{ + --title: #f8c27a; + --textShadow: 0 2px 2px rbga(0,0,0,.7); + --boxShadow: 0 0px 10px rgba(0,0,0,.2) +} + +* +{ + padding: 0; + margin: 0; + box-sizing: border-box; +} + +body{ + font-size: 14px; + width: 100vw; + overflow: hidden; + height: 100vh; + display: flex; + align-items: center; + justify-content: center; + font-family: sans-serif; + background-image: linear-gradient(to top, #00c6fb 0%, #005bea 100%); +} + +.container +{ + background-color: rgba(255,255,255,0.2); + padding: 20px; + border-radius: 5px; + text-align: center; + box-shadow: var(--boxShadow); +} + +h1{ + font-family: 'Anton', sans-serif; +font-family: 'Fjalla One', sans-serif; +font-family: 'Kanit', sans-serif; +font-family: 'Lobster', cursive; +font-family: 'Rubik Wet Paint', cursive; +font-family: 'Secular One', sans-serif; +} + + +p{ + font-family: 'Luckiest Guy', cursive; + + font-family: 'Quicksand', sans-serif; +} + +.vies +{ + margin: 10px; +} + +ion-icon +{ + font-size: 50px; + fill: rgb(255, 0, 0); +} + +#inputBox +{ + background-color: #2acefc; + padding: 15px; + border: 5px; +} + +#inputBox label +{ + display: block; + margin-bottom: 8px; +} + +input, +button{ + outline: none; + border: none; + padding: 3px 20px; + border-radius: 5px; +} + +button +{ + background-color: teal; + color: white; + cursor: pointer; + transition: all 0.2s; +} + +button:hover{ + transform: translateY(-2px); + background-color: rgb(3, 158, 158); +} + +p#message +{ + margin: 20px auto 0 auto; +} + +#rejouer +{ + display: none; + margin: 5px auto 0 auto; +} + +#detail +{ + font-weight: bold; + font-size: 12px; + margin: 5px auto 0 auto; +} + diff --git a/Css/style.css b/Css/style.css new file mode 100644 index 0000000..51a331a --- /dev/null +++ b/Css/style.css @@ -0,0 +1,160 @@ + +* { + margin: 0; +} + + +body, html { + margin: 0; + padding: 0; + height: 100%; + overflow: hidden;; +} + + +body{ + background-image: url("../img/91657.jpg"); + background-size: cover; +} + +.header{ + position: relative; +} + + +.topbar{ + background-image: url("../img/91657.jpg"); + background-color: black; + padding: 20px; + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: solid 2px purple; +} + +.topbar a{ + color: white; + text-decoration: none; + padding: 10px; + margin: 0 10px 0 0; + font-weight: 900; + font-size: 17px; +} + + +.topbar a:hover{ + background-color: pink; + border-radius: 15px; + color: #0d134b; +} + + +.topbar .titre{ + font-size: 17px; + padding: 10px; + font-weight: bold; + text-transform: uppercase; + color: pink; +} + +.topbar .titre:hover{ + background-color: pink; + border-radius: 15px; + color: #0d134b; + +} + + +.container{ + position: absolute; + width: 100%; + height: 841px; + box-sizing: border-box; +} + + +.section{ + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%,-50%); + text-align: center; + width: 30%; +} + +.section .titre-h3{ + color: white; +} + +.play{ + background-color: pink; + padding: 20px; + border-radius: 30px; + display: inline-block; + text-align: center; + width: 100px; + height: 15px; + text-decoration: none; + margin-top: 60px; + font-weight: bold; + text-transform: uppercase; + color: #0d134b; + border: solid 5px purple; + +} + +.play:hover{ + background-color: purple; + border: solid 5px pink; + color: white; + +} + + + + + +@media (max-width: 522px){ + .topbar { + background-color: #1a237e; + padding: 15px; + display: flex; + flex-direction: column; + align-items: center; + } + + .topbar .titre { + margin-bottom: 18px; + font-size: 22px; + } + + .nav { + display: flex; + flex-direction: column; + justify-content: flex-end; + margin-top: 20px; + } + + .nav a{ + text-align: center; + margin-top: 5px; + padding: 7px; + } + + .topbar{ + position: relative; + text-align: center; + } + + .topbar a{ + text-align: center; + } + + .section { + margin-top: 80px; + width: 310px; + + } + + } + diff --git a/Js/dur.js b/Js/dur.js new file mode 100644 index 0000000..4c2e959 --- /dev/null +++ b/Js/dur.js @@ -0,0 +1,105 @@ +// Element du DOM + +const divVies = document.querySelector('.vies'); +const message = document.getElementById("message"); +const formulaire = document.getElementById('inputBox'); +const input = document.getElementById('number'); +const essayerbtn = document.getElementById('essayerBtn'); +const rejouebtn = document.getElementById('rejouer'); +const body = document.getElementsByTagName('body')[0]; + +// Modèle des coeurs + +const coeurvide = ''; +const coeurplein = ''; + +// Fond + +const froid = 'linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%)'; +const tiede = 'linear-gradient(to top, #fddb92 0%, #d1fdff 100%)'; +const chaud = 'linear-gradient(to right, #f78ca0 0%, #f9748f 19%, #fd868c 60%, #fe9a8b 100%)'; +const treschaud = 'linear-gradient(to top, #ff0844 0%, #ffb199 100%)'; + +const win = ' linear-gradient(to right, #f83600 0%, #f9d423 100%)'; +const loose = ' linear-gradient(to top, #e6b980 0%, #eacda3 100%)'; + +// Play + +const play = () => { + const randomNumber = Math.floor(Math.random() * 501); + const totalVies = 11; + let vies = totalVies; + + // Ajout de l'affichage initial des essais restants + const essaisRestantsSpan = document.getElementById("essaisRestants"); + essaisRestantsSpan.textContent = vies; + + console.log(randomNumber); + + // Actualisation à chaque essaie + formulaire.addEventListener('submit', (e) => { + e.preventDefault(); + const valeurInput = parseInt(input.value); + + if (valeurInput < 0 || valeurInput > 501) return; + + if (valeurInput === randomNumber) { + body.style.backgroundImage = win; + message.textContent = `Bravo! Le nombre était bien ${randomNumber}.`; + rejouebtn.style.display = "block"; + essayerbtn.setAttribute("disabled", ""); + } else { + if (randomNumber < valeurInput + 3 && randomNumber > valeurInput - 3) { + body.style.backgroundImage = treschaud; + message.textContent = "C'est brulant!!!🔥🔥🔥"; + } else if (randomNumber < valeurInput + 6 && randomNumber > valeurInput - 6) { + body.style.backgroundImage = chaud; + message.textContent = "C'est Chaud!🔥"; + } else if (randomNumber < valeurInput + 11 && randomNumber > valeurInput - 11) { + body.style.backgroundImage = tiede; + message.textContent = "C'est tiède😑"; + } else { + body.style.backgroundImage = froid; + message.textContent = "C'est froid🥶"; + } + vies--; + verifyLoose(); + } + + actualiseCoeurs(vies); + }); + + const verifyLoose = () => { + essaisRestantsSpan.textContent = vies; + + if (vies === 0) { + body.style.backgroundImage = loose; + body.style.color = '#990000'; + essayerbtn.setAttribute("disabled", ""); + message.textContent = `Vous avez perdu, le nombre était ${randomNumber}.`; + rejouebtn.style.display = "block"; + } + }; + + const actualiseCoeurs = (vies) => { + divVies.innerHTML = ""; + let tableauVies = []; + for (let i = 0; i < vies; i++) { + tableauVies.push(coeurplein); + } + for (let i = 0; i < totalVies - vies; i++) { + tableauVies.push(coeurvide); + } + tableauVies.forEach(coeur => { + divVies.innerHTML += coeur; + }); + }; + actualiseCoeurs(vies); + + rejouebtn.addEventListener('click', () => { + message.style.display = "block"; + document.location.reload(true); + }); +}; + +play(); diff --git a/Js/facile.js b/Js/facile.js new file mode 100644 index 0000000..525a610 --- /dev/null +++ b/Js/facile.js @@ -0,0 +1,103 @@ +//Element du DOM + +const divVies = document.querySelector('.vies'); +const message = document.getElementById("message"); +const formulaire = document.getElementById('inputBox'); +const input = document.getElementById('number'); +const essayerbtn = document.getElementById('essayerBtn'); +const rejouebtn = document.getElementById('rejouer'); +const body = document.getElementsByTagName('body')[0]; + +// modèle des coeurs +const coeurvide = '' +const coeurplein = '' + +// fond +const froid = 'linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%)'; +const tiede = 'linear-gradient(to top, #fddb92 0%, #d1fdff 100%)'; +const chaud = 'linear-gradient(to right, #f78ca0 0%, #f9748f 19%, #fd868c 60%, #fe9a8b 100%)'; +const treschaud = 'linear-gradient(to top, #ff0844 0%, #ffb199 100%)'; + +const win = ' linear-gradient(to right, #f83600 0%, #f9d423 100%)'; +const loose = ' linear-gradient(to top, #e6b980 0%, #eacda3 100%)'; + +// Play + +const play = () => { + const randomNumber = Math.floor(Math.random() * 101); + const totalVies = 6; + let vies = totalVies; + + // Ajout de l'affichage initial des essais restants + const essaisRestantsSpan = document.getElementById("essaisRestants"); + essaisRestantsSpan.textContent = vies; + + console.log(randomNumber); + + // Actualisation à chaque essaie + formulaire.addEventListener('submit', (e) => { + e.preventDefault(); + const valeurInput = parseInt(input.value); + + if (valeurInput < 0 || valeurInput > 100) return; + + if (valeurInput === randomNumber) { + body.style.backgroundImage = win; + message.textContent = `Bravo! Le nombre était bien ${randomNumber}.`; + rejouebtn.style.display = "block"; + essayerbtn.setAttribute("disabled", ""); + } else { + if (randomNumber < valeurInput + 3 && randomNumber > valeurInput - 3) { + body.style.backgroundImage = treschaud; + message.textContent = "C'est brulant!!!🔥🔥🔥"; + } else if (randomNumber < valeurInput + 6 && randomNumber > valeurInput - 6) { + body.style.backgroundImage = chaud; + message.textContent = "C'est Chaud!🔥"; + } else if (randomNumber < valeurInput + 11 && randomNumber > valeurInput - 11) { + body.style.backgroundImage = tiede; + message.textContent = "C'est tiède😑"; + } else { + body.style.backgroundImage = froid; + message.textContent = "C'est froid🥶"; + } + vies--; + verifyLoose(); + } + + actualiseCoeurs(vies); + }) + + const verifyLoose = () => { + essaisRestantsSpan.textContent = vies; + + if (vies === 0) { + body.style.backgroundImage = loose; + body.style.color = '#990000'; + essayerbtn.setAttribute("disabled", ""); + message.textContent = `Vous avez perdu, le nombre était ${randomNumber}.`; + rejouebtn.style.display = "block"; + } + } + + const actualiseCoeurs = (vies) => { + divVies.innerHTML = ""; + let tableauVies = []; + for (let i = 0; i < vies; i++) { + tableauVies.push(coeurplein); + } + for (let i = 0; i < totalVies - vies; i++) { + tableauVies.push(coeurvide); + } + tableauVies.forEach(coeur => { + divVies.innerHTML += coeur; + }) + } + actualiseCoeurs(vies); + + rejouebtn.addEventListener('click', () => { + message.style.display = "block"; + document.location.reload(true); + }) +} + +play(); diff --git a/Js/moyen.js b/Js/moyen.js new file mode 100644 index 0000000..091087b --- /dev/null +++ b/Js/moyen.js @@ -0,0 +1,103 @@ +//Element du DOM + +const divVies = document.querySelector('.vies'); +const message = document.getElementById("message"); +const formulaire = document.getElementById('inputBox'); +const input = document.getElementById('number'); +const essayerbtn = document.getElementById('essayerBtn'); +const rejouebtn = document.getElementById('rejouer'); +const body = document.getElementsByTagName('body')[0]; + +// modèle des coeurs +const coeurvide = '' +const coeurplein = '' + +// fond +const froid = 'linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%)'; +const tiede = 'linear-gradient(to top, #fddb92 0%, #d1fdff 100%)'; +const chaud = 'linear-gradient(to right, #f78ca0 0%, #f9748f 19%, #fd868c 60%, #fe9a8b 100%)'; +const treschaud = 'linear-gradient(to top, #ff0844 0%, #ffb199 100%)'; + +const win = ' linear-gradient(to right, #f83600 0%, #f9d423 100%)'; +const loose = ' linear-gradient(to top, #e6b980 0%, #eacda3 100%)'; + +//PLay + +const play = () => { + const randomNumber = Math.floor(Math.random() * 151); + const totalVies = 8; + let vies = totalVies; + + // Ajout de l'affichage initial des essais restants + const essaisRestantsSpan = document.getElementById("essaisRestants"); + essaisRestantsSpan.textContent = vies; + + console.log(randomNumber); + + // Actualisation à chaque essaie + formulaire.addEventListener('submit', (e) => { + e.preventDefault(); + const valeurInput = parseInt(input.value); + + if (valeurInput < 0 || valeurInput > 151) return; + + if (valeurInput === randomNumber) { + body.style.backgroundImage = win; + message.textContent = `Bravo! Le nombre était bien ${randomNumber}.`; + rejouebtn.style.display = "block"; + essayerbtn.setAttribute("disabled", ""); + } else { + if (randomNumber < valeurInput + 3 && randomNumber > valeurInput - 3) { + body.style.backgroundImage = treschaud; + message.textContent = "C'est brulant!!!🔥🔥🔥"; + } else if (randomNumber < valeurInput + 6 && randomNumber > valeurInput - 6) { + body.style.backgroundImage = chaud; + message.textContent = "C'est Chaud!🔥"; + } else if (randomNumber < valeurInput + 11 && randomNumber > valeurInput - 11) { + body.style.backgroundImage = tiede; + message.textContent = "C'est tiède😑"; + } else { + body.style.backgroundImage = froid; + message.textContent = "C'est froid🥶"; + } + vies--; + verifyLoose(); + } + + actualiseCoeurs(vies); + }) + + const verifyLoose = () => { + essaisRestantsSpan.textContent = vies; + + if (vies === 0) { + body.style.backgroundImage = loose; + body.style.color = '#990000'; + essayerbtn.setAttribute("disabled", ""); + message.textContent = `Vous avez perdu, le nombre était ${randomNumber}.`; + rejouebtn.style.display = "block"; + } + } + + const actualiseCoeurs = (vies) => { + divVies.innerHTML = ""; + let tableauVies = []; + for (let i = 0; i < vies; i++) { + tableauVies.push(coeurplein); + } + for (let i = 0; i < totalVies - vies; i++) { + tableauVies.push(coeurvide); + } + tableauVies.forEach(coeur => { + divVies.innerHTML += coeur; + }) + } + actualiseCoeurs(vies); + + rejouebtn.addEventListener('click', () => { + message.style.display = "block"; + document.location.reload(true); + }) +} + +play(); diff --git a/choix.html b/choix.html new file mode 100644 index 0000000..01220dc --- /dev/null +++ b/choix.html @@ -0,0 +1,47 @@ + + + + + + Choix / Numérologie + + + + + +
+
+

Numérologie

+ +
+
+ + +
+
+

Choisi(e) ton niveau

+ +
+ Facile + Moyen + Dur
+ Sortir +
+
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/dur.html b/dur.html new file mode 100644 index 0000000..bec4e2d --- /dev/null +++ b/dur.html @@ -0,0 +1,52 @@ + + + + + + Dur / Numérologie + + + + + +
+ + + +
+ + +
+

Numérologie

+

Trouve le bon nombre entre 0-500! Tu as 11 essais!

+
+ + + + + +
+
+ + + +

+ +
+

* Brulant = ± 2; Chaud = ± 5 ; Tiède = ± 10 ; Froid = + de 10.

+
Sortir +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/facile.html b/facile.html new file mode 100644 index 0000000..63a46a7 --- /dev/null +++ b/facile.html @@ -0,0 +1,53 @@ + + + + + + Facile / Numérologie + + + + + +
+ + + +
+ + +
+

Numérologie

+

Trouve le bon nombre entre 0-100! Tu as 6 essais!

+ +
+ + + + + +
+
+ + + +

+ +
+

* Brulant = ± 2; Chaud = ± 5 ; Tiède = ± 10 ; Froid = + de 10.

+
Sortir +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/img/91657.jpg b/img/91657.jpg new file mode 100644 index 0000000..efe3c8a Binary files /dev/null and b/img/91657.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..a868334 --- /dev/null +++ b/index.html @@ -0,0 +1,31 @@ + + + + + + Home / Numérologie + + + + +
+
+

Numérologie

+ +
+
+ +
+
+

Plongez dans le jeu de la numérologie !
Trouvez le nombre secret en déchiffrant les tranches données.


Êtes-vous prêt à percer les mystères des nombres ?

+ Play +
+
+ + + \ No newline at end of file diff --git a/moyen.html b/moyen.html new file mode 100644 index 0000000..6c66ec0 --- /dev/null +++ b/moyen.html @@ -0,0 +1,52 @@ + + + + + + Moyen / Numérologie + + + + + +
+ + + +
+ + +
+

Numérologie

+

Trouve le bon nombre entre 0-150! Tu as 8 essais!

+
+ + + + + +
+
+ + + +

+ +
+

* Brulant = ± 2; Chaud = ± 5 ; Tiède = ± 10 ; Froid = + de 10.

+
Sortir +
+ + + + + + + + + + + + \ No newline at end of file