Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Vital-Vuillaume committed Feb 16, 2024
1 parent 276b174 commit acd9eb1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
25 changes: 7 additions & 18 deletions My-Website.css
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,11 @@ img, .custom-menu {

font-size: 1em;
color: red;
margin-top: 55px;
margin-top: 35px;
position: absolute;
left: 50%;
transform: translate(-50%,-50%);
width: max-content;

}

Expand Down Expand Up @@ -667,17 +671,6 @@ img, .custom-menu {

}

/*-----Vu pour petit ecran-----*/

@media screen and (max-width: 1080px) {

.shortcut {

width: 330px;

}

}

/*-----Vu pour tablette-----*/

Expand Down Expand Up @@ -856,7 +849,7 @@ img, .custom-menu {
.img:active {

transform: scale(0.8);
transition: 0.2s;


}

Expand Down Expand Up @@ -913,12 +906,8 @@ img, .custom-menu {

.no-results {

font-size: 1.1em;
font-size: 1em;
margin-top: 25px;
position: absolute;
left: 50%;
transform: translate(-50%,-50%);
width: max-content;

}

Expand Down
9 changes: 8 additions & 1 deletion My-Website.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const btnActualiser = document.querySelector(".btnMenu:first-child");
const btnLienTheme = document.querySelector(".btnMenu:nth-child(3)");
const btnLienEcran = document.querySelector(".btnMenu:nth-child(4)");
const btnCustomMenu = document.querySelector(".btnMenu:nth-child(5)");
const containerRecherche = document.querySelector('.containerRecherche');
const Recherche = document.querySelector('.recherche');
const resultats = document.querySelector('.resultats');
const txtRecherche = document.querySelector('.txtRecherche');
Expand Down Expand Up @@ -341,7 +342,13 @@ function displaySearchResults(searchTerm) {
}

if (resultats.innerHTML === '') {
resultats.innerHTML = '<div class="no-results">Aucun résultat trouvé pour la recherche.</div>';
resultats.innerHTML = `<div class="no-results">Aucun résultat trouvé pour "${Recherche.value}".</div>`;
containerRecherche.style.overflow = "hidden";
containerRecherche.style.height = "200px";
}
else {
containerRecherche.style.overflow = "auto";
containerRecherche.style.height = "auto";
}
localStorage.setItem('previousSearch', searchTerm);
}
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<div id="section2" class="section2">
<p class="titre">Mes projets</p>
<div class="containerRecherche">
<input class="recherche" type="text" placeholder="Rechercher un projet..." autocomplete="off">
<input class="recherche" type="text" placeholder="Rechercher un projet..." autocomplete="off" maxlength="14">
<div class="resultats"></div>
</div>
<div class="txtRecherche">
Expand Down

0 comments on commit acd9eb1

Please sign in to comment.