fix: liens du menu pointant vers la page d'accueil
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
[
|
||||
{ "text": "Solutions", "url": "#solutions" },
|
||||
{ "text": "Our projects", "url": "#projets" },
|
||||
{ "text": "DJANGOKAM", "url": "#djangokam" },
|
||||
{ "text": "Services", "url": "#hebergement" },
|
||||
{ "text": "Donate", "url": "#dons" },
|
||||
{ "text": "Solutions", "url": "/en/#solutions" },
|
||||
{ "text": "Our projects", "url": "/en/#projets" },
|
||||
{ "text": "DJANGOKAM", "url": "/en/#djangokam" },
|
||||
{ "text": "Services", "url": "/en/#hebergement" },
|
||||
{ "text": "Donate", "url": "/en/#dons" },
|
||||
{
|
||||
"text": "Resources",
|
||||
"children": [
|
||||
{ "text": "Our work", "url": "#clients" },
|
||||
{ "text": "Our instances", "url": "#services-libres" },
|
||||
{ "text": "FAQ", "url": "#faq" },
|
||||
{ "text": "Our work", "url": "/en/#clients" },
|
||||
{ "text": "Our instances", "url": "/en/#services-libres" },
|
||||
{ "text": "FAQ", "url": "/en/#faq" },
|
||||
{ "text": "Press", "url": "/en/press/" },
|
||||
{ "text": "Labola", "url": "https://labola.o-k-i.net/", "external": true }
|
||||
]
|
||||
},
|
||||
{ "text": "Contact", "url": "#contact" }
|
||||
{ "text": "Contact", "url": "/en/#contact" }
|
||||
]
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
[
|
||||
{ "text": "Solutions", "url": "#solutions" },
|
||||
{ "text": "Nos projets", "url": "#projets" },
|
||||
{ "text": "DJANGOKAM", "url": "#djangokam" },
|
||||
{ "text": "Services", "url": "#hebergement" },
|
||||
{ "text": "Dons", "url": "#dons" },
|
||||
{ "text": "Solutions", "url": "/#solutions" },
|
||||
{ "text": "Nos projets", "url": "/#projets" },
|
||||
{ "text": "DJANGOKAM", "url": "/#djangokam" },
|
||||
{ "text": "Services", "url": "/#hebergement" },
|
||||
{ "text": "Dons", "url": "/#dons" },
|
||||
{
|
||||
"text": "Ressources",
|
||||
"children": [
|
||||
{ "text": "Réalisations", "url": "#clients" },
|
||||
{ "text": "Nos instances", "url": "#services-libres" },
|
||||
{ "text": "FAQ", "url": "#faq" },
|
||||
{ "text": "Réalisations", "url": "/#clients" },
|
||||
{ "text": "Nos instances", "url": "/#services-libres" },
|
||||
{ "text": "FAQ", "url": "/#faq" },
|
||||
{ "text": "Presse", "url": "/presse/" },
|
||||
{ "text": "Labola", "url": "https://labola.o-k-i.net/", "external": true }
|
||||
]
|
||||
},
|
||||
{ "text": "Contact", "url": "#contact" }
|
||||
{ "text": "Contact", "url": "/#contact" }
|
||||
]
|
||||
|
||||
@@ -69,12 +69,14 @@
|
||||
themeToggle?.addEventListener('click', toggleTheme);
|
||||
})();
|
||||
|
||||
// Smooth scrolling
|
||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||
// Smooth scrolling (uniquement pour les ancres de la page courante)
|
||||
document.querySelectorAll('a[href*="#"]').forEach(anchor => {
|
||||
anchor.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
const target = document.querySelector(this.getAttribute('href'));
|
||||
const url = new URL(this.href, window.location.href);
|
||||
if (url.pathname !== window.location.pathname || !url.hash) return;
|
||||
const target = document.querySelector(url.hash);
|
||||
if (target) {
|
||||
e.preventDefault();
|
||||
target.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'start'
|
||||
|
||||
Reference in New Issue
Block a user