reformat code

This commit is contained in:
Michael Czechowski
2025-06-14 18:00:08 +02:00
parent 5fc29c2faf
commit df7dbb8e43

View File

@@ -36,17 +36,21 @@ mixin Carousel(items, options)
.carousel-slide.flex-none.w-full.relative(class=slideClasses, style="scroll-snap-align: start")
if item.type === "image"
a.text-left.flex.flex-col.relative.overflow-hidden.rounded-lg.mb-4.py-4(class="sm:px-6 sm:flex-row sm:gap-6",onclick=`umami.track('carousel image clicked', { category: '${category}', position: 'carousel', label: '${item.alt || item.caption || "image"}', visitDuration: getVisitDuration() })`, href=href, target="_blank", rel="noopener noreferrer")
img.w-full.h-full.object-contain.transition-transform.rounded-lg.duration-300(
class="sm:w-1/2 shadow-lg",
a.text-left.flex.flex-col.relative.overflow-hidden.rounded-lg.mb-4.py-4(
class="sm:px-6 sm:flex-row sm:gap-6",
onclick=`umami.track('carousel image clicked', { category: '${category}', position: 'carousel', label: '${item.alt || item.caption || "image"}', visitDuration: getVisitDuration() })`,
href=href,
target="_blank",
rel="noopener noreferrer"
)
img.w-full.h-full.object-contain.transition-transform.rounded-lg.duration-300.shadow-lg(
class="sm:w-1/2",
src=item.src,
alt=item.alt,
loading=index < 3 ? "eager" : "lazy"
)
if item.caption
.p-4(
class="sm:static sm:self-center"
)
.p-4(class="sm:static sm:self-center")
p.text-lg.pt-2.font-large(class="sm:text-xl")= item.caption
if item.description
p.text-sm.mt-2(class="sm:text-base")= item.description