diff --git a/site_campagne/static/campagne/images/affiche.png b/site_campagne/static/campagne/images/affiche.png new file mode 100644 index 0000000000000000000000000000000000000000..73111148f5fbd5cba9e0af78d1a744f6e9020cac Binary files /dev/null and b/site_campagne/static/campagne/images/affiche.png differ diff --git a/site_campagne/static/css/base.css b/site_campagne/static/css/base.css new file mode 100644 index 0000000000000000000000000000000000000000..5d7eb9dd672641f730d6c46a36a60d1d83690269 --- /dev/null +++ b/site_campagne/static/css/base.css @@ -0,0 +1,405 @@ +@import url('https://fonts.googleapis.com/css?family=Exo+2|Yatra+One'); + +*{ + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: 'Exo 2', sans-serif; +} + +body{ + background-color: #000; +} + +.pôle{ + margin-top: 60px; + text-align: center; +} + +.wrapper{ + margin-top: 0; + background-image: url("../images/bg.png"); + background-attachment: fixed; + background-repeat: none; + background-size: 100%; + padding: 10% 3% 3% 3%; + margin-bottom:40px; +} + +@media (min-width : 50em){ + .wrapper{ + background-image: url("../images/banquet2.png"); + background-attachment: fixed; + background-size: 100%; + padding: 10% 3% 3% 3%; + } +} + +.wrapper h1{ + font-family: 'Yatra One', cursive; + font-size: 48px; + color: #000; + margin-bottom: 25px; + text-align: center; + background-color: #fff; + margin: auto; + border-radius: 10px; + width: fit-content; +} + +.text_box{ + text-align: center; + background-color: #fff; + padding: 2%; + margin-top: 2%; + margin-bottom: 3%; + border-radius: 10px; +} + +.our_team{ + width: auto; + display: flex; + justify-content: center; + flex-wrap: wrap; +} + +.our_team .team_member{ + width: 250px; + margin: 5px; + background: #fff; + padding: 20px 10px; + border-radius: 10px; +} + +.our_team .team_member .member_img{ + background: #EA9238; + max-width: 190px; + width: 100%; + height: 190px; + margin: 0 auto; + border-radius: 50%; + padding: 5px; + position: relative; + cursor: pointer; +} + +.our_team .team_member .member_img img{ + width: 100%; + height: 100%; +} + +.our_team .team_member h3{ + text-transform: uppercase; + font-size: 18px; + line-height: 18px; + letter-spacing: 2px; + margin: 15px 0 0px; +} + +.our_team .team_member span{ + font-size: 10px; +} + +.our_team .team_member p{ + margin-top: 20px; + font-size: 14px; + line-height: 20px; +} + +.our_team .team_member .member_img .social_media{ + position: absolute; + top: 5px; + left: 5px; + background: rgba(0,0,0,0.65); + width: 95%; + height: 95%; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; + transform: scale(0); + transition: all 0.5s ease; +} + +.our_team .team_member .member_img .social_media .item{ + margin: 0 10px; +} + +.our_team .team_member .member_img .social_media .fab{ + color: #EA9238; + font-size: 20px; +} + +.our_team .team_member .member_img:hover .social_media{ + transform: scale(1); +} + +header{ + background-color: black; +} + +#logo{ + height: 70px; +} + +li{ + list-style: none; +} + +.nav-link , .nav-branding{ + color: white; + text-decoration: none; +} + +.container{ + max-width: 1224px; + width: 90%; + margin: 0 auto; +} + +.navbar{ + min-height: 70px; + display: flex; + justify-content: space-between; + align-items: center; +} + +.nav-branding{ + font-size: 2rem; +} + +.nav-menu{ + display: flex; + justify-content: space-between; + align-items: center; + gap: 60px; +} + +.nav-link{ + transition: 0.3s ease-out; +} + +.nav-link:hover{ + color: #EA9238; +} + +.hamburger{ + display: none; + cursor: pointer; +} + +.bar{ + display: block; + width: 25px; + height: 3px; + margin: 5px auto; + -webkit-transition: all 0.3s ease; + transition: all 0.3s ease; + background-color: white; +} + +@media(max-width:1024px){ + .hamburger{ + display: block; + } .hamburger.active .bar:nth-child(2){ + opacity: 0; + } .hamburger.active .bar:nth-child(1){ + transform: translateY(8px) rotate(45deg); + } .hamburger.active .bar:nth-child(3){ + transform: translateY(-8px) rotate(-45deg); + } .nav-menu{ + position: fixed; + left: -100%; + top: 70px; + gap: 0; + flex-direction: column; + background-color: #262626; + width: 100%; + text-align: center; + transition: 0.3s; + } .nav-item{ + margin: 16px 0; + } .nav-menu.active{ + left: 0; + } +} + +main{ +margin:0%; +} + +footer{ +margin : 0%; +background-color: black; +height: 7vh; +position: relative; +} +.le_bas{ + text-decoration:none; + position: absolute; + color: #EA9238; + top: 50%; + left: 50%; + -ms-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); +} + + + +#bouton_crepes{ + padding:3vh; + border-radius:5vh; + background-color: lightgray; + cursor: pointer; +} + +#bouton_crepes:hover{ + background-color: rgb(142, 142, 142); +} + +#commande_crepe{ + margin: 4% 5% 5% 5%; + padding: 2%; + align-items: center; + text-align: center; +} + +#bouton_crepes{ + background-color: white; +} + +.box_crepes{ + width: 250px; + margin: 5px; + background: #fff; + padding: 20px 10px; + border-radius: 10px; +} + +.block_commande{ + padding:3%; + margin:3%; + border-radius:5px; + background-color: white; +} + +.une_commande{ + margin:5px; + padding:1px; + padding-bottom: 7px; + border: 1px solid black; + border-radius:5px; + +} + +.une_commande p { + margin:3px; + padding:0; + text-align:center; +} + +.commandes{ + display: grid; + grid-template-columns: repeat( auto-fit, minmax(300px, 1fr)); + text-align: center; +} + +.bouton_gerer_commande{ + text-decoration:none; + padding:5px; + margin:0; + border:1px solid black; + background-color: lightgrey; + color:black; + border-radius:5px; + transition: 100ms; +} + +.bouton_gerer_commande:hover{ + background-color: rgb(182, 182, 182); +} + +.titre_page{ + text-align:center; + font-weight:bold; + font-size:25px; + padding-bottom:10px; +} + +.block_commande{ + margin-bottom:20px; +} + +.bouton_shotgun{ + text-align:center; + text-shadow: 0 0 5px rgb(152, 81, 202); + box-shadow: 0 0 5px rgb(152, 81, 202); + font-size:30px; + cursor:pointer; + text-decoration: none; + color: rgb(152, 81, 202); + border: 3px solid rgb(152, 81, 202); + padding:1%; + border-radius:15px; + transition: 100ms; + +} +.bouton_shotgun:hover{ + background-color:rgb(248, 239, 255) ; +} + +.bouton_hotline_signer{ + background-color: #e7c021; + color:white; + padding: 1%; + border-radius: 15px; + margin: 1% 3%; + text-decoration: none; + cursor:pointer; +} + +.txt_accueil{ + font-size:20px; + +} + +.conteneur_shotgun{ + margin-top:2%; +} + +.conteneur_affiche{ + display: flex; + justify-content: center; + text-align: center; +} +/* +@media screen and (max-width: 1500px){ + .affiche{ + width:70%; + } +} */ + +.affiche{ + width:50%; +} + +h1{ + padding:0 2%; +} + +footer { + position: fixed; + bottom: 0; + background-color: rgb(30, 30, 30); + color: white; + font-size: 10px; + padding: 1% 0% 2% 0%; + right: 0; + left: 0; + display: block; +} + +.le_bas a { + text-decoration: none; + color: #EA9238; +} diff --git a/site_campagne/static/images/abricot.jpg b/site_campagne/static/images/abricot.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6b82199abc21ffeca5acbf1f9a2c99e980b0937c Binary files /dev/null and b/site_campagne/static/images/abricot.jpg differ diff --git a/site_campagne/static/images/affiche.jpg b/site_campagne/static/images/affiche.jpg new file mode 100644 index 0000000000000000000000000000000000000000..50899003381af3252fed11382d8bf99e32164171 Binary files /dev/null and b/site_campagne/static/images/affiche.jpg differ diff --git a/site_campagne/static/images/affiche.png b/site_campagne/static/images/affiche.png new file mode 100644 index 0000000000000000000000000000000000000000..73111148f5fbd5cba9e0af78d1a744f6e9020cac Binary files /dev/null and b/site_campagne/static/images/affiche.png differ diff --git a/site_campagne/static/images/banquet.png b/site_campagne/static/images/banquet.png new file mode 100644 index 0000000000000000000000000000000000000000..7c5dc5481297d21a38139af6d8e044682119e73c Binary files /dev/null and b/site_campagne/static/images/banquet.png differ diff --git a/site_campagne/static/images/banquet2.png b/site_campagne/static/images/banquet2.png new file mode 100644 index 0000000000000000000000000000000000000000..ff7839242836244df079db4b67563196c97436b9 Binary files /dev/null and b/site_campagne/static/images/banquet2.png differ diff --git a/site_campagne/static/images/bg.png b/site_campagne/static/images/bg.png new file mode 100644 index 0000000000000000000000000000000000000000..bc8b493952fecf913e2f263dcd05a2c5a0fedf33 Binary files /dev/null and b/site_campagne/static/images/bg.png differ diff --git a/site_campagne/static/images/bgLeFaux.jpeg b/site_campagne/static/images/bgLeFaux.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..347bd41ebef67c1025afe094c2fb4637327f0639 Binary files /dev/null and b/site_campagne/static/images/bgLeFaux.jpeg differ diff --git a/site_campagne/static/images/bouclier.png b/site_campagne/static/images/bouclier.png new file mode 100644 index 0000000000000000000000000000000000000000..9476c834bc0025d4ba603cfeb2c88f002629c3b7 Binary files /dev/null and b/site_campagne/static/images/bouclier.png differ diff --git a/site_campagne/static/images/carteGif.png b/site_campagne/static/images/carteGif.png new file mode 100644 index 0000000000000000000000000000000000000000..7e587d80e9f4b4374e0c7b0947e6f4f9ddddbbab Binary files /dev/null and b/site_campagne/static/images/carteGif.png differ diff --git a/site_campagne/static/images/casque.png b/site_campagne/static/images/casque.png new file mode 100644 index 0000000000000000000000000000000000000000..7c6b29bf39b8eea15752c2e5d977f71694446d0d Binary files /dev/null and b/site_campagne/static/images/casque.png differ diff --git a/site_campagne/static/images/confiture.jpeg b/site_campagne/static/images/confiture.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..bd822f7dc253dfd061c5258496fad5af7aa54578 Binary files /dev/null and b/site_campagne/static/images/confiture.jpeg differ diff --git a/site_campagne/static/images/epee.png b/site_campagne/static/images/epee.png new file mode 100644 index 0000000000000000000000000000000000000000..9326f4f2f6d23a9d2769d5a5d8b716551f5b3cab Binary files /dev/null and b/site_campagne/static/images/epee.png differ diff --git a/site_campagne/static/images/fock.jpg b/site_campagne/static/images/fock.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5ab9a0dc031f3dd872912cf5d1afdf43b3fc98e9 Binary files /dev/null and b/site_campagne/static/images/fock.jpg differ diff --git a/site_campagne/static/images/gourde.png b/site_campagne/static/images/gourde.png new file mode 100644 index 0000000000000000000000000000000000000000..9533bd146e750914e96bc30462d77cd6f44da6cf Binary files /dev/null and b/site_campagne/static/images/gourde.png differ diff --git a/site_campagne/static/images/logoBDE.png b/site_campagne/static/images/logoBDE.png new file mode 100644 index 0000000000000000000000000000000000000000..b15de76d83f81aedcde90544ad6825a798cf7e57 Binary files /dev/null and b/site_campagne/static/images/logoBDE.png differ diff --git a/site_campagne/static/images/membres/adam.png b/site_campagne/static/images/membres/adam.png new file mode 100644 index 0000000000000000000000000000000000000000..7239d3ff74dc8d5141562a4fd10007e7bcee2567 Binary files /dev/null and b/site_campagne/static/images/membres/adam.png differ diff --git a/site_campagne/static/images/membres/alex.png b/site_campagne/static/images/membres/alex.png new file mode 100644 index 0000000000000000000000000000000000000000..0cdd13b9d1131b0793700738caccc4c302d3b4e2 Binary files /dev/null and b/site_campagne/static/images/membres/alex.png differ diff --git a/site_campagne/static/images/membres/alixA.png b/site_campagne/static/images/membres/alixA.png new file mode 100644 index 0000000000000000000000000000000000000000..c60ac6e94de898367a185da1f4795dee6211fbd0 Binary files /dev/null and b/site_campagne/static/images/membres/alixA.png differ diff --git a/site_campagne/static/images/membres/alixB.png b/site_campagne/static/images/membres/alixB.png new file mode 100644 index 0000000000000000000000000000000000000000..3e3ac7f7eb58a073b35dbc420f69ce03f3c48a09 Binary files /dev/null and b/site_campagne/static/images/membres/alixB.png differ diff --git a/site_campagne/static/images/membres/antoine.png b/site_campagne/static/images/membres/antoine.png new file mode 100644 index 0000000000000000000000000000000000000000..6498c9c8605920ccb5a365b637f97726d8184098 Binary files /dev/null and b/site_campagne/static/images/membres/antoine.png differ diff --git a/site_campagne/static/images/membres/armand.png b/site_campagne/static/images/membres/armand.png new file mode 100644 index 0000000000000000000000000000000000000000..7159778062906b406c35c0b11ca8104e440f8e08 Binary files /dev/null and b/site_campagne/static/images/membres/armand.png differ diff --git a/site_campagne/static/images/membres/baptisteA.png b/site_campagne/static/images/membres/baptisteA.png new file mode 100644 index 0000000000000000000000000000000000000000..1e259e26da71e713871426c1aad7a7f826b3114c Binary files /dev/null and b/site_campagne/static/images/membres/baptisteA.png differ diff --git a/site_campagne/static/images/membres/baptisteB.png b/site_campagne/static/images/membres/baptisteB.png new file mode 100644 index 0000000000000000000000000000000000000000..3a2416c34ecad1af9380865b20398696f4213353 Binary files /dev/null and b/site_campagne/static/images/membres/baptisteB.png differ diff --git a/site_campagne/static/images/membres/capucine.png b/site_campagne/static/images/membres/capucine.png new file mode 100644 index 0000000000000000000000000000000000000000..f2dca6751c85ee3e3f3c1b72b99c71207850f9ec Binary files /dev/null and b/site_campagne/static/images/membres/capucine.png differ diff --git a/site_campagne/static/images/membres/diane.png b/site_campagne/static/images/membres/diane.png new file mode 100644 index 0000000000000000000000000000000000000000..c072cbe86356ebd7145c83350021b3789247068a Binary files /dev/null and b/site_campagne/static/images/membres/diane.png differ diff --git a/site_campagne/static/images/membres/gad.png b/site_campagne/static/images/membres/gad.png new file mode 100644 index 0000000000000000000000000000000000000000..037705bc3820ce560cb9e3abe0d9ef5ecab929e1 Binary files /dev/null and b/site_campagne/static/images/membres/gad.png differ diff --git a/site_campagne/static/images/membres/hassan.png b/site_campagne/static/images/membres/hassan.png new file mode 100644 index 0000000000000000000000000000000000000000..bf9c36ac2f2dd9fbc6d4abdfd87f6ceadb0ebaa5 Binary files /dev/null and b/site_campagne/static/images/membres/hassan.png differ diff --git a/site_campagne/static/images/membres/hugo.png b/site_campagne/static/images/membres/hugo.png new file mode 100644 index 0000000000000000000000000000000000000000..31fa03eab7ba53b2dd564917940345cedb6c1a14 Binary files /dev/null and b/site_campagne/static/images/membres/hugo.png differ diff --git a/site_campagne/static/images/membres/james.png b/site_campagne/static/images/membres/james.png new file mode 100644 index 0000000000000000000000000000000000000000..91f700df0bed9793b4325321fc5cf130bdce6b36 Binary files /dev/null and b/site_campagne/static/images/membres/james.png differ diff --git a/site_campagne/static/images/membres/kelian.png b/site_campagne/static/images/membres/kelian.png new file mode 100644 index 0000000000000000000000000000000000000000..6a9b6c9df2f53cc5ba8f85f3720ac5504aa2d200 Binary files /dev/null and b/site_campagne/static/images/membres/kelian.png differ diff --git a/site_campagne/static/images/membres/khalil.png b/site_campagne/static/images/membres/khalil.png new file mode 100644 index 0000000000000000000000000000000000000000..737286f858ac2896d770735c881e8d73f63a865e Binary files /dev/null and b/site_campagne/static/images/membres/khalil.png differ diff --git a/site_campagne/static/images/membres/marineB.png b/site_campagne/static/images/membres/marineB.png new file mode 100644 index 0000000000000000000000000000000000000000..20af1b97dfdda16cdec0e7b52892763c281b0962 Binary files /dev/null and b/site_campagne/static/images/membres/marineB.png differ diff --git a/site_campagne/static/images/membres/marineT.png b/site_campagne/static/images/membres/marineT.png new file mode 100644 index 0000000000000000000000000000000000000000..81bdd433f8a7b7346b4f2c04e499aa59a683cc4b Binary files /dev/null and b/site_campagne/static/images/membres/marineT.png differ diff --git a/site_campagne/static/images/membres/martin.png b/site_campagne/static/images/membres/martin.png new file mode 100644 index 0000000000000000000000000000000000000000..effbb44c11efb101dbb53d8cec577c2a28e005e0 Binary files /dev/null and b/site_campagne/static/images/membres/martin.png differ diff --git a/site_campagne/static/images/membres/maxime.png b/site_campagne/static/images/membres/maxime.png new file mode 100644 index 0000000000000000000000000000000000000000..669ed4cc134e560918c274d2cb656e36aaeeee9d Binary files /dev/null and b/site_campagne/static/images/membres/maxime.png differ diff --git a/site_campagne/static/images/membres/maximilien.png b/site_campagne/static/images/membres/maximilien.png new file mode 100644 index 0000000000000000000000000000000000000000..d5c5c585fa83b91ec106babb505d4dbdbcf7baba Binary files /dev/null and b/site_campagne/static/images/membres/maximilien.png differ diff --git a/site_campagne/static/images/membres/milo.png b/site_campagne/static/images/membres/milo.png new file mode 100644 index 0000000000000000000000000000000000000000..160d0b170e22547594573553839904037a894b6e Binary files /dev/null and b/site_campagne/static/images/membres/milo.png differ diff --git a/site_campagne/static/images/membres/oscar.png b/site_campagne/static/images/membres/oscar.png new file mode 100644 index 0000000000000000000000000000000000000000..218c70105c23effa3bcccb6ec89ee37b67eab5d7 Binary files /dev/null and b/site_campagne/static/images/membres/oscar.png differ diff --git a/site_campagne/static/images/membres/pierre.png b/site_campagne/static/images/membres/pierre.png new file mode 100644 index 0000000000000000000000000000000000000000..926fc1daa1137c2d7909cd783d3b422840feff20 Binary files /dev/null and b/site_campagne/static/images/membres/pierre.png differ diff --git a/site_campagne/static/images/membres/quentin.png b/site_campagne/static/images/membres/quentin.png new file mode 100644 index 0000000000000000000000000000000000000000..c22a95616bc8f478843d309e20b441f023c162b3 Binary files /dev/null and b/site_campagne/static/images/membres/quentin.png differ diff --git a/site_campagne/static/images/membres/raphael.png b/site_campagne/static/images/membres/raphael.png new file mode 100644 index 0000000000000000000000000000000000000000..b728a3add202a2d367aacef32fdb91107d43fdac Binary files /dev/null and b/site_campagne/static/images/membres/raphael.png differ diff --git a/site_campagne/static/images/membres/reda.png b/site_campagne/static/images/membres/reda.png new file mode 100644 index 0000000000000000000000000000000000000000..b8a9d243cab3d1d8e5b2941e44ff4df1849c65a9 Binary files /dev/null and b/site_campagne/static/images/membres/reda.png differ diff --git a/site_campagne/static/images/membres/sachaC.png b/site_campagne/static/images/membres/sachaC.png new file mode 100644 index 0000000000000000000000000000000000000000..1abdda030a92040d933a85c2cd73d506b90a167b Binary files /dev/null and b/site_campagne/static/images/membres/sachaC.png differ diff --git a/site_campagne/static/images/membres/sachaK.png b/site_campagne/static/images/membres/sachaK.png new file mode 100644 index 0000000000000000000000000000000000000000..3bfd235e7076ff802ead33ef7fbdfbcf436b6a3b Binary files /dev/null and b/site_campagne/static/images/membres/sachaK.png differ diff --git a/site_campagne/static/images/membres/tiber.png b/site_campagne/static/images/membres/tiber.png new file mode 100644 index 0000000000000000000000000000000000000000..f2ec4325c734e52b574539900c58fae9c2ae64a3 Binary files /dev/null and b/site_campagne/static/images/membres/tiber.png differ diff --git a/site_campagne/static/images/membres/yann.png b/site_campagne/static/images/membres/yann.png new file mode 100644 index 0000000000000000000000000000000000000000..9db674d20cb3d8f20db61bb1e007d1197d432a1d Binary files /dev/null and b/site_campagne/static/images/membres/yann.png differ diff --git a/site_campagne/static/images/nature.jpeg b/site_campagne/static/images/nature.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5d6306f19f88678c79038d5fd37e21c10a3a4de4 Binary files /dev/null and b/site_campagne/static/images/nature.jpeg differ diff --git a/site_campagne/static/images/nutella.jpeg b/site_campagne/static/images/nutella.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..27afba5bba5c5d8638c12003578040653013adb8 Binary files /dev/null and b/site_campagne/static/images/nutella.jpeg differ diff --git a/site_campagne/static/images/placeMilan.jpg b/site_campagne/static/images/placeMilan.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a27cbef80932ebd10a2d76a6d9b6864f7c56d3b1 Binary files /dev/null and b/site_campagne/static/images/placeMilan.jpg differ diff --git a/site_campagne/static/images/sucre.jpeg b/site_campagne/static/images/sucre.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..c108e64ae1c7de725222794524f86cad233d053d Binary files /dev/null and b/site_campagne/static/images/sucre.jpeg differ diff --git a/site_campagne/static/js/actualisation.js b/site_campagne/static/js/actualisation.js new file mode 100644 index 0000000000000000000000000000000000000000..e1af80a7dd4c384f59700ebedfbe8c453bf3c648 --- /dev/null +++ b/site_campagne/static/js/actualisation.js @@ -0,0 +1,2 @@ +var nb = 15 ; +timer = window.setTimeout(" window.refresh();", 1000*nb, "JavaScript"); \ No newline at end of file diff --git a/site_campagne/static/js/hotline.js b/site_campagne/static/js/hotline.js new file mode 100644 index 0000000000000000000000000000000000000000..717bb8f040be8af5838dc5cfe44e8735ce76a0bb --- /dev/null +++ b/site_campagne/static/js/hotline.js @@ -0,0 +1,78 @@ +var commander = document.getElementById("bouton_crepes"); + +var bouton_nature = document.getElementById("nature"); +var bouton_sucre = document.getElementById("sucre"); +var bouton_nutella = document.getElementById("nutella"); +var bouton_confiture_fraise = document.getElementById("confiture_fraise"); +var bouton_confiture_abricot = document.getElementById("confiture_abricot"); +var bouton_adresse = document.getElementById("adresse") + +bloc = document.getElementById("commande_crepe"); + +var messageof_zero = true +var messageof_trop = true +var messageof_adresse = true +var messageof_string = true + +var nature = bouton_nature.value; +var nutella = bouton_nutella.value; +var sucre = bouton_sucre.value; +var fraise = bouton_confiture_fraise.value; +var abricot = bouton_confiture_abricot.value; +var adresse = bouton_adresse.value; + +nature=0;nutella=0;sucre=0;fraise=0;abricot=0; + +function f (){ + console.log("test") + nature = bouton_nature.value; + nutella = bouton_nutella.value; + sucre = bouton_sucre.value; + fraise = bouton_confiture_fraise.value; + abricot = bouton_confiture_abricot.value; + adresse = bouton_adresse.value; + function test(value){ + return (!(!(value!=="0") || parseInt(value))) + } + if (( test(nature)|| test(sucre) || test(nutella) || test(abricot) || test(fraise)) && messageof_string){ + var paraph = document.createElement("p"); + var texte = document.createTextNode("Le nombre de crêpes doit être entier."); + paraph.appendChild(texte); + bloc.appendChild(paraph); + messageof_string=false; + paraph.classList.add("text_box"); + } + else{ + somme=parseInt(nature)+parseInt(nutella)+parseInt(sucre)+parseInt(fraise)+parseInt(abricot) + if (somme <= 0 && messageof_zero ){ + var paraph = document.createElement("p"); + var texte = document.createTextNode("Vous devez choisir au moins une crêpe pour commander."); + paraph.appendChild(texte); + bloc.appendChild(paraph); + messageof_zero=false; + paraph.classList.add("text_box"); + } + + if (somme > 40 && messageof_trop){ + var paraph = document.createElement("p"); + var texte = document.createTextNode("Vous ne pouvez pas commander plus de 40 crêpes d'un coup."); + paraph.appendChild(texte); + bloc.appendChild(paraph); + messageof_trop=false; + paraph.classList.add("text_box"); + } + if (adresse==="" && messageof_adresse) { + var paraph = document.createElement("p"); + var texte = document.createTextNode("Vouz devez avoir rentré une adresse pour commander."); + paraph.appendChild(texte); + bloc.appendChild(paraph); + messageof_adresse=false; + paraph.classList.add("text_box"); + } + if (adresse!=="" && somme >0 && somme <= 40 ){ + window.location = "http://localhost:8000/mes_commandes/"+nature+"_"+nutella+"_"+sucre+"_"+fraise+"_"+abricot+"_"+adresse+"_"; + } + } +} + +commander.addEventListener("click", f); diff --git a/site_campagne/static/js/navbar.js b/site_campagne/static/js/navbar.js new file mode 100644 index 0000000000000000000000000000000000000000..b350b7a3c8a96a08122f37c9171a323a3d9d78ea --- /dev/null +++ b/site_campagne/static/js/navbar.js @@ -0,0 +1,12 @@ +const hamburger = document.querySelector(".hamburger"); +const navMenu = document.querySelector(".nav-menu"); + +hamburger.addEventListener("click", () => { + hamburger.classList.toggle("active"); + navMenu.classList.toggle("active"); + }) + +document.querySelectorAll(".nav-link").forEach(n => n.addEventListener("click", () => { + hamburger.classList.remove("active"); + navMenu.classList.remove("active"); +})) \ No newline at end of file