diff --git a/Install-My-Website.zip b/Download/Install-My-Website.zip similarity index 100% rename from Install-My-Website.zip rename to Download/Install-My-Website.zip diff --git a/My-Website.css b/Site/Css/My-Website.css similarity index 98% rename from My-Website.css rename to Site/Css/My-Website.css index 7cae9ee..7554ab3 100644 --- a/My-Website.css +++ b/Site/Css/My-Website.css @@ -298,7 +298,7 @@ img, .custom-menu { flex-direction: column; align-items: center; position: relative; - margin-top: 45px; + margin-top: 10px; } @@ -310,13 +310,13 @@ img, .custom-menu { border-radius: 7px; font-size: 1.1em; padding: 15px; - top: 65px; - position: fixed; + top: 0px; + position: relative; border: 1px var(--couleur) solid; background-color: var(--default); color: var(--default2); backdrop-filter: blur(10px); - z-index: 2000; + z-index: 100; } @@ -467,7 +467,7 @@ img, .custom-menu { width: 25px; height: 25px; pointer-events: none; - background-image: url(curseur.png); + background-image: url(/Site/Image/curseur.png); background-size: cover; background-position: center; z-index: 20000; @@ -477,7 +477,7 @@ img, .custom-menu { .curseur.active { - background-image: url(pointer.png); + background-image: url(/Site/Image/pointer.png); } @@ -869,9 +869,10 @@ img, .custom-menu { .recherche { - position: relative; + position: initial; transition: 0.9s; width: 100%; + transition: 0s; top: 0; } diff --git a/accueil-active.png b/Site/Image/accueil-active.png similarity index 100% rename from accueil-active.png rename to Site/Image/accueil-active.png diff --git a/accueil.png b/Site/Image/accueil.png similarity index 100% rename from accueil.png rename to Site/Image/accueil.png diff --git a/curseur.png b/Site/Image/curseur.png similarity index 100% rename from curseur.png rename to Site/Image/curseur.png diff --git a/parametres-active.png b/Site/Image/parametres-active.png similarity index 100% rename from parametres-active.png rename to Site/Image/parametres-active.png diff --git a/parametres.png b/Site/Image/parametres.png similarity index 100% rename from parametres.png rename to Site/Image/parametres.png diff --git a/pointer.png b/Site/Image/pointer.png similarity index 100% rename from pointer.png rename to Site/Image/pointer.png diff --git a/recherche-active.png b/Site/Image/recherche-active.png similarity index 100% rename from recherche-active.png rename to Site/Image/recherche-active.png diff --git a/recherche.png b/Site/Image/recherche.png similarity index 100% rename from recherche.png rename to Site/Image/recherche.png diff --git a/ubuntu.png b/Site/Image/ubuntu.png similarity index 100% rename from ubuntu.png rename to Site/Image/ubuntu.png diff --git a/windows.png b/Site/Image/windows.png similarity index 100% rename from windows.png rename to Site/Image/windows.png diff --git a/icone.ico b/Site/ImageSite/icone.ico similarity index 100% rename from icone.ico rename to Site/ImageSite/icone.ico diff --git a/icone.png b/Site/ImageSite/icone.png similarity index 100% rename from icone.png rename to Site/ImageSite/icone.png diff --git a/icone.svg b/Site/ImageSite/icone.svg similarity index 100% rename from icone.svg rename to Site/ImageSite/icone.svg diff --git a/Site/Install-My-Website.zip b/Site/Install-My-Website.zip new file mode 100644 index 0000000..19f67a0 Binary files /dev/null and b/Site/Install-My-Website.zip differ diff --git a/My-Website.js b/Site/Js/My-Website.js similarity index 92% rename from My-Website.js rename to Site/Js/My-Website.js index 5f206ca..2e2d46e 100644 --- a/My-Website.js +++ b/Site/Js/My-Website.js @@ -1,8 +1,8 @@ //------Pour que le site soit securise------\\ -if (window.location.protocol != "https:") { +/*if (window.location.protocol != "https:") { window.location.protocol="https:"; -} +}*/ //------Element html------\\ @@ -42,7 +42,7 @@ const annuler = document.querySelector('.annuler'); //-----Afficher la section 1 par defaut----\\ window.addEventListener('load', function() { - showSection(section1); + showSection(section2); }); //------Sauvgarde du Menu contextuel------\\ @@ -133,6 +133,27 @@ btnCustomMenu.onclick = function() { updateMenuContextuelLocalStorage(); } + +function scrollTop() { + const currentScroll = window.scrollY; + const duration = 500; + const startTime = performance.now(); + + function animateScroll(timestamp) { + const elapsedTime = timestamp - startTime; + const progress = Math.min(elapsedTime / duration, 1); + const newScroll = currentScroll * (1 - progress); + + window.scrollTo(0, newScroll); + + if (progress < 1) { + requestAnimationFrame(animateScroll); + } + } + requestAnimationFrame(animateScroll); +} + + //-----Changement de page-----\\ function showSection(section) { @@ -140,23 +161,23 @@ function showSection(section) { section2.style.display = 'none'; section3.style.display = 'none'; section.style.display = 'block'; - window.scrollTo(0, 0); + scrollTop() } btn1.addEventListener('click', function() { showSection(section1); - window.scrollTo(0, 0); + scrollTop() }); btn2.addEventListener('click', function() { showSection(section2); - window.scrollTo(0, 0); + scrollTop() }); btn3.addEventListener('click', function() { showSection(section3); - window.scrollTo(0, 0); + scrollTop() }); //-----Changement du titre quand ton n'est plus sur l'onglet-----\\ @@ -174,13 +195,13 @@ window.addEventListener("focus", () => { //-----Barre de navigation qui s'agrandit-----\\ btn.onclick = function ajouterClassNav() { - nav.classList.toggle("active"); + nav.classList.toggle("active"); }; //-----Afficher le bouton accueil par defaut-----\\ btn1.classList.add('active'); -image1.src = 'accueil-active.png'; +image1.src = 'Site/Image/accueil-active.png'; //-----Changement des boutons-----\\ @@ -189,11 +210,11 @@ btn1.onclick = function() { return; } - image1.src = 'accueil-active.png'; + image1.src = 'Site/Image/accueil-active.png'; btn1.classList.add('active'); - image2.src = 'recherche.png'; + image2.src = 'Site/Image/recherche.png'; btn2.classList.remove('active'); - image3.src = 'parametres.png'; + image3.src = 'Site/Image/parametres.png'; btn3.classList.remove('active'); }; @@ -202,11 +223,11 @@ btn2.onclick = function() { return; } - image2.src = 'recherche-active.png'; + image2.src = 'Site/Image/recherche-active.png'; btn2.classList.add('active'); - image1.src = 'accueil.png'; + image1.src = 'Site/Image/accueil.png'; btn1.classList.remove('active'); - image3.src = 'parametres.png'; + image3.src = 'Site/Image/parametres.png'; btn3.classList.remove('active'); }; @@ -215,11 +236,11 @@ btn3.onclick = function() { return; } - image3.src = 'parametres-active.png'; + image3.src = 'Site/Image/parametres-active.png'; btn3.classList.add('active'); - image1.src = 'accueil.png'; + image1.src = 'Site/Image/accueil.png'; btn1.classList.remove('active'); - image2.src = 'recherche.png'; + image2.src = 'Site/Image/recherche.png'; btn2.classList.remove('active'); }; @@ -285,6 +306,7 @@ Recherche.addEventListener('input', function() { if (searchTerm === '') { txtRecherche.style.display = 'flex'; + containerRecherche.style.height = "200px"; clearResults(); } else { txtRecherche.style.display = 'none'; @@ -342,11 +364,13 @@ function displaySearchResults(searchTerm) { } if (resultats.innerHTML === '') { - resultats.innerHTML = `
Aucun résultat trouvé pour "${Recherche.value}".
`; + resultats.classList.add("no-results") + resultats.textContent = `Aucun résultat trouvé pour "${Recherche.value}"`; containerRecherche.style.overflow = "hidden"; containerRecherche.style.height = "200px"; } else { + resultats.classList.remove("no-results") containerRecherche.style.overflow = "auto"; containerRecherche.style.height = "auto"; } @@ -600,4 +624,4 @@ annuler.onclick = function() { popup.style.opacity = 0; section3.style.overflow = "auto"; isPopupVisible = false; -}; +}; \ No newline at end of file diff --git a/index.html b/index.html index 03c0c3b..3ace159 100644 --- a/index.html +++ b/index.html @@ -4,11 +4,11 @@ - - - - - + + + + + Vital @@ -22,33 +22,10 @@

Changer de thème

Mettre en plein écran

Mettre le menu contextuel par défault

-

Téléchargez le raccourcis pour Ubuntu

+

Téléchargez le raccourcis pour Ubuntu

Téléchargez le raccourcis pour Windows

- - - - -
@@ -103,18 +80,40 @@

Raccourcis pour le site

- Ubuntu + Ubuntu

Ubuntu

Sauvegarder-le et exécutez "My-Website-Shortcut-Ubuntu.sh".

- Télécharger pour ubuntu + Télécharger pour ubuntu
- Windows + Windows

Windows

Lorem ipsum dolor sit amet consectetur adipisicing elit. Rem.

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