Changes, autocomplete etc.
This commit is contained in:
parent
801a3e25d3
commit
1582637343
5 changed files with 3555 additions and 3535 deletions
|
|
@ -20,9 +20,9 @@
|
||||||
<li><a href="home.html" target="_blank" rel="noopener">Page d'accueil</a></li>
|
<li><a href="home.html" target="_blank" rel="noopener">Page d'accueil</a></li>
|
||||||
<li><a href="connect.html" target="_blank" rel="noopener">Page de connexion</a></li>
|
<li><a href="connect.html" target="_blank" rel="noopener">Page de connexion</a></li>
|
||||||
<li><a href="create-account.html" target="_blank" rel="noopener">Création de compte</a></li>
|
<li><a href="create-account.html" target="_blank" rel="noopener">Création de compte</a></li>
|
||||||
<li><a href="profile.html" target="_blank" rel="noopener">Profil utilisateur</a></li>
|
<li><a href="profile.html" target="_blank" rel="noopener">Profil utilisateur</a><span class="badge bg-warning rounded-pill ms-2">updated: 11.12.24</span></li>
|
||||||
<li><a href="tandem-list.html" target="_blank" rel="noopener">Recherche TANDEM</a></li>
|
<li><a href="tandem-list.html" target="_blank" rel="noopener">Recherche TANDEM</a><span class="badge bg-warning rounded-pill ms-2">updated: 16.12.24</span></li>
|
||||||
<li><a href="404.html" target="_blank" rel="noopener">Error 404</a></li>
|
<li><a href="404.html" target="_blank" rel="noopener">Error 404</a><span class="badge bg-warning rounded-pill ms-2">updated: 11.12.24</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -37,9 +37,6 @@ body {
|
||||||
h1, h2, h3, h4, h5{
|
h1, h2, h3, h4, h5{
|
||||||
font-family: var(--bs-ttl-font-family);
|
font-family: var(--bs-ttl-font-family);
|
||||||
}
|
}
|
||||||
/* ::selection, ::-moz-selection {
|
|
||||||
text-shadow: none;
|
|
||||||
} */
|
|
||||||
.navbar-toggler{
|
.navbar-toggler{
|
||||||
color: var(--bs-btn-hover-bg);
|
color: var(--bs-btn-hover-bg);
|
||||||
}
|
}
|
||||||
|
|
@ -89,14 +86,6 @@ h1, h2, h3, h4, h5{
|
||||||
margin-top: var(--top-bar);
|
margin-top: var(--top-bar);
|
||||||
}
|
}
|
||||||
/* Screens */
|
/* Screens */
|
||||||
/* [data-screen="error404"], [data-screen="connect"]{
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
|
||||||
[data-screen="error404"] main, [data-screen="connect"] main{
|
|
||||||
margin: auto 0;
|
|
||||||
} */
|
|
||||||
[data-screen="search"] .container-fluid > .row, [data-screen="profile"] .container-fluid > .row{
|
[data-screen="search"] .container-fluid > .row, [data-screen="profile"] .container-fluid > .row{
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
@ -160,9 +149,6 @@ h1, h2, h3, h4, h5{
|
||||||
.hero-primary, .hero-secondary{
|
.hero-primary, .hero-secondary{
|
||||||
padding: var(--div-padding)
|
padding: var(--div-padding)
|
||||||
}
|
}
|
||||||
/* .hero-secondary{
|
|
||||||
min-height: 30vh;
|
|
||||||
} */
|
|
||||||
#lead{
|
#lead{
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
@ -367,6 +353,21 @@ label[for="lang"]{
|
||||||
#searchFilters label{
|
#searchFilters label{
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* autocomplete */
|
||||||
|
|
||||||
|
.autocomplete-suggestions {
|
||||||
|
border: 1px solid #e3e3e3;
|
||||||
|
max-height: 150px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.autocomplete-suggestion {
|
||||||
|
padding: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.autocomplete-suggestion:hover {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
/* overrides */
|
/* overrides */
|
||||||
ul, ol{
|
ul, ol{
|
||||||
padding-left: 1rem;
|
padding-left: 1rem;
|
||||||
|
|
|
||||||
29
static/js/autocomplete.js
Normal file
29
static/js/autocomplete.js
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
const input = document.getElementById('searchedLocationInput'),
|
||||||
|
suggestionsContainer = document.getElementById('searchedLocationSuggestions'),
|
||||||
|
options = [...document.getElementById('userSearchedLocation').options];
|
||||||
|
|
||||||
|
input.addEventListener('input', () => {
|
||||||
|
const inputValue = input.value.toLowerCase();
|
||||||
|
suggestionsContainer.innerHTML = '';
|
||||||
|
|
||||||
|
if (inputValue) { options.forEach(option => {
|
||||||
|
const optionText = option.text.toLowerCase();
|
||||||
|
if (optionText.includes(inputValue)) {
|
||||||
|
const suggestion = document.createElement('div');
|
||||||
|
suggestion.classList.add('autocomplete-suggestion');
|
||||||
|
suggestion.textContent = option.text;
|
||||||
|
suggestion.addEventListener('click', () => {
|
||||||
|
input.value = suggestion.textContent;
|
||||||
|
suggestionsContainer.innerHTML = '';
|
||||||
|
});
|
||||||
|
suggestionsContainer.appendChild(suggestion);
|
||||||
|
}
|
||||||
|
});}
|
||||||
|
});
|
||||||
|
document.addEventListener('click', (event) => {
|
||||||
|
if (!event.target.closest('#searchedLocationInput')) {
|
||||||
|
suggestionsContainer.innerHTML = '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
@ -5,38 +5,51 @@ function initTooltips(section) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkTermsandConditions(){
|
function checkTermsandConditions(){
|
||||||
const checkTerms = document.querySelector('#cgvCheck');
|
const checkTerms = document.getElementById('cgvCheck'),
|
||||||
const createAccountButton = document.querySelector('#btnCreateAccount');
|
createAccountButton = document.getElementById('btnCreateAccount');
|
||||||
createAccountButton.disabled = !checkTerms.checked;
|
createAccountButton.disabled = !checkTerms.checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function() {
|
const updateMeet = () => {
|
||||||
const offmenu = document.getElementById("offSideMenu"),
|
|
||||||
sidemenu = document.getElementById("secondNav");
|
|
||||||
|
|
||||||
const toggleMenus = ({ matches }) => {
|
|
||||||
if(offmenu && sidemenu){
|
|
||||||
offmenu.style.display = matches ? "block" : "none";
|
|
||||||
sidemenu.style.display = matches ? "none" : "block";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const mediaQuery = window.matchMedia("(max-width: 992px)");
|
|
||||||
|
|
||||||
mediaQuery.addEventListener('change', toggleMenus);
|
|
||||||
|
|
||||||
const meetOption1 = document.getElementById('userMeetOptionReal'),
|
const meetOption1 = document.getElementById('userMeetOptionReal'),
|
||||||
meetOption2 = document.getElementById('userMeetOptionVirtual'),
|
meetOption2 = document.getElementById('userMeetOptionVirtual'),
|
||||||
meetOption3 = document.getElementById('userMeetOptionHybrid'),
|
meetOption3 = document.getElementById('userMeetOptionHybrid'),
|
||||||
meetLocation = document.getElementById('userTandemMeetLocation');
|
meetLocation = document.getElementById('userTandemMeetLocation');
|
||||||
|
if (meetLocation) {
|
||||||
|
meetLocation.style.display = (meetOption1?.checked || meetOption3?.checked) ? 'block' : 'none';
|
||||||
|
[meetOption1, meetOption2, meetOption3].forEach(option => {
|
||||||
|
if (option) {
|
||||||
|
option.addEventListener('change', updateMeet);
|
||||||
|
}}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const updateMeet = () => {
|
const toggleMenus = ({ matches }) => {
|
||||||
if (meetLocation) {meetLocation.style.display = (meetOption1?.checked || meetOption3?.checked) ? 'block' : 'none'; }
|
const offMenu = document.getElementById("offSideMenu"),
|
||||||
};
|
sideMenu = document.getElementById("secondNav");
|
||||||
|
if(offMenu && sideMenu){
|
||||||
|
offMenu.style.display = matches ? "block" : "none";
|
||||||
|
sideMenu.style.display = matches ? "none" : "block";
|
||||||
|
mediaQuery.addEventListener('change', toggleMenus);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
[meetOption1, meetOption2, meetOption3].forEach(option => { if (option) { option.addEventListener('change', updateMeet); }} );
|
const radiusUpdate = () => {
|
||||||
|
const rangeInput = document.getElementById('townRadius'),
|
||||||
|
rangeValue = document.getElementById('townRadiusValue');
|
||||||
|
if (rangeInput && rangeValue) {
|
||||||
|
rangeInput.addEventListener('input', () => {
|
||||||
|
rangeValue.textContent = rangeInput.value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
mediaQuery = window.matchMedia("(max-width: 992px)");
|
||||||
|
|
||||||
|
radiusUpdate();
|
||||||
updateMeet();
|
updateMeet();
|
||||||
initTooltips(document);
|
initTooltips(document);
|
||||||
toggleMenus(mediaQuery); // Initial check
|
toggleMenus(mediaQuery);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
6969
tandem-list.html
6969
tandem-list.html
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue