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