From 8d70362b9c0591699aa59f2021bd3f65631d965f Mon Sep 17 00:00:00 2001 From: iTrooz_ Date: Fri, 29 Oct 2021 15:57:45 +0200 Subject: [PATCH] zswevgbh --- db/man.json | 13 +++++++++++- db/woman.json | 16 ++++++++++++++- footer.php | 4 ++-- for.php | 48 +++++++++++++++++++++++++++++++++++++------ header.html | 28 ------------------------- header.php | 11 +++++++--- index.php | 3 ++- js/nav.js | 18 ++++++++++++++++ js/themeManager.js | 33 +++++++++++++++++++++++++++++ nav.js | 8 -------- styles/today/main.css | 25 ++++++++++++++++++---- success.php | 2 +- 12 files changed, 154 insertions(+), 55 deletions(-) delete mode 100644 header.html create mode 100644 js/nav.js create mode 100644 js/themeManager.js delete mode 100644 nav.js diff --git a/db/man.json b/db/man.json index e97762c..992951a 100644 --- a/db/man.json +++ b/db/man.json @@ -59,5 +59,16 @@ "age" : 30, "bio" :"Salut je suis Vincent et je suis facteur. Alors laisse moi te poster ma déclaration." } - + ,{ + "prenom" : "Talon", + "nom" : "Riel", + "age" : 40, + "bio" :"bonjour je suis humoriste de proféssion. Si tu veux ecouté mes calembours vien me parlé" + } + ,{ + "prenom" : "Claude", + "nom" : "Brisebois", + "age" : 27, + "bio" : "Bonsoir je m'appelle Claude et j'aime la chasse et la pêche traditionnelle" + } ] diff --git a/db/woman.json b/db/woman.json index 8b686cd..5cf38e5 100644 --- a/db/woman.json +++ b/db/woman.json @@ -63,6 +63,20 @@ "prenom" : "Alexandrie", "nom" : "Lacasse", "age" : 32, - "bio" :"SAlut je suis une jeune fille qui cherche déséperment l'ammour alors s'il te plaît fait le premier pas." + "bio" :"Salut je suis une jeune fille qui cherche déséperement l'ammour alors s'il te plaît fait le premier pas." } + ,{ + "prenom" : "Élodie", + "nom" : "Fontaine", + "age" : 39, + "bio" : "Bonjour, je suis Élodie et je suis atteinte de l'hippopotomonstrosesquippedaliophobie alors n'utilise pas des mots trop long pour ta disquette." + } + ,{ + "prenom" : "", + "nom" : "", + "age" : , + "bio" :"" + } + + ] \ No newline at end of file diff --git a/footer.php b/footer.php index 65ba885..7563910 100644 --- a/footer.php +++ b/footer.php @@ -3,11 +3,11 @@

Donnez nous votre avis

C'est 100% anonyme !

