Fix All Image Add Lazy Loading

This commit is contained in:
2025-09-19 10:41:18 +08:00
parent 9f72e94557
commit 068d8b1077
180 changed files with 390 additions and 323 deletions

View File

@@ -65,6 +65,7 @@ export default function Content({ kategori }: { kategori: string }) {
fit="cover"
radius="md"
style={{ borderBottomRightRadius: 0, borderTopRightRadius: 0 }}
loading="lazy"
/>
</GridCol>
<GridCol span={{ base: 12, md: 6 }} p="xl">
@@ -124,11 +125,11 @@ export default function Content({ kategori }: { kategori: string }) {
p="lg"
radius="md"
withBorder
onClick={() => router.push(`/darmasaba/desa/berita/${item.id}`)}
onClick={() => router.push(`/darmasaba/desa/berita/${kategori}/${item.id}`)}
style={{ cursor: 'pointer' }}
>
<Card.Section>
<Image src={item.image?.link} height={200} alt={item.judul} fit="cover" />
<Image src={item.image?.link} height={200} alt={item.judul} fit="cover" loading="lazy"/>
</Card.Section>
<Badge color="blue" variant="light" mt="md">
{item.kategoriBerita?.name || kategori}

View File

@@ -64,7 +64,7 @@ function Page() {
Informasi dan Pelayanan Administrasi Digital
</Text>
</Box>
<Image src={state.findUnique.data?.image?.link || ''} alt='' w={"100%"} />
<Image src={state.findUnique.data?.image?.link || ''} alt='' w={"100%"} loading="lazy"/>
</Container>
<Box px={{ base: "md", md: 100 }}>
<Stack gap={"xs"}>

View File

@@ -72,6 +72,7 @@ function Semua() {
fit="cover"
radius="md"
style={{ borderBottomRightRadius: 0, borderTopRightRadius: 0 }}
loading="lazy"
/>
</GridCol>
<GridCol span={{ base: 12, md: 6 }} p="xl">
@@ -136,6 +137,7 @@ function Semua() {
height={200}
alt={item.judul}
fit="cover"
loading="lazy"
/>
</Card.Section>

View File

@@ -156,6 +156,7 @@ interface FileItem {
height={250}
width="100%"
style={{ objectFit: 'cover', height: '100%', width: '100%' }}
loading="lazy"
/>
</Box>
<Box>

View File

@@ -95,6 +95,7 @@ function Page() {
maw={500}
mx="auto"
style={{ boxShadow: '0 0 20px rgba(28,110,164,0.2)' }}
loading="lazy"
/>
</Center>
)}

View File

@@ -17,7 +17,7 @@ export default function Page() {
&quot;Dharma Temaja&quot;
</Text>
</Stack>
<Image py={20} src="/api/img/darmasaba.jpeg" w={"100%"} h={"50%"} alt="" />
<Image py={20} src="/api/img/darmasaba.jpeg" w={"100%"} h={"50%"} alt="" loading="lazy"/>
<Text fz={"sm"} ta={"justify"}>
Desa Darmasaba adalah desa yang terletak di Kecamatan Abiansemal, Kabupaten Badung, Provinsi Bali. Desa ini merupakan wilayah paling selatan di Kecamatan Abiansemal.
</Text>

View File

@@ -130,7 +130,7 @@ function Page() {
<Text fz="sm" fw="bold" c="black" style={{ textTransform: 'uppercase' }}>
{item.judul}
</Text>
<Text ta="justify" fz="sm" c="black" lineClamp={3} dangerouslySetInnerHTML={{ __html: item.content }} />
<Text ta="justify" fz="sm" c="black" lineClamp={3} dangerouslySetInnerHTML={{ __html: item.deskripsi }} />
</Stack>
<Flex pt={20} gap="md" justify="space-between">
<Group style={{ color: 'black' }}>
@@ -241,7 +241,7 @@ function Page() {
fz="sm"
c="dimmed"
lineClamp={4}
dangerouslySetInnerHTML={{ __html: item.content }}
dangerouslySetInnerHTML={{ __html: item.deskripsi }}
mb="md"
/>
</div>

View File

@@ -75,6 +75,7 @@ function Page() {
w="100%"
h={{ base: 220, md: 400 }}
fallbackSrc="https://placehold.co/800x400?text=Gambar+tidak+tersedia"
loading="lazy"
/>
<Text py="md" fz={{ base: "sm", md: "md" }} ta="justify" lh={1.8}>
{state.findUnique.data?.deskripsi || 'Belum ada deskripsi untuk potensi desa ini.'}

View File

@@ -33,6 +33,7 @@ function LambangDesa() {
alt="Lambang resmi desa"
w={{ base: 180, md: 280 }}
radius="md"
loading="lazy"
/>
</Center>
<Text

View File

@@ -31,7 +31,7 @@ function MaskotDesa() {
<Box pb={80}>
<Stack align="center" gap="xl">
<Stack align="center" gap={10}>
<Image src="/pudak-icon.png" alt="Ikon Desa" w={{ base: 160, md: 240 }} />
<Image src="/pudak-icon.png" alt="Ikon Desa" w={{ base: 160, md: 240 }} loading="lazy"/>
<Text c={colors['blue-button']} ta="center" fw={700} fz={{ base: 28, md: 36 }}>Maskot Desa</Text>
</Stack>
@@ -72,6 +72,7 @@ function MaskotDesa() {
h={200}
fit="cover"
radius="md"
loading="lazy"
/>
<Text ta="center" mt="sm" fw={600} fz="sm" c="dark">
{img.label}

View File

@@ -58,6 +58,7 @@ function ProfilPerbekel() {
onError={(e) => {
e.currentTarget.src = "/perbekel.png";
}}
loading="lazy"
/>
<Paper
bg={colors['blue-button']}

View File

@@ -34,6 +34,7 @@ function SejarahDesa() {
w={{ base: 180, md: 260 }}
radius="md"
style={{ filter: 'drop-shadow(0 4px 12px rgba(0,0,0,0.15))' }}
loading="lazy"
/>
</Center>
<Center>

View File

@@ -72,6 +72,7 @@ function SemuaPerbekel() {
fit="cover"
h="100%"
w="100%"
loading="lazy"
/>
</Box>

View File

@@ -31,6 +31,7 @@ function VisiMisiDesa() {
alt="Lambang Desa Darmasaba"
w={{ base: 160, md: 240 }}
radius="md"
loading="lazy"
/>
<Paper