This commit is contained in:
2026-11-06 06:12:36 -05:00
commit 66a5fcb830
5 changed files with 1128 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
node_modules
.next
+36
View File
@@ -0,0 +1,36 @@
# Personal Website (Next.js)
Situs personal 5 halaman untuk Assignment 1 Pemrograman Web, dibuat dengan Next.js (App Router) + TypeScript.
## Menjalankan
```bash
npm install
npm run dev
```
Buka http://localhost:3000
## Yang perlu kamu ganti
1. Teks pribadi: `lib/data.ts` (nama, tagline, pendidikan, hobi, kontak, dll).
2. Foto: timpa file di `public/images/` dengan fotomu sendiri (nama file sama, format .jpg).
Perbarui teks `alt` di `lib/data.ts` agar sesuai isi fotomu.
## Peta halaman dan metode CSS
| Route | File | Metode CSS |
| ------------ | ----------------------- | -------------------------------------------- |
| `/` | `app/page.tsx` | Inline saja |
| `/about` | `app/about/page.tsx` | Internal + inline + external + Tailwind |
| `/hobbies` | `app/hobbies/page.tsx` | External saja (`public/styles.css`) |
| `/gallery` | `app/gallery/page.tsx` | Tailwind (CDN) saja |
| `/contact` | `app/contact/page.tsx` | External (alasan ada di komentar halaman) |
## Catatan penyesuaian ke Next.js
- Navigasi memakai `<a>` biasa, bukan `next/link`, supaya tiap halaman dimuat penuh seperti situs multipage dan CSS antarhalaman tidak bocor.
- Tidak ada CSS global di `layout.tsx`.
- Komentar HTML asli dirender lewat komponen `HtmlComment` (terlihat di DevTools > Elements).
- Next.js tetap memuat JavaScript bawaannya untuk menjalankan aplikasi. Script tambahan hanya Tailwind CDN.
- Tailwind CDN juga dimuat di `/about` karena halaman itu wajib memakai keempat metode CSS.
+6
View File
@@ -0,0 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./.next/types/routes.d.ts" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
+1063
View File
File diff suppressed because it is too large Load Diff
+21
View File
@@ -0,0 +1,21 @@
{
"name": "personal-website",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "^15.1.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/node": "20.17.6",
"@types/react": "19.3.0",
"@types/react-dom": "^19.0.0",
"typescript": "5.8.2"
}
}