Add priority and lazy loading to some images
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user