QC Kak Inno FrontEnd Done

QC Kak Ayu FrontEnd Done
QC Keano 31 Okt
This commit is contained in:
2025-11-03 10:28:03 +08:00
parent 0befe6a3f2
commit 7b4bb1e58e
29 changed files with 165 additions and 171 deletions

View File

@@ -26,7 +26,7 @@ function Page() {
</Text> </Text>
</Stack> </Stack>
</Container> </Container>
<Box px={{ base: "md", md: 100 }}> <Stack px={{ base: "md", md: 100 }} gap={"xl"}>
<ProfileDesa /> <ProfileDesa />
<SejarahDesa /> <SejarahDesa />
<VisimisiDesa /> <VisimisiDesa />
@@ -35,7 +35,7 @@ function Page() {
<ProfilPerbekel /> <ProfilPerbekel />
<MotoDesa /> <MotoDesa />
<SemuaPerbekel /> <SemuaPerbekel />
</Box> </Stack>
</Stack> </Stack>
{/* Tombol Scroll ke Atas */} {/* Tombol Scroll ke Atas */}
<ScrollToTopButton /> <ScrollToTopButton />

View File

@@ -24,7 +24,7 @@ function LambangDesa() {
} }
return ( return (
<Box pb={90}> <Box>
<Stack align="center" gap="lg"> <Stack align="center" gap="lg">
<Box pb="lg"> <Box pb="lg">
<Center> <Center>

View File

@@ -28,7 +28,7 @@ function MaskotDesa() {
} }
return ( return (
<Box pb={80}> <Box>
<Stack align="center" gap="xl"> <Stack align="center" gap="xl">
<Stack align="center" gap={10}> <Stack align="center" gap={10}>
<Image src="/pudak-icon.png" alt="Ikon Desa" w={{ base: 160, md: 240 }} loading="lazy"/> <Image src="/pudak-icon.png" alt="Ikon Desa" w={{ base: 160, md: 240 }} loading="lazy"/>

View File

@@ -36,7 +36,7 @@ const letters = ["S", "I", "G", "A", "P"];
function MotoDesa() { function MotoDesa() {
return ( return (
<Box pb={80} px={{ base: "md", md: "xl" }}> <Box px={{ base: "md", md: "xl" }}>
<Stack align="center" gap="lg"> <Stack align="center" gap="lg">
<Box> <Box>
<Text <Text

View File

@@ -25,7 +25,7 @@ function ProfilPerbekel() {
} }
return ( return (
<Box pb={80} px="md"> <Box px="md">
<Stack align="center" gap={0} mb={40}> <Stack align="center" gap={0} mb={40}>
<Text <Text
c={colors['blue-button']} c={colors['blue-button']}
@@ -116,7 +116,7 @@ function ProfilPerbekel() {
</Stack> </Stack>
<Text <Text
fz={{ base: "1rem", md: "1.2rem" }} fz={{ base: "1rem", md: "1.2rem" }}
ta="justify" ta="left"
lh={1.6} lh={1.6}
dangerouslySetInnerHTML={{ __html: data.pengalaman }} dangerouslySetInnerHTML={{ __html: data.pengalaman }}
style={{ wordBreak: "break-word", whiteSpace: "normal" }} style={{ wordBreak: "break-word", whiteSpace: "normal" }}

View File

@@ -3,7 +3,7 @@ import { Box, Center, Paper } from '@mantine/core';
function ProfileDesa() { function ProfileDesa() {
return ( return (
<Box pb={90}> <Box>
<Center> <Center>
<Paper p={"xl"} bg={colors['white-trans-1']} w={{ base: "100%", md: "100%" }}> <Paper p={"xl"} bg={colors['white-trans-1']} w={{ base: "100%", md: "100%" }}>
<Center> <Center>

View File

@@ -24,7 +24,7 @@ function SejarahDesa() {
} }
return ( return (
<Box py="xl"> <Box>
<Stack align="center" gap="xl"> <Stack align="center" gap="xl">
<Stack align="center" gap="sm"> <Stack align="center" gap="sm">
<Center> <Center>

View File

@@ -36,7 +36,7 @@ function SemuaPerbekel() {
} }
return ( return (
<Box pb={80}> <Box>
<Stack align="center" gap="lg"> <Stack align="center" gap="lg">
<Box> <Box>
<Text <Text

View File

@@ -24,7 +24,7 @@ function VisiMisiDesa() {
} }
return ( return (
<Box py="xl"> <Box>
<Stack align="center" gap="xl"> <Stack align="center" gap="xl">
<Image <Image
src="/darmasaba-icon.png" src="/darmasaba-icon.png"

View File

@@ -1,27 +1,26 @@
'use client' 'use client'
import { import {
Box, Box,
Button,
Card, Card,
Center, Center,
Group, Group,
Pagination, Pagination,
Paper,
Skeleton, Skeleton,
Stack, Stack,
Text, Text,
Title, Title
Tooltip,
Button,
Paper,
} from '@mantine/core'; } from '@mantine/core';
import { IconSearch, IconArrowRight } from '@tabler/icons-react'; import { IconArrowRight, IconSearch } from '@tabler/icons-react';
import { useRouter } from 'next/navigation'; import HeaderSearch from '@/app/admin/(dashboard)/_com/header';
import { useProxy } from 'valtio/utils';
import pencegahanKriminalitasState from '@/app/admin/(dashboard)/_state/keamanan/pencegahan-kriminalitas'; import pencegahanKriminalitasState from '@/app/admin/(dashboard)/_state/keamanan/pencegahan-kriminalitas';
import { useShallowEffect } from '@mantine/hooks'; import { useShallowEffect } from '@mantine/hooks';
import { useState } from 'react';
import HeaderSearch from '@/app/admin/(dashboard)/_com/header';
import { IconArrowLeft } from '@tabler/icons-react'; import { IconArrowLeft } from '@tabler/icons-react';
import { useRouter } from 'next/navigation';
import { useState } from 'react';
import { useProxy } from 'valtio/utils';
function PencegahanKriminalitas() { function PencegahanKriminalitas() {
const [search, setSearch] = useState(""); const [search, setSearch] = useState("");
@@ -96,7 +95,6 @@ function ListPencegahanKriminalitas({ search }: { search: string }) {
style={{ wordBreak: "break-word", whiteSpace: "normal" }} style={{ wordBreak: "break-word", whiteSpace: "normal" }}
/> />
<Group justify="flex-end" mt="sm"> <Group justify="flex-end" mt="sm">
<Tooltip label="Lihat detail program" withArrow>
<Button <Button
size="sm" size="sm"
variant="gradient" variant="gradient"
@@ -106,7 +104,6 @@ function ListPencegahanKriminalitas({ search }: { search: string }) {
> >
Lihat Detail Lihat Detail
</Button> </Button>
</Tooltip>
</Group> </Group>
</Stack> </Stack>
</Card> </Card>

View File

@@ -57,7 +57,7 @@ function Page() {
<Title order={1} fw={700} ta="center" c={colors['blue-button']}> <Title order={1} fw={700} ta="center" c={colors['blue-button']}>
Statistik Data Pendidikan Statistik Data Pendidikan
</Title> </Title>
<Text c="dimmed" size="sm" ta="center"> <Text fz="md" ta="center">
Visualisasi jumlah pendidikan berdasarkan kategori yang tersedia Visualisasi jumlah pendidikan berdasarkan kategori yang tersedia
</Text> </Text>
</Stack> </Stack>

View File

@@ -55,7 +55,7 @@ function Page({ params }: PageProps) {
<Group justify="space-between" align="center" mb="md"> <Group justify="space-between" align="center" mb="md">
<Group gap="sm"> <Group gap="sm">
<IconChalkboard size={28} stroke={1.5} color={colors['blue-button']} /> <IconChalkboard size={28} stroke={1.5} color={colors['blue-button']} />
<Title order={2} fz="xl">Daftar Lembaga Pendidikan</Title> <Title order={2} fz="xl" c={colors['blue-button']}>Daftar Lembaga Pendidikan</Title>
</Group> </Group>
<TextInput <TextInput
placeholder='pencarian' placeholder='pencarian'

View File

@@ -55,7 +55,7 @@ function Page({ params }: PageProps) {
<Group justify="space-between" align="center" mb="md"> <Group justify="space-between" align="center" mb="md">
<Group gap="sm"> <Group gap="sm">
<IconMicroscope size={28} stroke={1.5} color={colors['blue-button']} /> <IconMicroscope size={28} stroke={1.5} color={colors['blue-button']} />
<Title order={2} fz="xl">Daftar Pengajar</Title> <Title order={2} fz="xl" c={colors['blue-button']}>Daftar Pengajar</Title>
</Group> </Group>
<TextInput <TextInput
placeholder='pencarian' placeholder='pencarian'

View File

@@ -55,7 +55,7 @@ function Page({ params }: PageProps) {
<Group justify="space-between" align="center" mb="md"> <Group justify="space-between" align="center" mb="md">
<Group gap="sm"> <Group gap="sm">
<IconSchool size={28} stroke={1.5} color={colors['blue-button']} /> <IconSchool size={28} stroke={1.5} color={colors['blue-button']} />
<Title order={2} fz="xl">Daftar Siswa</Title> <Title order={2} fz="xl" c={colors['blue-button']}>Daftar Siswa</Title>
</Group> </Group>
<TextInput <TextInput
placeholder='pencarian' placeholder='pencarian'

View File

@@ -96,23 +96,21 @@
'use client' 'use client'
import colors from '@/con/colors'; import colors from '@/con/colors';
// pastikan path benar // pastikan path benar
import infoSekolahPaud from '@/app/admin/(dashboard)/_state/pendidikan/info-sekolah-paud';
import { import {
ActionIcon,
Box, Box,
Button, Button,
Container, Container,
Group, Group,
Loader,
Paper, Paper,
Stack, Stack,
Text, Text
VisuallyHidden,
Loader,
} from '@mantine/core'; } from '@mantine/core';
import { IconArrowLeft } from '@tabler/icons-react';
import { useRouter, useSearchParams } from 'next/navigation'; import { useRouter, useSearchParams } from 'next/navigation';
import { useSnapshot } from 'valtio';
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import infoSekolahPaud from '@/app/admin/(dashboard)/_state/pendidikan/info-sekolah-paud'; import { useSnapshot } from 'valtio';
import BackButton from '../../../desa/layanan/_com/BackButto';
type LayoutSekolahProps = { type LayoutSekolahProps = {
title?: string; title?: string;
@@ -153,10 +151,7 @@ export default function LayoutSekolah({
<Container size="xl" py={{ base: 'md', md: 'xl' }}> <Container size="xl" py={{ base: 'md', md: 'xl' }}>
<Stack gap="lg"> <Stack gap="lg">
{/* Back Button */} {/* Back Button */}
<ActionIcon onClick={() => window.history.back()} variant="light" radius="md" size="lg"> <BackButton/>
<IconArrowLeft size={20} />
<VisuallyHidden>Kembali</VisuallyHidden>
</ActionIcon>
{/* Search & Filter */} {/* Search & Filter */}
<Paper radius="lg" p="xl" withBorder> <Paper radius="lg" p="xl" withBorder>
@@ -185,8 +180,8 @@ export default function LayoutSekolah({
radius="xl" radius="xl"
size="sm" size="sm"
variant={aktif ? 'filled' : 'light'} variant={aktif ? 'filled' : 'light'}
bg={colors['blue-button']} bg={aktif? colors['blue-button'] : '#BDCADE'}
c={aktif ? colors['white-1'] : 'gray'} c={aktif ? colors['white-1'] : colors['blue-button']}
> >
{k} {k}
</Button> </Button>

View File

@@ -47,7 +47,7 @@ function Page() {
<Group justify="space-between" align="center" mb="md"> <Group justify="space-between" align="center" mb="md">
<Group gap="sm"> <Group gap="sm">
<IconChalkboard size={28} stroke={1.5} color={colors['blue-button']} /> <IconChalkboard size={28} stroke={1.5} color={colors['blue-button']} />
<Title order={2} fz="xl">Daftar Lembaga Pendidikan</Title> <Title order={2} fz="xl" c={colors['blue-button']}>Daftar Lembaga Pendidikan</Title>
</Group> </Group>
<TextInput <TextInput
placeholder='pencarian' placeholder='pencarian'

View File

@@ -46,7 +46,7 @@ function Page() {
<Group justify="space-between" align="center" mb="md"> <Group justify="space-between" align="center" mb="md">
<Group gap="sm"> <Group gap="sm">
<IconMicroscope size={28} stroke={1.5} color={colors['blue-button']} /> <IconMicroscope size={28} stroke={1.5} color={colors['blue-button']} />
<Title order={2} fz="xl">Daftar Pengajar</Title> <Title order={2} fz="xl" c={colors['blue-button']}>Daftar Pengajar</Title>
</Group> </Group>
<TextInput <TextInput
placeholder='pencarian' placeholder='pencarian'

View File

@@ -47,7 +47,7 @@ function Page() {
<Group justify="space-between" align="center" mb="md"> <Group justify="space-between" align="center" mb="md">
<Group gap="sm"> <Group gap="sm">
<IconSchool size={28} stroke={1.5} color={colors['blue-button']} /> <IconSchool size={28} stroke={1.5} color={colors['blue-button']} />
<Title order={2} fz="xl">Daftar Siswa</Title> <Title order={2} fz="xl" c={colors['blue-button']}>Daftar Siswa</Title>
</Group> </Group>
<TextInput <TextInput
placeholder='pencarian' placeholder='pencarian'

View File

@@ -37,13 +37,15 @@ function Page() {
<Box px={{ base: 'md', md: 100 }} pb={50}> <Box px={{ base: 'md', md: 100 }} pb={50}>
<Box mb="xl"> <Box mb="xl">
<Title ta="center" order={1} fw="bold" c={colors['blue-button']} mb="sm"> <Title ta="center" order={1} fw="bold" c={colors['blue-button']}>
Program Pendidikan Anak Program Pendidikan Anak
</Title> </Title>
<Box my={"sm"}>
<Divider size="sm" color={colors['blue-button']} mx="auto" maw={550} />
</Box>
<Text ta="center" fz="lg" c="black" mb="lg" maw={800} mx="auto"> <Text ta="center" fz="lg" c="black" mb="lg" maw={800} mx="auto">
Desa Darmasaba berkomitmen mencetak generasi muda yang cerdas, berkarakter, dan siap bersaing melalui program pendidikan yang inklusif dan berkelanjutan. Desa Darmasaba berkomitmen mencetak generasi muda yang cerdas, berkarakter, dan siap bersaing melalui program pendidikan yang inklusif dan berkelanjutan.
</Text> </Text>
<Divider size="sm" color={colors['blue-button']} mx="auto" maw={120} />
</Box> </Box>
<SimpleGrid <SimpleGrid
@@ -66,7 +68,7 @@ function Page() {
</Title> </Title>
</Group> </Group>
<Tooltip label="Detail tujuan program pendidikan anak" position="top-start" withArrow> <Tooltip label="Detail tujuan program pendidikan anak" position="top-start" withArrow>
<Text fz="lg" lh={1.6} c="dark" style={{wordBreak: "break-word", whiteSpace: "normal"}} dangerouslySetInnerHTML={{ __html: stateTujuan.findById.data?.deskripsi }} /> <Text fz="lg" lh={1.6} c="dark" style={{ wordBreak: "break-word", whiteSpace: "normal" }} dangerouslySetInnerHTML={{ __html: stateTujuan.findById.data?.deskripsi }} />
</Tooltip> </Tooltip>
</Stack> </Stack>
</Paper> </Paper>
@@ -87,7 +89,7 @@ function Page() {
</Title> </Title>
</Group> </Group>
<Tooltip label="Detail program unggulan yang sedang berjalan" position="top-start" withArrow> <Tooltip label="Detail program unggulan yang sedang berjalan" position="top-start" withArrow>
<Text fz="lg" lh={1.6} c="dark" style={{wordBreak: "break-word", whiteSpace: "normal"}} dangerouslySetInnerHTML={{ __html: stateUnggulan.findById.data?.deskripsi }} /> <Text fz="lg" lh={1.6} c="dark" style={{ wordBreak: "break-word", whiteSpace: "normal" }} dangerouslySetInnerHTML={{ __html: stateUnggulan.findById.data?.deskripsi }} />
</Tooltip> </Tooltip>
</Stack> </Stack>
</Paper> </Paper>

View File

@@ -7,6 +7,7 @@ import {
Box, Box,
Button, Button,
Center, Center,
Group,
Image, Image,
Pagination, Pagination,
Paper, Paper,
@@ -178,12 +179,18 @@ function Page() {
<Paper p="lg" radius="xl" shadow="xs" withBorder> <Paper p="lg" radius="xl" shadow="xs" withBorder>
<Stack gap="xs"> <Stack gap="xs">
<Text fz="lg" fw="bold" c={colors["blue-button"]}>Kontak PPID</Text> <Text fz="lg" fw="bold" c={colors["blue-button"]}>Kontak PPID</Text>
<Text fz="sm" c="dimmed" lh={1.6}> <Group>
<IconMail size={16} style={{ marginRight: 6 }} /> Email: <Text span fw="500">ppid@desadarmasaba.id</Text> <IconMail color='gray' size={16} style={{ marginRight: 6 }} />
</Text> <Text c={"dimmed"} fz="sm" lh={1.6}>
<Text fz="sm" c="dimmed" lh={1.6}> Email: <Text c={"dimmed"} span fw="500">ppid@desadarmasaba.id</Text>
<IconBrandWhatsapp size={16} style={{ marginRight: 6 }} /> WhatsApp: <Text span fw="500">081-xxx-xxx-xxx</Text> </Text>
</Text> </Group>
<Group>
<IconBrandWhatsapp color='gray' size={16} style={{ marginRight: 6 }} />
<Text c={"dimmed"} fz="sm" lh={1.6}>
WhatsApp: <Text c={"dimmed"} span fw="500">081-xxx-xxx-xxx</Text>
</Text>
</Group>
</Stack> </Stack>
</Paper> </Paper>
</Stack> </Stack>

View File

@@ -63,7 +63,7 @@ function Page() {
<SimpleGrid px={{ base: 'md', md: 100 }} cols={{ base: 1, sm: 2, md: 3 }} spacing="xl"> <SimpleGrid px={{ base: 'md', md: 100 }} cols={{ base: 1, sm: 2, md: 3 }} spacing="xl">
{data.map((v: any, k: number) => ( {data.map((v: any, k: number) => (
<BackgroundImage key={k} src={v.image?.link || ''} h={360} radius="xl" pos="relative"> <BackgroundImage key={k} src={v.image?.link || ''} h={360} radius="xl" pos="relative">
<Box pos="absolute" inset={0} bg="rgba(0,0,0,0.45)" style={{ borderRadius: 16 }} /> <Box pos="absolute" inset={0} bg="rgba(0,0,0,0.45)" style={{ borderRadius: 27 }} />
<Stack justify="space-between" h="100%" p="lg" pos="relative"> <Stack justify="space-between" h="100%" p="lg" pos="relative">
<Box> <Box>
<Text fz="lg" fw={600} c="white" ta="center"> <Text fz="lg" fw={600} c="white" ta="center">

View File

@@ -1,10 +1,10 @@
'use client' 'use client'
import { Box, Center, Container, Image, LoadingOverlay, Paper, SimpleGrid, Stack, Text, Title, Tooltip } from '@mantine/core';
import { Prisma } from '@prisma/client';
import { useEffect, useState } from 'react';
import { IconMoodSad } from '@tabler/icons-react';
import BackButton from '../../(pages)/desa/layanan/_com/BackButto';
import colors from '@/con/colors'; import colors from '@/con/colors';
import { Box, Center, Container, Image, LoadingOverlay, Paper, SimpleGrid, Stack, Text, Title } from '@mantine/core';
import { Prisma } from '@prisma/client';
import { IconMoodSad } from '@tabler/icons-react';
import { useEffect, useState } from 'react';
import BackButton from '../../(pages)/desa/layanan/_com/BackButto';
function Page() { function Page() {
const [sdgsDesa, setSdgsDesa] = useState<Prisma.SdgsDesaGetPayload<{ include: { image: true } }>[]>([]); const [sdgsDesa, setSdgsDesa] = useState<Prisma.SdgsDesaGetPayload<{ include: { image: true } }>[]>([]);
@@ -114,11 +114,9 @@ function Page() {
/> />
</Box> </Box>
<Stack gap="xs" align="center" style={{ width: '100%' }}> <Stack gap="xs" align="center" style={{ width: '100%' }}>
<Tooltip label={item.name} position="top" withArrow>
<Title order={4} ta="center" c="dark" fw={600} lineClamp={2} style={{ minHeight: '3rem' }}> <Title order={4} ta="center" c="dark" fw={600} lineClamp={2} style={{ minHeight: '3rem' }}>
{item.name} {item.name}
</Title> </Title>
</Tooltip>
<Text <Text
ta="center" ta="center"
fw={700} fw={700}

View File

@@ -35,7 +35,7 @@ function Apbdes() {
return ( return (
<Stack p="sm" gap="xl" bg={colors.Bg}> <Stack p="sm" gap="xl" bg={colors.Bg}>
<Box> <Box mt={"xl"}>
<Stack gap="sm"> <Stack gap="sm">
<Text c={colors["blue-button"]} ta={"center"} fw={"bold"} fz={{ base: "1.8rem", md: "3.4rem" }}> <Text c={colors["blue-button"]} ta={"center"} fw={"bold"} fz={{ base: "1.8rem", md: "3.4rem" }}>
{textHeading.title} {textHeading.title}
@@ -72,12 +72,7 @@ function Apbdes() {
pos="relative" pos="relative"
style={{ overflow: 'hidden' }} style={{ overflow: 'hidden' }}
> >
<Box <Box pos="absolute" inset={0} bg="rgba(0,0,0,0.45)" style={{ borderRadius: 16 }} />
pos="absolute"
inset={0}
bg="rgba(0,0,0,0.55)"
style={{ backdropFilter: 'blur(4px)' }}
/>
<Stack justify="space-between" h="100%" p="xl" pos="relative"> <Stack justify="space-between" h="100%" p="xl" pos="relative">
<Text <Text
c="white" c="white"
@@ -117,7 +112,7 @@ function Apbdes() {
)} )}
</SimpleGrid> </SimpleGrid>
<Group justify="center" pb={10}> <Group justify="center" pb={"xl"}>
<Button <Button
component={Link} component={Link}
href="/darmasaba/apbdes" href="/darmasaba/apbdes"

View File

@@ -29,7 +29,7 @@ function DesaAntiKorupsi() {
const data = (state.desaAntikorupsi.findMany.data || []).slice(0, 6); const data = (state.desaAntikorupsi.findMany.data || []).slice(0, 6);
return ( return (
<Stack gap={"0"} bg={colors.Bg} p={"sm"}> <Stack gap={"0"} bg={colors.Bg} p={"sm"} my={"xs"}>
<Container w={{ base: "100%", md: "80%" }} p={"md"} > <Container w={{ base: "100%", md: "80%" }} p={"md"} >
<Center> <Center>
<Text fw={"bold"} c={colors["blue-button"]} fz={{ base: "1.8rem", md: "3.4rem" }}>Desa Anti Korupsi</Text> <Text fw={"bold"} c={colors["blue-button"]} fz={{ base: "1.8rem", md: "3.4rem" }}>Desa Anti Korupsi</Text>

View File

@@ -153,7 +153,7 @@ function Kepuasan() {
if (data.length === 0) { if (data.length === 0) {
return ( return (
<Stack p="sm"> <Stack p="sm" my={"xs"}>
<Container w={{ base: "100%", md: "80%" }} p={"sm"}> <Container w={{ base: "100%", md: "80%" }} p={"sm"}>
<Center> <Center>
<Text <Text
@@ -421,7 +421,7 @@ function Kepuasan() {
); );
} }
return ( return (
<Stack p={"sm"}> <Stack p={"sm"} my={"xs"}>
<Container size="lg" px="sm"> <Container size="lg" px="sm">
<Center> <Center>
<Text <Text

View File

@@ -87,7 +87,7 @@ function Slider() {
}}> }}>
<Box <Box
style={{ style={{
borderRadius: 16, borderRadius: 8,
zIndex: 0, zIndex: 0,
}} }}
pos={"absolute"} pos={"absolute"}

View File

@@ -3,11 +3,10 @@
import prestasiState from "@/app/admin/(dashboard)/_state/landing-page/prestasi-desa"; import prestasiState from "@/app/admin/(dashboard)/_state/landing-page/prestasi-desa";
import colors from "@/con/colors"; import colors from "@/con/colors";
import { BackgroundImage, Box, Button, Center, Container, Group, Loader, SimpleGrid, Stack, Text } from "@mantine/core"; import { BackgroundImage, Box, Button, Center, Container, Group, Loader, SimpleGrid, Stack, Text } from "@mantine/core";
import { useProxy } from "valtio/utils";
import { useEffect, useState } from "react";
import { useRouter } from "next/navigation";
import Link from "next/link"; import Link from "next/link";
import { IconTrophy } from "@tabler/icons-react"; import { useRouter } from "next/navigation";
import { useEffect, useState } from "react";
import { useProxy } from "valtio/utils";
function Prestasi() { function Prestasi() {
const state = useProxy(prestasiState.prestasiDesa); const state = useProxy(prestasiState.prestasiDesa);
@@ -33,12 +32,9 @@ function Prestasi() {
<Stack p="sm" bg="linear-gradient(180deg, #ffffff 0%, #f8fbff 100%)"> <Stack p="sm" bg="linear-gradient(180deg, #ffffff 0%, #f8fbff 100%)">
<Container w={{ base: "100%", md: "80%" }} p="xl"> <Container w={{ base: "100%", md: "80%" }} p="xl">
<Stack align="center" gap="sm"> <Stack align="center" gap="sm">
<Group gap="xs">
<IconTrophy size={36} color={colors["blue-button"]} />
<Text c={colors["blue-button"]} ta="center" fz={{ base: "2rem", md: "3.4rem" }} fw={700}> <Text c={colors["blue-button"]} ta="center" fz={{ base: "2rem", md: "3.4rem" }} fw={700}>
Prestasi Desa Prestasi Desa
</Text> </Text>
</Group>
<Text fz={{ base: "1rem", md: "1.3rem" }} ta="center" c="dimmed" maw={700}> <Text fz={{ base: "1rem", md: "1.3rem" }} ta="center" c="dimmed" maw={700}>
Kami bangga dengan pencapaian desa hingga saat ini. Semoga prestasi ini menjadi inspirasi untuk terus berkarya dan berinovasi demi kemajuan bersama. Kami bangga dengan pencapaian desa hingga saat ini. Semoga prestasi ini menjadi inspirasi untuk terus berkarya dan berinovasi demi kemajuan bersama.
</Text> </Text>
@@ -63,14 +59,13 @@ function Prestasi() {
) : data.length === 0 ? ( ) : data.length === 0 ? (
<Center mih={200}> <Center mih={200}>
<Stack align="center" gap="xs"> <Stack align="center" gap="xs">
<IconTrophy size={48} color="gray" />
<Text fz="1.2rem" fw={500} c="dimmed"> <Text fz="1.2rem" fw={500} c="dimmed">
Belum ada prestasi yang ditampilkan Belum ada prestasi yang ditampilkan
</Text> </Text>
</Stack> </Stack>
</Center> </Center>
) : ( ) : (
<SimpleGrid cols={{ base: 1, sm: 2, md: 3 }} spacing="lg"> <SimpleGrid cols={{ base: 1, sm: 2, md: 3 }} spacing="lg" mb={"xl"}>
{data.map((v, k) => ( {data.map((v, k) => (
<BackgroundImage <BackgroundImage
key={k} key={k}
@@ -82,7 +77,7 @@ function Prestasi() {
pos="absolute" pos="absolute"
inset={0} inset={0}
bg="linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 100%)" bg="linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 100%)"
style={{ borderRadius: "1rem" }} style={{ borderRadius: 27 }}
/> />
<Stack justify="space-between" h="100%" pos="relative" p="lg"> <Stack justify="space-between" h="100%" pos="relative" p="lg">
<Box> <Box>

View File

@@ -1,11 +1,12 @@
'use client' 'use client'
import { useEffect, useState } from "react" import colors from "@/con/colors"
import { Box, Button, Center, Container, Image, Paper, SimpleGrid, Stack, Text, Title, useMantineTheme, Tooltip } from "@mantine/core" import { Box, Button, Center, Container, Image, Paper, SimpleGrid, Stack, Text, Title, useMantineTheme } from "@mantine/core"
import { useMediaQuery } from "@mantine/hooks" import { useMediaQuery } from "@mantine/hooks"
import { Prisma } from "@prisma/client" import { Prisma } from "@prisma/client"
import Link from "next/link"
import { IconMoodSad } from "@tabler/icons-react" import { IconMoodSad } from "@tabler/icons-react"
import colors from "@/con/colors" import Link from "next/link"
import { useEffect, useState } from "react"
import { motion } from "framer-motion";
export default function SDGS() { export default function SDGS() {
const theme = useMantineTheme() const theme = useMantineTheme()
@@ -25,8 +26,8 @@ export default function SDGS() {
setSdgsDesa([]) setSdgsDesa([])
return return
} }
const top3Sdgs = [...data].sort((a, b) => parseInt(b.jumlah) - parseInt(a.jumlah)).slice(0, 3) const top4Sdgs = [...data].sort((a, b) => parseInt(b.jumlah) - parseInt(a.jumlah)).slice(0, 4)
setSdgsDesa(top3Sdgs) setSdgsDesa(top4Sdgs)
} catch { } catch {
setSdgsDesa([]) setSdgsDesa([])
} }
@@ -35,7 +36,7 @@ export default function SDGS() {
}, []) }, [])
return ( return (
<Stack p="sm"> <Stack p="sm" my={"xs"}>
<Container w={{ base: "100%", md: "80%" }} p="xl"> <Container w={{ base: "100%", md: "80%" }} p="xl">
<Center> <Center>
<Title <Title
@@ -52,63 +53,56 @@ export default function SDGS() {
</Text> </Text>
<Box py="lg"> <Box py="lg">
<Paper {sdgsDesa && sdgsDesa.length > 0 ? (
p={{ base: "md", md: "xl" }} <SimpleGrid cols={{ base: 1, sm: 4 }} spacing="xl" verticalSpacing="xl" pb={30}>
radius="2xl"
withBorder
shadow="lg"
style={{
background: "linear-gradient(145deg, #FFFFFF, #F9FAFB)",
border: "1px solid rgba(0,0,0,0.06)",
}}
>
{sdgsDesa && sdgsDesa.length > 0 ? (
<SimpleGrid cols={{ base: 1, sm: 3 }} spacing="xl" verticalSpacing="xl">
{sdgsDesa.map((item) => ( {sdgsDesa.map((item) => (
<Paper <motion.div
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
key={item.id} key={item.id}
p="lg"
radius="xl"
shadow="sm"
withBorder
style={{
background: "linear-gradient(180deg, #FFFFFF, #F6F8FA)",
border: "1px solid rgba(0,0,0,0.05)",
transition: "all 0.3s ease",
height: "100%", // biar tinggi antar card konsisten
display: "flex",
flexDirection: "column",
}}
> >
<Center mb="lg"> <Paper
<Box p="lg"
p="md" radius="xl"
style={{ shadow="sm"
background: "rgba(240, 249, 255, 0.8)", withBorder
backdropFilter: "blur(6px)", style={{
width: mobile ? 140 : 160, background: "linear-gradient(180deg, #FFFFFF, #F6F8FA)",
height: mobile ? 140 : 160, border: "1px solid rgba(0,0,0,0.05)",
display: "flex", transition: "all 0.3s ease",
alignItems: "center", height: "100%", // biar tinggi antar card konsisten
justifyContent: "center", display: "flex",
borderRadius: "1rem", flexDirection: "column",
boxShadow: "0 6px 16px rgba(0,0,0,0.06)", }}
}} >
> <Center mb="lg">
<Image <Box
src={item.image?.link ? item.image.link : "/placeholder-sdgs.png"} p="md"
alt={item.name} style={{
w={mobile ? 90 : 110} background: "rgba(240, 249, 255, 0.8)",
h={mobile ? 90 : 110} backdropFilter: "blur(6px)",
fit="contain" width: mobile ? 140 : 160,
loading="lazy" height: mobile ? 140 : 160,
/> display: "flex",
</Box> alignItems: "center",
</Center> justifyContent: "center",
borderRadius: "1rem",
{/* Stack isi teks & angka */} boxShadow: "0 6px 16px rgba(0,0,0,0.06)",
<Stack justify="space-between" align="center" gap="xs" h="100%"> }}
<Tooltip label="Nama tujuan SDGs Desa" position="top" withArrow> >
<Image
src={item.image?.link ? item.image.link : "/placeholder-sdgs.png"}
alt={item.name}
w={mobile ? 90 : 110}
h={mobile ? 90 : 110}
fit="contain"
loading="lazy"
/>
</Box>
</Center>
{/* Stack isi teks & angka */}
<Stack justify="space-between" align="center" gap="xs" h="100%">
<Text <Text
ta="center" ta="center"
fz={{ base: "lg", md: "xl" }} fz={{ base: "lg", md: "xl" }}
@@ -118,34 +112,33 @@ export default function SDGS() {
> >
{item.name} {item.name}
</Text> </Text>
</Tooltip>
<Title
<Title order={2}
order={2} ta="center"
ta="center" style={{
style={{ fontSize: mobile ? "2.4rem" : "3.2rem",
fontSize: mobile ? "2.4rem" : "3.2rem", fontWeight: 900,
fontWeight: 900, letterSpacing: "-0.5px",
letterSpacing: "-0.5px", color: "#124170",
color: "#124170", }}
}} >
> {item.jumlah}
{item.jumlah} </Title>
</Title> </Stack>
</Stack> </Paper>
</Paper> </motion.div>
))} ))}
</SimpleGrid> </SimpleGrid>
) : ( ) : (
<Center mih={200} style={{ flexDirection: "column" }}> <Center mih={200} style={{ flexDirection: "column" }}>
<IconMoodSad size={48} stroke={1.5} style={{ marginBottom: "1rem" }} /> <IconMoodSad size={48} stroke={1.5} style={{ marginBottom: "1rem" }} />
<Text fz="lg" c="dimmed"> <Text fz="lg" c="dimmed">
Data SDGs Desa belum tersedia Data SDGs Desa belum tersedia
</Text> </Text>
</Center> </Center>
)} )}
</Paper>
<Center> <Center>
<Button <Button
@@ -156,7 +149,19 @@ export default function SDGS() {
mt="md" mt="md"
variant="gradient" variant="gradient"
gradient={{ from: "#26667F", to: "#124170" }} gradient={{ from: "#26667F", to: "#124170" }}
style={{ boxShadow: "0 6px 14px rgba(18,65,112,0.25)"}} style={{
boxShadow: "0 6px 14px rgba(18,65,112,0.25)",
transition: "all 0.3s ease",
transform: "translateY(0)",
}}
onMouseEnter={(e) => {
e.currentTarget.style.transform = "translateY(-4px)";
e.currentTarget.style.boxShadow = "0 10px 20px rgba(18,65,112,0.35)";
}}
onMouseLeave={(e) => {
e.currentTarget.style.transform = "translateY(0)";
e.currentTarget.style.boxShadow = "0 6px 14px rgba(18,65,112,0.25)";
}}
> >
<Text c="white" fz={{ base: "md", md: "lg" }} fw="bold">Jelajahi Semua Tujuan SDGs Desa</Text> <Text c="white" fz={{ base: "md", md: "lg" }} fw="bold">Jelajahi Semua Tujuan SDGs Desa</Text>
</Button> </Button>

View File

@@ -19,7 +19,7 @@ export default function Page() {
<Box> <Box>
<Stack <Stack
bg={colors.grey[1]} bg={colors.grey[1]}
gap={"1.5rem"} gap={0}
> >
<LandingPage /> <LandingPage />
<Penghargaan /> <Penghargaan />