From 34ad09662b5759a7e9ebd6218ab2498e5312c9d4 Mon Sep 17 00:00:00 2001 From: MareveD <93406912+MareveD@users.noreply.github.com> Date: Wed, 10 Jul 2024 16:40:20 -0400 Subject: [PATCH] Ajustement au base url --- assets/js/script.js | 14 ++++++++------ index.html | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/assets/js/script.js b/assets/js/script.js index 22d25c0..2a80af0 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -128,10 +128,12 @@ document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => { // const baseUrl = window.location.origin; // Get the base URL when I am local const baseUrl = 'https://mareved.github.io/portfolio'; - const links = document.querySelectorAll('.home-portfolio a[data-path]'); - - links.forEach(link => { - const path = link.getAttribute('data-path'); - link.setAttribute('href', `${baseUrl}/${path}`); + const sections = ['.home-portfolio', '.home-intro', '.cta-contact']; + sections.forEach(section => { + const links = document.querySelectorAll(`${section} a[data-path]`); + links.forEach(link => { + const path = link.getAttribute('data-path'); + link.setAttribute('href', `${baseUrl}/${path}`); + }); }); -}); +}); \ No newline at end of file diff --git a/index.html b/index.html index a9a5ae8..e6611e5 100644 --- a/index.html +++ b/index.html @@ -69,7 +69,7 @@

salut! moi,
c’est Marie-Eve!

Explorons ensemble!

- Savoir + + Savoir + @@ -166,7 +166,7 @@

vous avez un projet en tête
ou des q

N'hésitez pas à me contacter! Ensemble, nous pouvons créer quelque chose de formidable.

Cliquez sur le bouton ci-dessous pour démarrer la conversation.

- Contactez Moi + Contactez Moi