Compare commits

..

2 Commits

Author SHA1 Message Date
a44155d87d Add umami pixel
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
2026-02-17 12:52:12 -03:00
e41c15c47e Prettier
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
2026-02-17 01:31:35 -03:00
2 changed files with 14 additions and 2 deletions

View File

@@ -5,3 +5,11 @@
</script> </script>
{@render children()} {@render children()}
<img
src="https://analytics.mifi.holdings/p/wQ9GYnLIg"
alt=""
width="1"
height="1"
role="presentation"
loading="eager"
/>

View File

@@ -3,7 +3,10 @@ const saved = window?.localStorage?.getItem('theme');
// Umami: safe track (no-op if script blocked or not loaded) // Umami: safe track (no-op if script blocked or not loaded)
function umamiTrack(name, data) { function umamiTrack(name, data) {
if (typeof window.umami !== 'undefined' && typeof window.umami.track === 'function') { if (
typeof window.umami !== 'undefined' &&
typeof window.umami.track === 'function'
) {
if (data != null) window.umami.track(name, data); if (data != null) window.umami.track(name, data);
else window.umami.track(name); else window.umami.track(name);
} }
@@ -40,7 +43,8 @@ const scrollMilestones = new Set();
function onScroll() { function onScroll() {
const doc = document.documentElement; const doc = document.documentElement;
const scrollTop = doc.scrollTop || document.body.scrollTop; const scrollTop = doc.scrollTop || document.body.scrollTop;
const scrollHeight = (doc.scrollHeight || document.body.scrollHeight) - window.innerHeight; const scrollHeight =
(doc.scrollHeight || document.body.scrollHeight) - window.innerHeight;
if (scrollHeight <= 0) return; if (scrollHeight <= 0) return;
const pct = Math.round((scrollTop / scrollHeight) * 100); const pct = Math.round((scrollTop / scrollHeight) * 100);
for (const m of [25, 50, 75, 100]) { for (const m of [25, 50, 75, 100]) {