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:
co-authored by
Claude Sonnet 5.5
parent
e499ae533e
commit
1d4a010aae
@@ -103,6 +103,7 @@ const langBtn = 'rounded-full px-2.5 py-1 text-xs font-semibold transition-color
|
|||||||
imageUrl={ogImageUrl}
|
imageUrl={ogImageUrl}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
<script is:inline defer src="/ibo-stats.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-neutral-900 text-white font-sans antialiased min-h-screen flex flex-col">
|
<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">
|
<p class="mb-2">
|
||||||
{business.brand} – <T sv={`fotograf ${business.person.name}, Sverige`} en={`photographer ${business.person.name}, Sweden`} />
|
{business.brand} – <T sv={`fotograf ${business.person.name}, Sverige`} en={`photographer ${business.person.name}, Sweden`} />
|
||||||
· <a href={`mailto:${business.email}`} class="text-gray-300 hover:text-white transition-colors">{business.email}</a>
|
· <a href={`mailto:${business.email}`} class="text-gray-300 hover:text-white transition-colors">{business.email}</a>
|
||||||
· <a href={business.social.instagram.url} target="_blank" rel="noopener noreferrer" class="text-gray-300 hover:text-white transition-colors">Instagram</a>
|
· <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>
|
||||||
<p>© {new Date().getFullYear()} {business.brand}. <T sv="Alla rättigheter förbehållna." en="All rights reserved." /> · <a href="/privacy" class="text-gray-300 hover:text-white transition-colors"><T sv="Integritetspolicy" en="Privacy policy" /></a> · <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>
|
<p>© {new Date().getFullYear()} {business.brand}. <T sv="Alla rättigheter förbehållna." en="All rights reserved." /> · <a href="/privacy" class="text-gray-300 hover:text-white transition-colors"><T sv="Integritetspolicy" en="Privacy policy" /></a> · <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>
|
</footer>
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ const footerButtons = [
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-row md:flex-col gap-6 items-center justify-center">
|
<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">
|
<svg class="outline-ring" viewBox="0 0 100 100">
|
||||||
<circle cx="50" cy="50" r="48" />
|
<circle cx="50" cy="50" r="48" />
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
@@ -343,6 +343,7 @@ const genresEn = 'portraits and people, nature and animals, city and architectur
|
|||||||
lbImg.src = item.dataset.src || '';
|
lbImg.src = item.dataset.src || '';
|
||||||
lbImg.alt = item.dataset.alt || '';
|
lbImg.alt = item.dataset.alt || '';
|
||||||
stat('open', statsItem(item));
|
stat('open', statsItem(item));
|
||||||
|
(window as any).iboStats?.track('photo-open', { photo: statsItem(item) });
|
||||||
|
|
||||||
const en = document.documentElement.lang === 'en';
|
const en = document.documentElement.lang === 'en';
|
||||||
if(lbDate) lbDate.innerText = (en ? item.dataset.dateEn : item.dataset.date) || '';
|
if(lbDate) lbDate.innerText = (en ? item.dataset.dateEn : item.dataset.date) || '';
|
||||||
|
|||||||
Reference in New Issue
Block a user