Add priority and lazy loading to some images

This commit is contained in:
marzban-dev
2025-09-09 10:45:27 +03:30
parent 8a498147e1
commit 4a21072e54
28 changed files with 192 additions and 132 deletions
+12 -7
View File
@@ -22,15 +22,16 @@ const emit = defineEmits<Emits>();
<template>
<button
@click="emit('select', null)"
:class="
isSelected
? 'ring-2 ring-offset-2 ring-blue-500 border-blue-500'
: 'border-slate-200'
"
:class="isSelected ? 'ring-2 ring-offset-2 ring-blue-500 border-blue-500' : 'border-slate-200'"
class="w-full p-5 border rounded-xl flex flex-col gap-4 transition-all cursor-pointer relative overflow-hidden"
>
<div class="aspect-square flex-center">
<NuxtImg :src="gateway.picture" class="object-cover" />
<NuxtImg
:src="gateway.picture"
loading="lazy"
fetch-priority="low"
class="object-cover"
/>
</div>
<span class="typo-label-sm text-right text-black">
{{ gateway.title }}
@@ -43,7 +44,11 @@ const emit = defineEmits<Emits>();
v-if="isSelected"
class="bg-blue-500 rounded-md p-0.5 text-center bottom-4 left-4 text-slate-200 text-[10px] lg:text-xs absolute"
>
<Icon name="bi:check" size="20" class="**:fill-white" />
<Icon
name="bi:check"
size="20"
class="**:fill-white"
/>
</span>
</Transition>
</button>