- +
-
+
  • Mentions légales
  • Qui sommes nous
  • diff --git a/for.php b/for.php index 99d4a4b..dcd5110 100644 --- a/for.php +++ b/for.php @@ -8,7 +8,7 @@ - + Recherche <?php if(isset($_GET["gender"])){ if($_GET["gender"]=="man")echo "d'un homme"; @@ -36,23 +36,59 @@ <section id="form"> <form action="" id="form" method="post" enctype="text/plain"> <!-- peux tu lecher ton coude --> - <!------------------------------> <label for="lechercoude">Sais-tu te lécher le coude ?</label> <select name="lechercoude" id="lechercoude"> - <option value="Oui">Oui</option> - <option value="Non">Non</option> + <option value="Cette personne est un alien">Oui</option> + <option value="personne normale">Non</option> </select> + <!------------------------------> + <br> + <!-- 100 metres nage libre --> <label for="100m">Combien de temps fais-tu au 100m nage libre ? (minutes)</label> <input type="number" name="100m" id="100m"> - <!-- 100 metres nage libre --> <!------------------------------> + <br> <!-- solde de la carte banquaire --> + <label for="solde">Quel est le solde actuel de votre compte banquaire?</label> + <input type="number" name="solde" id="solde" step="100"> <!------------------------------> - <!-- --> + <br> + <!-- rib --> + <label for="rib">Pouriez vous saisir votre rib?</label> + <input type="text" name="rib" id="rib"> <!------------------------------> + <br> <!-- systeme s'exploitation --> + <label for="os">Quel est le meilleur system d'exploitation?</label> + <select name="os" id="os"> + <option value="linux master race, une personne de culture">Linux</option> + <option value="encore un kikou windows ou macos, ou pire, un utilisateur de bsd">autre</option> + </select> <!------------------------------> + <br> <!-- les feux de l'amour ou helene et les garcons --> + <p>Quel est la meilleur serie?</p> + <input type="radio" id="fdla" name="serie" value="feux"> + <label for="fdlr">Feux de l'amour</label> + <input type="radio" id="helene" name="serie" value="helene"> + <label for="helene">Helene et les garcons</label> + <!------------------------------> + <br> + <!-- Pilote de chasse --> + <!------------------------------> + <br> + <!-- Terre plate ou ronde --> + <label for="lechercoude">Quel est la forme de la terre</label> + <select name="lechercoude" id="lechercoude"> + <option value="Cette personne est un alien">Oui</option> + <option value="personne normale">Non</option> + </select> + <!------------------------------> + <!-- Pain au chocolat --> + <!------------------------------> + <!-- est ce toute les route menent au Roms --> + <!------------------------------> + <!-- quel est le nom du bateau dans le film Titanic --> <!------------------------------> </form> </section> diff --git a/header.html b/header.html deleted file mode 100644 index 8bd1d59..0000000 --- a/header.html +++ /dev/null @@ -1,28 +0,0 @@ - -<header> - <section id="title"> - <img src="img/logo.png" alt="Logo don't meet me" id="logo"> - </section> - <section> - <nav> - <a href="#" class="burger_button"> - <span class="bar"></span> - <span class="bar"></span> - <span class="bar"></span> - </a> - <div class="navbar_links"> - <ul> - <li><a href="index.php">Acceuil</a></li> - <li><a href="for.php?gender=man">Trouve un homme !</a></li> - <li><a href="for.php?gender=woman">Trouve une femme ! </a></li> - <li><a href="contact.php">Qui sommes nous</a></li> - <li> - <section id="sec_switch"> - <a href="index.php"><img src="img/switchoff.png" alt="bouton pour chager de thème" id="switch"></a> - </section> - </li> - </ul> - </div> - </nav> - </section> -</header> \ No newline at end of file diff --git a/header.php b/header.php index 8bd1d59..d38fdfa 100644 --- a/header.php +++ b/header.php @@ -1,3 +1,8 @@ +<?php // theme manager + // if(isset($_GET("settheme"))){ + // if() + // } +?> <header> <section id="title"> @@ -5,12 +10,12 @@ </section> <section> <nav> - <a href="#" class="burger_button"> + <a href="#" class="burger_button" onclick="menu()"> <span class="bar"></span> <span class="bar"></span> <span class="bar"></span> </a> - <div class="navbar_links"> + <div class="navbar_links hide"> <ul> <li><a href="index.php">Acceuil</a></li> <li><a href="for.php?gender=man">Trouve un homme !</a></li> @@ -18,7 +23,7 @@ <li><a href="contact.php">Qui sommes nous</a></li> <li> <section id="sec_switch"> - <a href="index.php"><img src="img/switchoff.png" alt="bouton pour chager de thème" id="switch"></a> + <a onClick="updateTheme"><img src="img/switchoff.png" alt="bouton pour chager de thème" id="switch"></a> </section> </li> </ul> diff --git a/index.php b/index.php index a27f582..2a734de 100644 --- a/index.php +++ b/index.php @@ -8,7 +8,8 @@ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Zen+Kurenaido&display=swap" rel="stylesheet"> <link rel="shortcut icon" href="img/favicon.png" type="image/x-icon"> - <script src="nav.js" defer></script> + <script src="js/nav.js" defer></script> + <script src="js/themeManager.js" defer></script> <title>Accueil | Don't meet me diff --git a/js/nav.js b/js/nav.js new file mode 100644 index 0000000..da6185c --- /dev/null +++ b/js/nav.js @@ -0,0 +1,18 @@ +const toggleButton = document.getElementsByClassName('burger_button')[0] +const navbarLinks = document.getElementsByClassName('navbar_links')[0] +var hide = 1 +//toggleButton.addEventListener('click',() => { +// navbarLinks.classList.remove('hide') +//}) + +function menu(){ + console.log('Je rentre dans la fonction') + if(hide == 1){ + navbarLinks.classList.remove('hide') + hide = 0 + } + else{ + navbarLinks.classList.add('hide') + hide = 1 + } +} \ No newline at end of file diff --git a/js/themeManager.js b/js/themeManager.js new file mode 100644 index 0000000..396ed7f --- /dev/null +++ b/js/themeManager.js @@ -0,0 +1,33 @@ +function updateTheme(a){ + console.log("a"); + // delTheme(); + // if(currentTheme=="today"){ + // link.href = "styles/today/main.css"; + // }else if(themeName=="2000"){ + // setTheme(themeName); +} + +function delTheme(){ + let themeNode = document.getElementById("theme"); + themeNode.parentNode.removeChild(themeNode); +} + +function setTheme(themeName){ + + let head = document.getElementsByTagName("HEAD")[0]; + let link = document.createElement("link"); + + // set the attributes for link element + link.rel = "stylesheet"; + link.type = "text/css"; + link.id = "theme"; + if(themeName=="today"){ + link.href = "styles/today/main.css"; + }else if(themeName=="2000"){ + link.href = "styles/2000/main.css"; + }else throw new Error("invalid theme : "+themeName); + head.appendChild(link); +} + +var currentTheme = "today"; +setTheme(currentTheme); \ No newline at end of file diff --git a/nav.js b/nav.js deleted file mode 100644 index 7ed25d0..0000000 --- a/nav.js +++ /dev/null @@ -1,8 +0,0 @@ -const toggleButton = document.getElementsByClassName('burger_button')[0] -const navbarLinks = document.getElementsByClassName('navbar_links')[0] - -toggleButton.addEventListener('click',() => { - console.log('coucou je dans la fonciton') - console.log(navbarLinks.classList) - navbarLinks.classList.toggle('active') -}) \ No newline at end of file diff --git a/styles/today/main.css b/styles/today/main.css index 3184079..e55a57f 100644 --- a/styles/today/main.css +++ b/styles/today/main.css @@ -70,27 +70,39 @@ footer{ flex-direction: row; background-color: pink; } + footer #feedback #form{ display: flex; flex-direction: column; - width: 100px; - height: auto; } + footer #feedback #form #send{ justify-self: flex-start; } + footer #feedback #form #txtfeedback{ resize: none; } +footer #rightfoot ul{ + font-size: 1rem; + display : flex; + flex-direction: column; + text-align: center; + justify-content: center; +} + + +@media screen and (max-width:1000px){ + #title{ + justify-content: left; + } -@media screen and (max-width:800px){ .burger_button{ display: flex } .navbar_links{ - display: flex; width: 100%; } @@ -115,4 +127,9 @@ footer #feedback #form #txtfeedback{ .navbar_links .active{ display: flex; } + + .hide{ + display: none; +c + } } \ No newline at end of file diff --git a/success.php b/success.php index 9b87429..e41bef0 100644 --- a/success.php +++ b/success.php @@ -8,7 +8,7 @@ - + It's a don't meet ! | Don't meet me