Adding dedicated contact page (WIP).

This commit is contained in:
Bob Vandevliet 2025-07-07 13:09:23 +02:00 committed by Bob Vandevliet
parent 2f49d7ce86
commit bd84cc5c29
5 changed files with 40 additions and 28 deletions

View file

@ -1,24 +1,3 @@
const highlightSectionFromHash = () =>
{
const { hash } = window.location;
if (hash === '#contact')
{
const section = document.getElementById(hash.substring(1))?.parentElement;// .closest('section');
if (section)
{
setTimeout(() =>
{
section.classList.add('scrollto-highlight');
setTimeout(() => section.classList.remove('scrollto-highlight'), 1000);
}, 500);
}
}
};
window.addEventListener('hashchange', highlightSectionFromHash);
window.addEventListener('pageshow', () =>
{
/**
@ -45,8 +24,6 @@ window.addEventListener('pageshow', () =>
refreshScrollLinkedPositioningEffect();
window.addEventListener('scroll', refreshScrollLinkedPositioningEffect);
highlightSectionFromHash();
});
document.addEventListener('DOMContentLoaded', () =>