Files
web-alterflixhub/README.md
T
2026-10-23 15:53:30 +07:00

78 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# AlterFlixHub — Web Mockup & Route Diagram
ต้นแบบเว็บไซต์ศูนย์รวมข้อมูลโรงภาพยนตร์ **AlterFlixHub** (static HTML + vanilla JS — ไม่มี backend / framework / build step)
ประกอบด้วย:
- หน้าเว็บต้นแบบ (mockup) 3 หน้า
- **Action Route Map** — diagram แสดงผังหน้าเว็บพร้อมลูกศร action route
## โครงสร้าง
```
web-alterflixhub/
├── resource/
│ ├── prome.md ← สเปกงานออกแบบ (อ่านก่อนแก้ UI)
│ ├── images/
│ │ └── template-cinema-detail.png ← template หน้า cinema-detail (1200×778, ดำ-แดง)
│ └── ui/ ← ★ ผลลัพธ์ (หน้า mockup + diagram)
│ ├── home.html ← หน้าแรก: การ์ดโรงหนัง
│ ├── cinema-detail.html ← รายละเอียดโรงภาพยนตร์
│ └── index.html ← Action Route Map (diagram)
└── README.md
```
## วิธีรัน (Step-by-step)
### 1. เปิด Terminal แล้วเข้าไปที่ root ของโปรเจกต์
```bash
cd /Users/ar667100/Desktop/myworkspace/bank-project/workspace/alterflixhub/web-alterflixhub
```
> ถ้าเครื่องคนอื่น path ต่างกัน ให้ `cd` ไปที่โฟลเดอร์ `web-alterflixhub` (ที่มีไฟล์ `README.md` นี้)
### 2. ตรวจสอบว่ามี Python 3
```bash
python3 --version
```
> ต้องได้เวอร์ชัน 3.x ขึ้นไป (macOS/Windows/Linux มี Python 3 ติดตั้งมาให้ หรือติดตั้งจาก python.org)
### 3. รัน static server
```bash
python3 -m http.server 8000
```
> **สำคัญ:** ต้องรันจาก root ของโปรเจกต์ (ไม่ใช่จาก `resource/ui/`)
> เพราะหน้าเว็บอ้างไฟล์กันด้วย relative path — ต้องมี root เดียวกันครอบทั้ง tree
### 4. เปิดเบราว์เซอร์
| หน้า | URL |
|---|---|
| **Action Route Map (diagram)** | http://localhost:8000/resource/ui/index.html |
| หน้าแรก (Home) | http://localhost:8000/resource/ui/home.html |
| รายละเอียดโรงภาพยนตร์ | http://localhost:8000/resource/ui/cinema-detail.html |
### 5. หยุด server
กด `Ctrl+C` ในหน้าต่าง Terminal ที่รัน server อยู่
## เปลี่ยน port
ถ้า port `8000` ถูกใช้งานอยู่ ให้เปลี่ยนเป็นเลขอื่น (เช่น 8090):
```bash
python3 -m http.server 8090
```
แล้วเปิด `http://localhost:8090/resource/ui/index.html`
## หมายเหตุ
- **ห้ามเปิด `file://`** — ให้รันผ่าน static server เสมอ (ตามขั้นตอนด้านบน)
- Diagram (`index.html`) render แต่ละหน้าแบบ **desktop 1200px + ความสูงเต็ม** แล้วย่อเป็น thumbnail 300px (`scale 0.25`) เพื่อความกระทัดรัด
- สี theme: **ดำ-แดง** (`#0a0a0a` / `#e00000`) ตาม spec ใน `resource/prome.md` และ template `template-cinema-detail.png`