diff --git a/NOTE.md b/NOTE.md new file mode 100644 index 00000000..cae8c446 --- /dev/null +++ b/NOTE.md @@ -0,0 +1,111 @@ +#!/bin/bash + +# Load environment variables from .env file +if [ -f ".env" ]; then + echo "Loading environment variables from .env..." + export $(grep -v '^#' .env | xargs) +else + echo ".env file not found! Please create a .env file with the required variables." + exit 1 +fi + +# Konfigurasi +PROJECT_NAME="hipmi" +REPO_NAME="hipmi" +PROJECT_PATH="/root/projects/staging/$PROJECT_NAME/" +RELEASE_NAME=$1 +RELEASE_PATH="$PROJECT_PATH/releases" +ENV_PATH="$PROJECT_PATH/shared/env" +SCRIPT_PATH="$PROJECT_PATH/scripts" +ENV_NAME="staging" +REPO="https://github.com/bipproduction/$REPO_NAME.git" +BRANCH="staging" + +# Jika RELEASE_NAME tidak diberikan, ambil SHA dari commit terakhir di branch staging +if [ -z "$RELEASE_NAME" ]; then + echo "No release name provided. Fetching the latest commit SHA from the $BRANCH branch..." + if [ -z "$TOKEN" ]; then + echo "GitHub token not found in .env file!" + exit 1 + fi + + # Ambil SHA commit terbaru dari API GitHub + API_URL="https://api.github.com/repos/bipproduction/$REPO_NAME/branches/$BRANCH" + RESPONSE=$(curl -s -H "Authorization: token $TOKEN" "$API_URL") + + # Ekstrak SHA commit terbaru + SHA=$(echo "$RESPONSE" | grep -oP '"sha":\s*"\K[^"]+' | head -n 1) + + if [ -z "$SHA" ]; then + echo "Failed to fetch the latest commit SHA!" + echo "API Response: $RESPONSE" + exit 1 + fi + + # Validasi panjang SHA (harus 40 karakter) + if [ ${#SHA} -ne 40 ]; then + echo "Invalid SHA length: $SHA" + exit 1 + fi + + RELEASE_NAME=$SHA + echo "Using commit SHA as release name: $RELEASE_NAME" +fi + +# VALIDASI INPUT +if [ -z "$RELEASE_NAME" ]; then + echo "Release name is empty! Please provide a valid release name or allow fetching the latest commit SHA." + exit 1 +fi + +# CEK EXISTING DIRECTORY +if [ -d "$RELEASE_PATH/$RELEASE_NAME" ]; then + echo "Error: Directory '$RELEASE_PATH/$RELEASE_NAME' already exists. Please choose a different release name." + exit 1 +fi + +# CLONE REPOSITORY +echo "Cloning repository..." +git clone -b "$BRANCH" "$REPO" "$RELEASE_PATH/$RELEASE_NAME" || { echo "Failed to clone repository!"; exit 1; } + +# CHECK ENVIRONMENT FILE +if [ ! -f "$ENV_PATH/.env.$ENV_NAME" ]; then + echo "Environment file $ENV_PATH/.env.$ENV_NAME not found!" + exit 1 +fi + +# COPY ENV FILE +cp "$ENV_PATH/.env.$ENV_NAME" "$RELEASE_PATH/$RELEASE_NAME/.env" + +# NAVIGATE TO RELEASE DIRECTORY +cd "$RELEASE_PATH/$RELEASE_NAME" || { echo "Failed to navigate to directory!"; exit 1; } + +# INSTALL DEPENDENCIES +echo "Installing dependencies with --smol flag..." +bun i || { echo "Install dependencies failed!"; exit 1; } + +# BUILD RELEASE +echo "Building release with --smol flag..." +nice -n 19 bun --smol run build || { echo "Build failed!"; exit 1; } + +# PUSH PRISMA +echo "Pushing Prisma schema to database..." +nice -n 19 bunx prisma db push || { echo "Prisma DB push failed!"; exit 1; } + +# PROMOTE RELEASE +SOURCE_DIR="$RELEASE_PATH/$RELEASE_NAME" +TARGET_DIR="$PROJECT_PATH/current" +if [ -L "$TARGET_DIR" ]; then + echo "Removing existing symlink at $TARGET_DIR..." + rm "$TARGET_DIR" || { echo "Failed to remove existing symlink!"; exit 1; } +fi +ln -s "$SOURCE_DIR" "$TARGET_DIR" || { echo "Failed to create symlink!"; exit 1; } +if [ ! -L "$TARGET_DIR" ]; then + echo "Error: Symlink creation failed!" + exit 1 +fi +echo "Symlink successfully created from $SOURCE_DIR to $TARGET_DIR" + +# RESTART SERVER +echo "Restarting server..." +pm2 restart "$PROJECT_NAME-$ENV_NAME" || { echo "Failed to restart $PROJECT_NAME-$ENV_NAME namespace!"; exit 1; } \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index 9043362b..c555ee57 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/compressed_pdf.pdf b/compressed_pdf.pdf new file mode 100644 index 00000000..4319680e Binary files /dev/null and b/compressed_pdf.pdf differ diff --git a/next.config.ts b/next.config.ts index e9ffa308..ac27ff93 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,20 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - /* config options here */ + async headers() { + return [ + { + source: '/assets/:path*', // Path ke folder gambar + headers: [ + { + key: 'Cache-Control', + value: 'public, max-age=3600, stale-while-revalidate=600', // Cache selama 1 jam, validasi ulang setelah 10 menit + }, + ], + }, + ]; + }, + }; export default nextConfig; diff --git a/package.json b/package.json index 1d36513b..f2c08e20 100644 --- a/package.json +++ b/package.json @@ -9,17 +9,46 @@ "lint": "next lint" }, "dependencies": { + "@elysiajs/cors": "^1.2.0", + "@elysiajs/eden": "^1.2.0", + "@elysiajs/stream": "^1.1.0", + "@elysiajs/swagger": "^1.2.0", + "@mantine/carousel": "^7.16.2", + "@mantine/core": "^7.16.2", + "@mantine/hooks": "^7.16.2", + "@prisma/client": "^6.3.1", + "@types/bun": "^1.2.2", + "@types/lodash": "^4.17.15", + "add": "^2.0.6", + "animate.css": "^4.1.1", + "compress-pdf": "^0.5.2", + "elysia": "^1.2.12", + "embla-carousel-autoplay": "^8.5.2", + "embla-carousel-react": "^7.1.0", + "framer-motion": "^12.4.1", + "lodash": "^4.17.21", + "motion": "^12.4.1", + "next": "15.1.6", + "next-view-transitions": "^0.3.4", + "prisma": "^6.3.1", "react": "^19.0.0", "react-dom": "^19.0.0", - "next": "15.1.6" + "react-multi-carousel": "^2.8.5", + "react-scroll-motion": "^0.3.5", + "readdirp": "^4.1.1", + "swr": "^2.3.2", + "valtio": "^2.1.3" }, "devDependencies": { - "typescript": "^5", + "@eslint/eslintrc": "^3", "@types/node": "^20", "@types/react": "^19", "@types/react-dom": "^19", "eslint": "^9", "eslint-config-next": "15.1.6", - "@eslint/eslintrc": "^3" + "postcss": "^8.5.1", + "postcss-preset-mantine": "^1.17.0", + "postcss-simple-vars": "^7.0.1", + "typescript": "^5" } } diff --git a/postcss.config.cjs b/postcss.config.cjs new file mode 100644 index 00000000..069b0528 --- /dev/null +++ b/postcss.config.cjs @@ -0,0 +1,14 @@ +module.exports = { + plugins: { + 'postcss-preset-mantine': {}, + 'postcss-simple-vars': { + variables: { + 'mantine-breakpoint-xs': '36em', + 'mantine-breakpoint-sm': '48em', + 'mantine-breakpoint-md': '62em', + 'mantine-breakpoint-lg': '75em', + 'mantine-breakpoint-xl': '88em', + }, + }, + }, + }; \ No newline at end of file diff --git a/prisma/data/list-layanan.json b/prisma/data/list-layanan.json new file mode 100644 index 00000000..184d69bd --- /dev/null +++ b/prisma/data/list-layanan.json @@ -0,0 +1,35 @@ +[ + { + "name": "surat keterangan domisili organisasi" + }, + { + "name": "surat keterangan penghasilan" + }, + { + "name": "surat keterangan tidak mampu" + }, + { + "name": "surat keterangan kelahiran" + }, + { + "name": "surat keterangan usaha" + }, + { + "name": "surat keterangan tempat usaha" + }, + { + "name": "surat keterangan belum kawin" + }, + { + "name": "surat keterangan kelakuan baik (pengantar skck)" + }, + { + "name": "surat keterangan kematian" + }, + { + "name": "surat keterangan beda biodata diri" + }, + { + "name": "surat keterangan yatim / piatu / yatim piatu" + } +] \ No newline at end of file diff --git a/prisma/data/list-potensi.json b/prisma/data/list-potensi.json new file mode 100644 index 00000000..32811679 --- /dev/null +++ b/prisma/data/list-potensi.json @@ -0,0 +1,41 @@ +[ + { + "name": "TPS3R Pudak Mesari" + }, + { + "name": "Bumdes Pudak Mesari" + }, + { + "name": "Pertanian" + }, + { + "name": "Jogging Track Tegeh Aban, Karang Gadon dan Munduk Uma Desa" + }, + { + "name": "Taman Beji Cengana" + }, + { + "name": "Dam Tanah Putih" + }, + { + "name": "Gumuh Sari Water Park" + }, + { + "name": "UMKM" + }, + { + "name": "Kawasan Kuliner" + }, + { + "name": "IKM berbasis Pengolahan Pangan" + }, + { + "name": "Genteng" + }, + { + "name": "Peternakan Ikan Lele" + }, + { + "name": "Pemotongan Daging" + } +] \ No newline at end of file diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 00000000..c8bf996a --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,24 @@ +// This is your Prisma schema file, +// learn more about it in the docs: https://pris.ly/d/prisma-schema + +// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions? +// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init + +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "postgresql" + url = env("DATABASE_URL") +} + +model Layanan { + id String @id @default(cuid()) + name String @unique +} + +model Potensi { + id String @id @default(cuid()) + name String @unique +} diff --git a/prisma/seed.ts b/prisma/seed.ts new file mode 100644 index 00000000..909ab864 --- /dev/null +++ b/prisma/seed.ts @@ -0,0 +1,39 @@ +import layanan from './data/list-layanan.json' +import potensi from './data/list-potensi.json' +import prisma from '@/lib/prisma'; +; (async () => { + for (const l of layanan) { + await prisma.layanan.upsert({ + where: { + name: l.name + }, + update: { + name: l.name + }, + create: { + name: l.name + } + }) + } + + console.log("layanan success ...") + + for (const p of potensi) { + await prisma.potensi.upsert({ + where: { + name: p.name + }, + update: { + name: p.name + }, + create: { + name: p.name + } + }) + } + + console.log("potensi success ...") + + + +})(); \ No newline at end of file diff --git a/public/assets/data/list-layanan.json b/public/assets/data/list-layanan.json new file mode 100644 index 00000000..184d69bd --- /dev/null +++ b/public/assets/data/list-layanan.json @@ -0,0 +1,35 @@ +[ + { + "name": "surat keterangan domisili organisasi" + }, + { + "name": "surat keterangan penghasilan" + }, + { + "name": "surat keterangan tidak mampu" + }, + { + "name": "surat keterangan kelahiran" + }, + { + "name": "surat keterangan usaha" + }, + { + "name": "surat keterangan tempat usaha" + }, + { + "name": "surat keterangan belum kawin" + }, + { + "name": "surat keterangan kelakuan baik (pengantar skck)" + }, + { + "name": "surat keterangan kematian" + }, + { + "name": "surat keterangan beda biodata diri" + }, + { + "name": "surat keterangan yatim / piatu / yatim piatu" + } +] \ No newline at end of file diff --git a/public/assets/fonts/font.otf b/public/assets/fonts/font.otf new file mode 100644 index 00000000..09aaca9f Binary files /dev/null and b/public/assets/fonts/font.otf differ diff --git a/public/assets/images/bg-blur.png b/public/assets/images/bg-blur.png new file mode 100644 index 00000000..894d28dc Binary files /dev/null and b/public/assets/images/bg-blur.png differ diff --git a/public/assets/images/bg-slide.png b/public/assets/images/bg-slide.png new file mode 100644 index 00000000..0d63dd37 Binary files /dev/null and b/public/assets/images/bg-slide.png differ diff --git a/public/assets/images/bg-slide2.png b/public/assets/images/bg-slide2.png new file mode 100644 index 00000000..83e5b79e Binary files /dev/null and b/public/assets/images/bg-slide2.png differ diff --git a/public/assets/images/bg-slide3.png b/public/assets/images/bg-slide3.png new file mode 100644 index 00000000..6b159cad Binary files /dev/null and b/public/assets/images/bg-slide3.png differ diff --git a/public/assets/images/bg.png b/public/assets/images/bg.png new file mode 100644 index 00000000..650ee76c Binary files /dev/null and b/public/assets/images/bg.png differ diff --git a/public/assets/images/darmasaba-icon.png b/public/assets/images/darmasaba-icon.png new file mode 100644 index 00000000..0fad186e Binary files /dev/null and b/public/assets/images/darmasaba-icon.png differ diff --git a/public/assets/images/module/bares.png b/public/assets/images/module/bares.png new file mode 100644 index 00000000..9c96112b Binary files /dev/null and b/public/assets/images/module/bares.png differ diff --git a/public/assets/images/module/bicara-darma.png b/public/assets/images/module/bicara-darma.png new file mode 100644 index 00000000..4558d2a5 Binary files /dev/null and b/public/assets/images/module/bicara-darma.png differ diff --git a/public/assets/images/module/daves.png b/public/assets/images/module/daves.png new file mode 100644 index 00000000..fbc09a3d Binary files /dev/null and b/public/assets/images/module/daves.png differ diff --git a/public/assets/images/module/gelah-melah.png b/public/assets/images/module/gelah-melah.png new file mode 100644 index 00000000..82ffc932 Binary files /dev/null and b/public/assets/images/module/gelah-melah.png differ diff --git a/public/assets/images/module/inovasi-desa-darmasaba.png b/public/assets/images/module/inovasi-desa-darmasaba.png new file mode 100644 index 00000000..4baa28f0 Binary files /dev/null and b/public/assets/images/module/inovasi-desa-darmasaba.png differ diff --git a/public/assets/images/module/mangan.png b/public/assets/images/module/mangan.png new file mode 100644 index 00000000..f887c231 Binary files /dev/null and b/public/assets/images/module/mangan.png differ diff --git a/public/assets/images/module/pdkt.png b/public/assets/images/module/pdkt.png new file mode 100644 index 00000000..c91b64ad Binary files /dev/null and b/public/assets/images/module/pdkt.png differ diff --git a/public/assets/images/module/sajjana-dharma-raksaka.png b/public/assets/images/module/sajjana-dharma-raksaka.png new file mode 100644 index 00000000..d055ee65 Binary files /dev/null and b/public/assets/images/module/sajjana-dharma-raksaka.png differ diff --git a/public/assets/images/perbekel.png b/public/assets/images/perbekel.png new file mode 100644 index 00000000..ed1cbd10 Binary files /dev/null and b/public/assets/images/perbekel.png differ diff --git a/public/assets/images/pudak-icon.png b/public/assets/images/pudak-icon.png new file mode 100644 index 00000000..50051447 Binary files /dev/null and b/public/assets/images/pudak-icon.png differ diff --git a/public/assets/images/sosmed/facebook.png b/public/assets/images/sosmed/facebook.png new file mode 100644 index 00000000..5fbf50ab Binary files /dev/null and b/public/assets/images/sosmed/facebook.png differ diff --git a/public/assets/images/sosmed/gmail.png b/public/assets/images/sosmed/gmail.png new file mode 100644 index 00000000..f03b8e5a Binary files /dev/null and b/public/assets/images/sosmed/gmail.png differ diff --git a/public/assets/images/sosmed/instagram.png b/public/assets/images/sosmed/instagram.png new file mode 100644 index 00000000..d280d1a3 Binary files /dev/null and b/public/assets/images/sosmed/instagram.png differ diff --git a/public/assets/images/sosmed/telegram.png b/public/assets/images/sosmed/telegram.png new file mode 100644 index 00000000..df53591e Binary files /dev/null and b/public/assets/images/sosmed/telegram.png differ diff --git a/public/assets/images/sosmed/tiktok.png b/public/assets/images/sosmed/tiktok.png new file mode 100644 index 00000000..f1aef270 Binary files /dev/null and b/public/assets/images/sosmed/tiktok.png differ diff --git a/public/assets/images/sosmed/whatsapp.png b/public/assets/images/sosmed/whatsapp.png new file mode 100644 index 00000000..60e03705 Binary files /dev/null and b/public/assets/images/sosmed/whatsapp.png differ diff --git a/public/assets/images/sosmed/x-twitter.png b/public/assets/images/sosmed/x-twitter.png new file mode 100644 index 00000000..df64a9ee Binary files /dev/null and b/public/assets/images/sosmed/x-twitter.png differ diff --git a/public/assets/images/sosmed/youtube.png b/public/assets/images/sosmed/youtube.png new file mode 100644 index 00000000..881affb7 Binary files /dev/null and b/public/assets/images/sosmed/youtube.png differ diff --git a/public/assets/images/tps.png b/public/assets/images/tps.png new file mode 100644 index 00000000..dfc558ba Binary files /dev/null and b/public/assets/images/tps.png differ diff --git a/public/assets/videos/award.mp4 b/public/assets/videos/award.mp4 new file mode 100644 index 00000000..dd66da7d Binary files /dev/null and b/public/assets/videos/award.mp4 differ diff --git a/src/app/_com/WebVitals.tsx b/src/app/_com/WebVitals.tsx new file mode 100644 index 00000000..37992990 --- /dev/null +++ b/src/app/_com/WebVitals.tsx @@ -0,0 +1,11 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +"use client"; + +import { useReportWebVitals } from "next/web-vitals"; + +export function WebVitals() { + useReportWebVitals((metric) => { + // console.log(metric); + }); + return null; +} diff --git a/src/app/animate/page.tsx b/src/app/animate/page.tsx new file mode 100644 index 00000000..ffb20690 --- /dev/null +++ b/src/app/animate/page.tsx @@ -0,0 +1,128 @@ +"use client" + +import { + motion, + MotionValue, + useScroll, + useSpring, + useTransform, +} from "motion/react" +import { useRef } from "react" + +function useParallax(value: MotionValue, distance: number) { + return useTransform(value, [0, 1], [-distance, distance]) +} + +function Image({ id }: { id: number }) { + const ref = useRef(null) + const { scrollYProgress } = useScroll({ target: ref }) + const y = useParallax(scrollYProgress, 300) + + return ( +
+
+ A London skyscraper +
+ {`#00${id}`} +
+ ) +} + +export default function Parallax() { + const { scrollYProgress } = useScroll() + const scaleX = useSpring(scrollYProgress, { + stiffness: 100, + damping: 30, + restDelta: 0.001, + }) + + return ( +
+ {[1, 2, 3, 4, 5].map((image) => ( + + ))} + + +
+ ) +} + +/** + * ============== Styles ================ + */ + +function StyleSheet() { + return ( + + ) +} diff --git a/src/app/api/[[...slugs]]/_lib/get-potensi.ts b/src/app/api/[[...slugs]]/_lib/get-potensi.ts new file mode 100644 index 00000000..fec4b180 --- /dev/null +++ b/src/app/api/[[...slugs]]/_lib/get-potensi.ts @@ -0,0 +1,10 @@ +import prisma from "@/lib/prisma"; + +async function getPotensi() { + const data = await prisma.potensi.findMany() + return { + data + } +} + +export default getPotensi \ No newline at end of file diff --git a/src/app/api/[[...slugs]]/route.ts b/src/app/api/[[...slugs]]/route.ts new file mode 100644 index 00000000..c78076ac --- /dev/null +++ b/src/app/api/[[...slugs]]/route.ts @@ -0,0 +1,38 @@ +import prisma from "@/lib/prisma"; +import cors, { HTTPMethod } from "@elysiajs/cors"; +import swagger from "@elysiajs/swagger"; +import { Elysia } from "elysia"; +import getPotensi from "./_lib/get-potensi"; + +const corsConfig = { + origin: "*", + methods: ["GET", "POST", "PATCH", "DELETE", "PUT"] as HTTPMethod[], + allowedHeaders: "*", + exposedHeaders: "*", + maxAge: 5, + credentials: true, +}; + + +async function layanan() { + const data = await prisma.layanan.findMany(); + return { data }; +} +const ApiServer = new Elysia() + .use(swagger({ path: "/api/docs" })) + .use(cors(corsConfig)) + .group("/api", app => app + .get("/layanan", layanan) + .get("/potensi", getPotensi) + ) + + + +export const GET = ApiServer.handle; +export const POST = ApiServer.handle; +export const PATCH = ApiServer.handle; +export const DELETE = ApiServer.handle; +export const PUT = ApiServer.handle; + +export type AppServer = typeof ApiServer + diff --git a/src/app/desa/page.tsx b/src/app/desa/page.tsx new file mode 100644 index 00000000..7f30f427 --- /dev/null +++ b/src/app/desa/page.tsx @@ -0,0 +1,7 @@ +import { Stack } from "@mantine/core"; + +export default function Page() { + return + desa + +} \ No newline at end of file diff --git a/src/app/ekonomi/page.tsx b/src/app/ekonomi/page.tsx new file mode 100644 index 00000000..6599ef48 --- /dev/null +++ b/src/app/ekonomi/page.tsx @@ -0,0 +1,7 @@ +import { Stack } from "@mantine/core"; + +export default function Page() { + return + ekonomi + +} \ No newline at end of file diff --git a/src/app/globals.css b/src/app/globals.css index e3734be1..873061a9 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -1,42 +1,31 @@ -:root { - --background: #ffffff; - --foreground: #171717; +/* styles/globals.css */ +@font-face { + font-family: 'San Francisco'; + src: url('/assets/fonts/font.otf') format('opentype'); + font-weight: normal; + font-style: normal; } -@media (prefers-color-scheme: dark) { - :root { - --background: #0a0a0a; - --foreground: #ededed; - } +.glass { + background: rgba(255, 255, 255, 0.2); + -webkit-backdrop-filter: blur(40px); + backdrop-filter: blur(40px); + position: fixed; + z-index: 1; + width: 100%; + height: 100vh; } -html, -body { - max-width: 100vw; - overflow-x: hidden; +.glass2 { + background: rgba(255, 255, 255, 0.3); + -webkit-backdrop-filter: blur(40px); + backdrop-filter: blur(40px); + position: fixed; + z-index: 1; } -body { - color: var(--foreground); - background: var(--background); - font-family: Arial, Helvetica, sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -* { - box-sizing: border-box; - padding: 0; - margin: 0; -} - -a { - color: inherit; - text-decoration: none; -} - -@media (prefers-color-scheme: dark) { - html { - color-scheme: dark; - } +.glass3 { + background: rgba(255, 255, 255, 0.3); + -webkit-backdrop-filter: blur(40px); + backdrop-filter: blur(40px); } diff --git a/src/app/inovasi/page.tsx b/src/app/inovasi/page.tsx new file mode 100644 index 00000000..63f82441 --- /dev/null +++ b/src/app/inovasi/page.tsx @@ -0,0 +1,7 @@ +import { Stack } from "@mantine/core"; + +export default function Page() { + return + inovasi + +} \ No newline at end of file diff --git a/src/app/keamanan/page.tsx b/src/app/keamanan/page.tsx new file mode 100644 index 00000000..24d72e5d --- /dev/null +++ b/src/app/keamanan/page.tsx @@ -0,0 +1,7 @@ +import { Stack } from "@mantine/core"; + +export default function Page() { + return + keamanan + +} \ No newline at end of file diff --git a/src/app/kesehatan/page.tsx b/src/app/kesehatan/page.tsx new file mode 100644 index 00000000..49ec7656 --- /dev/null +++ b/src/app/kesehatan/page.tsx @@ -0,0 +1,7 @@ +import { Stack } from "@mantine/core"; + +export default function Page() { + return + kesehatan + +} \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 42fc323e..c5005848 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,32 +1,60 @@ -import type { Metadata } from "next"; -import { Geist, Geist_Mono } from "next/font/google"; +// Import styles of packages that you've installed. +// All packages except `@mantine/hooks` require styles imports +import "@mantine/carousel/styles.css"; +import "@mantine/core/styles.css"; +import "animate.css"; import "./globals.css"; -const geistSans = Geist({ - variable: "--font-geist-sans", - subsets: ["latin"], -}); +import LoadDataFirstClient from "@/com/LoadDataFirstClient"; +import { + ColorSchemeScript, + MantineProvider, + createTheme, + mantineHtmlProps, +} from "@mantine/core"; +import { MainLayout } from "../com/MainLayout"; +import { ViewTransitions } from "next-view-transitions"; +import { WebVitals } from "./_com/WebVitals"; -const geistMono = Geist_Mono({ - variable: "--font-geist-mono", - subsets: ["latin"], -}); - -export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", +export const metadata = { + title: "desa darmasaba", + description: "Desa Darmasaba Kabupaten Badung", }; +const theme = createTheme({ + fontFamily: + "San Francisco, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif", + fontFamilyMonospace: + "SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace", + headings: { fontFamily: "San Francisco, sans-serif" }, +}); + export default function RootLayout({ children, -}: Readonly<{ +}: { children: React.ReactNode; -}>) { +}) { return ( - - - {children} - - + + + + + + + + + + + {children} + + + + + + ); } diff --git a/src/app/lingkungan/page.tsx b/src/app/lingkungan/page.tsx new file mode 100644 index 00000000..82fa317e --- /dev/null +++ b/src/app/lingkungan/page.tsx @@ -0,0 +1,7 @@ +import { Stack } from "@mantine/core"; + +export default function Page() { + return + lingkungan + +} \ No newline at end of file diff --git a/src/app/module/page.tsx b/src/app/module/page.tsx new file mode 100644 index 00000000..90d1498c --- /dev/null +++ b/src/app/module/page.tsx @@ -0,0 +1,15 @@ +'use client' + +import { Stack } from "@mantine/core" +import { useSnapshot } from "valtio" +import stateNav from "@/state/state-nav" + +export default function Page() { + const { module, isSearch } = useSnapshot(stateNav) + + return ( + + {JSON.stringify({ module, isSearch })} + + ) +} \ No newline at end of file diff --git a/src/app/page.module.css b/src/app/page.module.css deleted file mode 100644 index ee9b8e63..00000000 --- a/src/app/page.module.css +++ /dev/null @@ -1,168 +0,0 @@ -.page { - --gray-rgb: 0, 0, 0; - --gray-alpha-200: rgba(var(--gray-rgb), 0.08); - --gray-alpha-100: rgba(var(--gray-rgb), 0.05); - - --button-primary-hover: #383838; - --button-secondary-hover: #f2f2f2; - - display: grid; - grid-template-rows: 20px 1fr 20px; - align-items: center; - justify-items: center; - min-height: 100svh; - padding: 80px; - gap: 64px; - font-family: var(--font-geist-sans); -} - -@media (prefers-color-scheme: dark) { - .page { - --gray-rgb: 255, 255, 255; - --gray-alpha-200: rgba(var(--gray-rgb), 0.145); - --gray-alpha-100: rgba(var(--gray-rgb), 0.06); - - --button-primary-hover: #ccc; - --button-secondary-hover: #1a1a1a; - } -} - -.main { - display: flex; - flex-direction: column; - gap: 32px; - grid-row-start: 2; -} - -.main ol { - font-family: var(--font-geist-mono); - padding-left: 0; - margin: 0; - font-size: 14px; - line-height: 24px; - letter-spacing: -0.01em; - list-style-position: inside; -} - -.main li:not(:last-of-type) { - margin-bottom: 8px; -} - -.main code { - font-family: inherit; - background: var(--gray-alpha-100); - padding: 2px 4px; - border-radius: 4px; - font-weight: 600; -} - -.ctas { - display: flex; - gap: 16px; -} - -.ctas a { - appearance: none; - border-radius: 128px; - height: 48px; - padding: 0 20px; - border: none; - border: 1px solid transparent; - transition: - background 0.2s, - color 0.2s, - border-color 0.2s; - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - font-size: 16px; - line-height: 20px; - font-weight: 500; -} - -a.primary { - background: var(--foreground); - color: var(--background); - gap: 8px; -} - -a.secondary { - border-color: var(--gray-alpha-200); - min-width: 180px; -} - -.footer { - grid-row-start: 3; - display: flex; - gap: 24px; -} - -.footer a { - display: flex; - align-items: center; - gap: 8px; -} - -.footer img { - flex-shrink: 0; -} - -/* Enable hover only on non-touch devices */ -@media (hover: hover) and (pointer: fine) { - a.primary:hover { - background: var(--button-primary-hover); - border-color: transparent; - } - - a.secondary:hover { - background: var(--button-secondary-hover); - border-color: transparent; - } - - .footer a:hover { - text-decoration: underline; - text-underline-offset: 4px; - } -} - -@media (max-width: 600px) { - .page { - padding: 32px; - padding-bottom: 80px; - } - - .main { - align-items: center; - } - - .main ol { - text-align: center; - } - - .ctas { - flex-direction: column; - } - - .ctas a { - font-size: 14px; - height: 40px; - padding: 0 16px; - } - - a.secondary { - min-width: auto; - } - - .footer { - flex-wrap: wrap; - align-items: center; - justify-content: center; - } -} - -@media (prefers-color-scheme: dark) { - .logo { - filter: invert(); - } -} diff --git a/src/app/page.tsx b/src/app/page.tsx index 84af2cb0..074f661c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,95 +1,32 @@ -import Image from "next/image"; -import styles from "./page.module.css"; +import Content1 from "@/com/main-page/content-1"; +import Content2 from "@/com/main-page/content-2"; +import Content3 from "@/com/main-page/content-3"; +import Content4 from "@/com/main-page/content-4"; +import Content5 from "@/com/main-page/content-5"; +import Content6 from "@/com/main-page/content-6"; +import colors from "@/con/colors"; +// import ApiFetch from "@/lib/api-fetch"; +import { Stack } from "@mantine/core"; -export default function Home() { +export default function Page() { return ( -
-
- Next.js logo -
    -
  1. - Get started by editing src/app/page.tsx. -
  2. -
  3. Save and see your changes instantly.
  4. -
- -
- - Vercel logomark - Deploy now - - - Read our docs - -
-
- -
+ + + + + + + + ); } + +// async function Content3Loader() { +// const { data } = await fetch("/api/layanan").then((v) => v.json()); +// return ; +// } + +// async function Content4Loader() { +// const { data } = await ApiFetch.api.potensi.get(); +// return ; +// } diff --git a/src/app/pendidikan/page.tsx b/src/app/pendidikan/page.tsx new file mode 100644 index 00000000..7c15c565 --- /dev/null +++ b/src/app/pendidikan/page.tsx @@ -0,0 +1,7 @@ +import { Stack } from "@mantine/core"; + +export default function Page() { + return + pendidikan + +} \ No newline at end of file diff --git a/src/com/Footer.tsx b/src/com/Footer.tsx new file mode 100644 index 00000000..c605978f --- /dev/null +++ b/src/com/Footer.tsx @@ -0,0 +1,14 @@ + +import { Stack, Container, Center, Text } from "@mantine/core"; + +function Footer() { + return + +
+ Footer +
+
+
+} + +export default Footer; \ No newline at end of file diff --git a/src/com/LoadDataFirstClient.tsx b/src/com/LoadDataFirstClient.tsx new file mode 100644 index 00000000..5bb16e62 --- /dev/null +++ b/src/com/LoadDataFirstClient.tsx @@ -0,0 +1,8 @@ +"use client"; + + + +export default function LoadDataFirstClient() { + + return null; +} diff --git a/src/com/MainLayout.tsx b/src/com/MainLayout.tsx new file mode 100644 index 00000000..aa7b3971 --- /dev/null +++ b/src/com/MainLayout.tsx @@ -0,0 +1,17 @@ +import { Space, Stack } from "@mantine/core"; +import { Navbar } from "./Navbar"; +import Footer from "./Footer"; + +export function MainLayout({ children }: { children: React.ReactNode }) { + return ( + + + + {children} +