From 3e67d53b0158a3e75471d19fac06bde26a632d5a Mon Sep 17 00:00:00 2001 From: thdupin2 Date: Mon, 17 Jun 2024 22:11:38 +0200 Subject: [PATCH] :truck: rename: script.js in main.js --- script.js => main.js | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) rename script.js => main.js (96%) diff --git a/script.js b/main.js similarity index 96% rename from script.js rename to main.js index 4cfbed4..5b35aff 100644 --- a/script.js +++ b/main.js @@ -1,20 +1,20 @@ -// EMAIL -document.getElementById('openGmail').addEventListener('click', function() { - var email = 'theo.dupin03300.pro@gmail.com'; - var gmailLink = 'https://mail.google.com/mail/?view=cm&fs=1&to=' + email; - - // Essayer d'ouvrir le lien Gmail - window.open(gmailLink, '_blank'); -}); - -document.addEventListener('DOMContentLoaded', function() { - var aboutMeLink = document.querySelector('.header-nav a[href="#about-me"]'); - aboutMeLink.addEventListener('click', function(event) { - event.preventDefault(); // Empêche le comportement par défaut du lien - var aboutMeSection = document.getElementById('about-me'); - aboutMeSection.scrollIntoView({ behavior: 'smooth' }); // Fait défiler la page jusqu'à la section "À propos de moi" en douceur - }); -}); - -// AOS +// EMAIL +document.getElementById('openGmail').addEventListener('click', function() { + var email = 'theo.dupin03300.pro@gmail.com'; + var gmailLink = 'https://mail.google.com/mail/?view=cm&fs=1&to=' + email; + + // Essayer d'ouvrir le lien Gmail + window.open(gmailLink, '_blank'); +}); + +document.addEventListener('DOMContentLoaded', function() { + var aboutMeLink = document.querySelector('.header-nav a[href="#about-me"]'); + aboutMeLink.addEventListener('click', function(event) { + event.preventDefault(); // Empêche le comportement par défaut du lien + var aboutMeSection = document.getElementById('about-me'); + aboutMeSection.scrollIntoView({ behavior: 'smooth' }); // Fait défiler la page jusqu'à la section "À propos de moi" en douceur + }); +}); + +// AOS AOS.init(); \ No newline at end of file