Fix QC Kak Ayu Tgl 12

Fix QC Kak Ino Tgl 12
Fix UI Mobile Menu Keamanan
Fix UI Mobile Admin Menu Landing Page
This commit is contained in:
2025-12-16 10:19:15 +08:00
parent f6f77d9e35
commit 342e9bbc65
43 changed files with 1715 additions and 1344 deletions

View File

@@ -1,7 +1,7 @@
// Create a new component: components/EdukasiCard.tsx
// components/EdukasiCard.tsx
'use client';
import { Box, Paper, Stack, Text } from '@mantine/core';
import { Box, Paper, Stack, Text, Title } from '@mantine/core';
import { ReactNode } from 'react';
interface EdukasiCardProps {
@@ -18,7 +18,7 @@ export function EdukasiCard({ icon, title, description, color = '#1e88e5' }: Edu
radius="md"
shadow="sm"
withBorder
style={{
style={{
height: '100%',
transition: 'transform 0.2s, box-shadow 0.2s',
'&:hover': {
@@ -31,32 +31,35 @@ export function EdukasiCard({ icon, title, description, color = '#1e88e5' }: Edu
<Box>
<Stack align="center" gap="xs" mb="md">
<Box style={{ color }}>{icon}</Box>
<Text
fz={{ base: 'h5', md: 'h4' }}
fw={700}
c={color}
ta="center"
lineClamp={2}
style={{
wordBreak: 'break-word',
minHeight: '3.5rem',
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}}
dangerouslySetInnerHTML={{ __html: title }}
/>
<Title
order={3}
fz={{ base: 'sm', md: 'md' }}
c={color}
ta="center"
lineClamp={2}
style={{
wordBreak: 'break-word',
minHeight: '3.5rem',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
lineHeight: 1.2
}}
dangerouslySetInnerHTML={{ __html: title }}
/>
</Stack>
<Text
size="sm"
pl={20}
style={{
wordBreak: 'break-word',
lineHeight: 1.6,
color: 'var(--mantine-color-gray-7)'
}}
dangerouslySetInnerHTML={{ __html: description }}
/>
<Box pl={20}>
<Text
fz={{ base: 'sm', md: 'md' }}
lh={1.5}
c="gray.7"
ta="justify"
style={{
wordBreak: 'break-word'
}}
dangerouslySetInnerHTML={{ __html: description }}
/>
</Box>
</Box>
</Stack>
</Paper>

View File

@@ -1,6 +1,6 @@
'use client';
import { Box, Container, SimpleGrid, Skeleton, Stack, Text } from '@mantine/core';
import { Box, Container, SimpleGrid, Skeleton, Stack, Text, Title } from '@mantine/core';
import { useShallowEffect } from '@mantine/hooks';
import { IconLeaf, IconPlant2, IconRecycle } from '@tabler/icons-react';
import { useProxy } from 'valtio/utils';
@@ -51,19 +51,21 @@ export default function EdukasiLingkunganPage() {
</Box>
<Container size="lg" ta="center">
<Text
component="h1"
fz={{ base: 'h2', md: '2.5rem' }}
<Title
order={1}
c={colors['blue-button']}
fw={700}
mb="md"
lh={1.15}
>
Edukasi Lingkungan
</Text>
</Title>
<Text
fz={{ base: 'md', md: 'lg' }}
fz={{ base: 'sm', md: 'md' }}
lh={1.5}
maw={800}
mx="auto"
c="dark.9"
>
Program edukasi ini membimbing masyarakat untuk peduli dan bertanggung jawab terhadap alam,
meningkatkan kesehatan, kenyamanan, dan keberlanjutan hidup bersama.

View File

@@ -41,23 +41,23 @@ function DetailKegiatanDesaUser() {
shadow="sm"
maw={900}
mx="auto"
>
>
<Stack gap="md">
{data.image?.link && (
<Image
src={data.image.link}
alt={data.judul || 'Kegiatan Desa'}
radius="md"
fit="cover"
h={300}
mb="xl"
style={{ objectPosition: 'center', width: '100%' }}
/>
)}
{/* Judul */}
<Title order={2} c={colors['blue-button']}>
<Title order={1} ta={"center"} c={colors['blue-button']}>
{data.judul || 'Kegiatan Desa'}
</Title>
{data.image?.link && (
<Image
src={data.image.link}
alt={data.judul || 'Kegiatan Desa'}
radius="md"
fit="cover"
h={300}
mb="xl"
style={{ objectPosition: 'center', width: '100%' }}
/>
)}
{/* Meta Info */}
<Group gap="xl" c="dimmed">

View File

@@ -1,6 +1,10 @@
// app/desa/berita/BeritaLayoutClient.tsx
'use client'
import colors from '@/con/colors';
import { Box } from '@mantine/core';
import dynamic from 'next/dynamic';
import { usePathname } from 'next/navigation';
import BackButton from '../../desa/layanan/_com/BackButto';
const LayoutTabsGotongRoyong = dynamic(
() => import('./_lib/layoutTabs'),
@@ -8,5 +12,21 @@ const LayoutTabsGotongRoyong = dynamic(
);
export default function GotongRoyongLayoutClient({ children }: { children: React.ReactNode }) {
const pathname = usePathname()
const segments = pathname.split('/').filter(Boolean)
const isDetailPage = segments.length === 5;
if (isDetailPage) {
// Tampilkan tanpa tab menu
return (
<Box bg={colors.Bg}>
<Box pt={33} px={{ base: 'md', md: 100 }}>
<BackButton />
</Box>
{children}
</Box>
);
}
return <LayoutTabsGotongRoyong>{children}</LayoutTabsGotongRoyong>;
}

View File

@@ -11,7 +11,6 @@ import {
Center,
Container,
Divider,
Flex,
Grid,
GridCol,
Group,
@@ -23,7 +22,7 @@ import {
Stack,
Text,
Title,
Transition,
Transition
} from '@mantine/core';
import { IconArrowRight, IconCalendar } from '@tabler/icons-react';
import { motion } from 'framer-motion';
@@ -46,7 +45,7 @@ export default function Page() {
// Load featured data once on component mount
useEffect(() => {
let mounted = true;
const loadFeatured = async () => {
try {
if (!featured.data && !loadingFeatured) {
@@ -68,7 +67,7 @@ export default function Page() {
useEffect(() => {
let mounted = true;
const loadData = async () => {
try {
const limit = 3;
@@ -92,7 +91,7 @@ export default function Page() {
if (search) url.set('search', search);
if (newPage > 1) url.set('page', newPage.toString());
else url.delete('page');
// Use push instead of replace to keep browser history
router.push(`?${url.toString()}`, { scroll: false });
};
@@ -139,7 +138,6 @@ export default function Page() {
height={400}
fit="cover"
radius="md"
style={{ borderBottomRightRadius: 0, borderTopRightRadius: 0 }}
loading="lazy"
/>
</GridCol>
@@ -222,6 +220,7 @@ export default function Page() {
alt={item.judul}
fit="cover"
loading="lazy"
radius={"md"}
/>
</Card.Section>
@@ -241,14 +240,17 @@ export default function Page() {
dangerouslySetInnerHTML={{ __html: item.deskripsiSingkat }}
/>
<Flex align="center" justify="apart" mt="md" gap="xs">
<Text size="xs" c="dimmed">
{new Date(item.createdAt).toLocaleDateString('id-ID', {
day: 'numeric',
month: 'short',
year: 'numeric',
})}
</Text>
<Group justify="apart" mt="auto">
<Group gap="xs">
<IconCalendar size={18} />
<Text size="xs" c="dimmed">
{new Date(item.createdAt).toLocaleDateString('id-ID', {
day: 'numeric',
month: 'short',
year: 'numeric',
})}
</Text>
</Group>
<Button
p="xs"
@@ -262,7 +264,7 @@ export default function Page() {
>
Baca Selengkapnya
</Button>
</Flex>
</Group>
</Card>
))}
</SimpleGrid>

View File

@@ -1,11 +1,12 @@
'use client'
import stateKonservasiAdatBali from '@/app/admin/(dashboard)/_state/lingkungan/konservasi-adat-bali';
import colors from '@/con/colors';
import { Box, Center, Paper, SimpleGrid, Skeleton, Stack, Text } from '@mantine/core';
import { Box, Center, Paper, SimpleGrid, Skeleton, Stack, Text, Title } from '@mantine/core';
import { useShallowEffect } from '@mantine/hooks';
import { useProxy } from 'valtio/utils';
import BackButton from '../../desa/layanan/_com/BackButto';
function Page() {
const filosofi = useProxy(stateKonservasiAdatBali.stateFilosofiTriHita.findById)
const nilai = useProxy(stateKonservasiAdatBali.stateNilaiKonservasiAdat.findById)
@@ -30,11 +31,24 @@ function Page() {
<Box px={{ base: 'md', md: 100 }}>
<BackButton />
</Box>
<Box px={{ base: 'md', md: 100 }} pb={30}>
<Text ta="center" fz={{ base: '2xl', md: '3rem' }} c={colors['blue-button']} fw="bold">
<Box px={{ base: 'md', md: 100 }} >
<Title
order={1}
ta="center"
c={colors['blue-button']}
fw="bold"
style={{ lineHeight: 1.15 }}
>
Konservasi Adat Bali
</Text>
<Text px={20} ta="center" fz="lg" c="black">
</Title>
<Text
px={20}
ta="center"
fz={{ base: 'sm', md: 'lg' }}
c="black"
style={{ lineHeight: 1.55 }}
>
Pelestarian lingkungan di Bali yang berpijak pada kearifan lokal, menjaga harmoni antara alam, budaya, dan manusia.
</Text>
</Box>
@@ -54,53 +68,31 @@ function Page() {
>
<Stack gap="md" px={20} style={{ height: '100%' }}>
<Center>
<Text fz="xl" fw="bold" c="black">
<Title
order={3}
c="black"
fw="bold"
style={{ lineHeight: 1.15 }}
>
{filosofi.data?.judul}
</Text>
</Center>
<div
style={{
wordBreak: "break-word",
whiteSpace: "normal",
flexGrow: 1
}}
dangerouslySetInnerHTML={{ __html: filosofi.data?.deskripsi || '' }}
/>
</Stack>
</Paper>
</Box>
{/* Nilai */}
<Box style={{ display: 'flex', height: '100%' }}>
<Paper
p="lg"
style={{
borderRadius: 16,
width: '100%',
display: 'flex',
flexDirection: 'column',
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)'
}}
>
<Stack gap="md" px={20} style={{ height: '100%' }}>
<Center>
<Text fz="xl" fw="bold" c="black">
{nilai.data?.judul}
</Text>
</Title>
</Center>
<div
style={{
wordBreak: "break-word",
whiteSpace: "normal",
flexGrow: 1,
minHeight: 0
fontSize: '14px',
lineHeight: 1.55,
color: 'black'
}}
dangerouslySetInnerHTML={{ __html: nilai.data?.deskripsi || '' }}
dangerouslySetInnerHTML={{ __html: filosofi.data?.deskripsi || '' }}
/>
</Stack>
</Paper>
</Box>
{/* Bentuk */}
<Box>
</Box>
{/* Nilai */}
<Box style={{ display: 'flex', height: '100%' }}>
<Paper
p="lg"
style={{
@@ -113,26 +105,72 @@ function Page() {
>
<Stack gap="md" px={20} style={{ height: '100%' }}>
<Center>
<Text fz="xl" fw="bold" c="black">
{bentuk.data?.judul}
</Text>
<Title
order={3}
c="black"
fw="bold"
style={{ lineHeight: 1.15 }}
>
{nilai.data?.judul}
</Title>
</Center>
<div
style={{
wordBreak: "break-word",
whiteSpace: "normal",
flexGrow: 1,
minHeight: 0
minHeight: 0,
fontSize: '14px',
lineHeight: 1.55,
color: 'black'
}}
dangerouslySetInnerHTML={{ __html: nilai.data?.deskripsi || '' }}
/>
</Stack>
</Paper>
</Box>
{/* Bentuk */}
<Box>
<Paper
p="lg"
style={{
borderRadius: 16,
width: '100%',
display: 'flex',
flexDirection: 'column',
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)'
}}
>
<Stack gap="md" px={20} style={{ height: '100%' }}>
<Center>
<Title
order={3}
c="black"
fw="bold"
style={{ lineHeight: 1.15 }}
>
{bentuk.data?.judul}
</Title>
</Center>
<div
style={{
wordBreak: "break-word",
whiteSpace: "normal",
flexGrow: 1,
minHeight: 0,
fontSize: '14px',
lineHeight: 1.55,
color: 'black'
}}
dangerouslySetInnerHTML={{ __html: bentuk.data?.deskripsi || '' }}
/>
</Stack>
</Paper>
</Box>
</Box>
</SimpleGrid>
</Box>
</Stack>
);
}
export default Page;
export default Page;