feat(stats): umami loader, photo-open event, instagram click attrs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Linus Olofsson
2026-11-14 02:29:00 +01:00
co-authored by Claude Sonnet 5.5
parent e499ae533e
commit 1d4a010aae
3 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -103,6 +103,7 @@ const langBtn = 'rounded-full px-2.5 py-1 text-xs font-semibold transition-color
imageUrl={ogImageUrl}
/>
)}
<script is:inline defer src="/ibo-stats.js"></script>
</head>
<body class="bg-neutral-900 text-white font-sans antialiased min-h-screen flex flex-col">
@@ -135,7 +136,7 @@ const langBtn = 'rounded-full px-2.5 py-1 text-xs font-semibold transition-color
<p class="mb-2">
{business.brand} – <T sv={`fotograf ${business.person.name}, Sverige`} en={`photographer ${business.person.name}, Sweden`} />
&middot; <a href={`mailto:${business.email}`} class="text-gray-300 hover:text-white transition-colors">{business.email}</a>
&middot; <a href={business.social.instagram.url} target="_blank" rel="noopener noreferrer" class="text-gray-300 hover:text-white transition-colors">Instagram</a>
&middot; <a href={business.social.instagram.url} data-umami-event="instagram-click" target="_blank" rel="noopener noreferrer" class="text-gray-300 hover:text-white transition-colors">Instagram</a>
</p>
<p>&copy; {new Date().getFullYear()} {business.brand}. <T sv="Alla rättigheter förbehållna." en="All rights reserved." /> &middot; <a href="/privacy" class="text-gray-300 hover:text-white transition-colors"><T sv="Integritetspolicy" en="Privacy policy" /></a> &middot; <button type="button" data-consent-open class="text-gray-300 hover:text-white transition-colors"><T sv="Cookie-inställningar" en="Cookie settings" /></button></p>
</footer>
+1 -1
View File
@@ -74,7 +74,7 @@ const footerButtons = [
</div>
<div class="flex flex-row md:flex-col gap-6 items-center justify-center">
<a href={business.social.instagram.url} target="_blank" rel="noopener noreferrer" class="circle-btn group" aria-label="Instagram">
<a href={business.social.instagram.url} data-umami-event="instagram-click" target="_blank" rel="noopener noreferrer" class="circle-btn group" aria-label="Instagram">
<svg class="outline-ring" viewBox="0 0 100 100">
<circle cx="50" cy="50" r="48" />
</svg>
+1
View File
@@ -343,6 +343,7 @@ const genresEn = 'portraits and people, nature and animals, city and architectur
lbImg.src = item.dataset.src || '';
lbImg.alt = item.dataset.alt || '';
stat('open', statsItem(item));
(window as any).iboStats?.track('photo-open', { photo: statsItem(item) });
const en = document.documentElement.lang === 'en';
if(lbDate) lbDate.innerText = (en ? item.dataset.dateEn : item.dataset.date) || '';