diff --git a/hugo_stats.json b/hugo_stats.json index ef783af..6e6d9b1 100644 --- a/hugo_stats.json +++ b/hugo_stats.json @@ -2,6 +2,7 @@ "htmlElements": { "tags": [ "a", + "base", "blockquote", "body", "br", diff --git a/layouts/partials/page-transition.html b/layouts/partials/page-transition.html index f9190a9..83bc78f 100644 --- a/layouts/partials/page-transition.html +++ b/layouts/partials/page-transition.html @@ -1,32 +1,38 @@ @@ -39,15 +45,18 @@ if (!wipe) return; function startReveal(){ + // overlay van 1 → 0 (fade-out) wipe.classList.remove('no-trans'); requestAnimationFrame(function(){ wipe.classList.add('is-revealing'); + wipe.classList.remove('is-covering'); }); } + // Bij binnenkomst pagina: reset + fade-out window.addEventListener('pageshow', function () { wipe.classList.add('no-trans'); - wipe.classList.remove('pre-enter','is-covering','is-revealing'); + wipe.classList.remove('is-covering', 'is-revealing'); requestAnimationFrame(startReveal); }); @@ -66,26 +75,20 @@ var here = new URL(window.location.href); var url = new URL(a.href, here); + // externe link / nieuwe tab / download → negeren if (url.origin !== here.origin) return; if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return; if (a.target === '_blank' || a.hasAttribute('download')) return; var samePath = normPath(url.pathname) === normPath(here.pathname); var sameSearch = url.search === here.search; - - if (samePath && sameSearch) { - return; - } + if (samePath && sameSearch) return; e.preventDefault(); - wipe.classList.add('no-trans'); - wipe.classList.remove('is-revealing','is-covering'); - wipe.classList.add('pre-enter'); - void wipe.offsetHeight; - - wipe.classList.remove('no-trans'); - wipe.classList.remove('pre-enter'); + // reset naar transparant, dan fade naar opaque + wipe.classList.remove('no-trans', 'is-revealing'); + void wipe.offsetHeight; // force reflow zodat transition altijd triggert wipe.classList.add('is-covering'); var go = function () {