commit 8e87e47017b20253990d33c6fdd0cdf9a6283df2 Author: phattaranun.a Date: Fri Oct 23 15:53:30 2026 +0700 feat: design initial ui diff --git a/README.md b/README.md new file mode 100644 index 0000000..032dbf7 --- /dev/null +++ b/README.md @@ -0,0 +1,77 @@ +# 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` diff --git a/resource/images/template-cinema-detail.png b/resource/images/template-cinema-detail.png new file mode 100644 index 0000000..e753739 Binary files /dev/null and b/resource/images/template-cinema-detail.png differ diff --git a/resource/prome.md b/resource/prome.md new file mode 100644 index 0000000..8d04207 --- /dev/null +++ b/resource/prome.md @@ -0,0 +1,6 @@ +ให้สร้าง index.html ไฟล์สำหรับแสดง diagram prototype เพื่อแสดงหน้า web ทั้งหมดที่กำลัง design นี้ โดย diagram จะแสดงเป็นแผนผังพร้อมลูกศรแสดง action อย่างละเอียด ซึ่งแต่ละ node จะแสดงหน้าตาของ page route นั้น ๆ ซึ่งเป็น scale ของ desktop แต่จะถูก resize มาแสดงในรูปแบบ thumbnail เพื่อความกระทัดรัดและจัดลูกศรได้อย่างเป็นระเบียบ + +เว็บไซต์นี้จะมีคุณสมบัติที่ต้องการดังต่อไปนี้ +1. หน้าแรก ทำหน้าที่แสดงโรงหนังต่าง ๆ โดยใช้รูปแบบของการ์ด โดยผู้ใช้สามารถกดคลิกเพื่อเข้าไปหน้า "cinema-detail" ได้ โดยรูปแบบของหน้าแรกนี้จะใช้ theme modern โลกอนาคต และมีความสบายตา ไม่รก ใช้ดำแดงเป็นหลัก(มีการการใช้ลูกเล่นไล่ระดับสีด้วย) +2. หน้า cinema-detail จะใช้ templete ของ resource/images/template-cinema-detail.png เพื่อแสดงรายละเอียดของโรงหนังนั้น ๆ อย่างเหมาะสม +3. ในส่วนของ navbar จะมีส่วน "logo"(alterflixhub) "เกี่ยวกับเรา"(เป็นปุ่มเมื่อกดแล้วจะแสดง popup กรอบสีแดง พื้นหลังสีดำ มีข้อมูลของผู้พัฒนา) "ภาษา"(รองรับไทย-อังกฤษ) \ No newline at end of file diff --git a/resource/ui/cinema-detail.html b/resource/ui/cinema-detail.html new file mode 100644 index 0000000..b4d3147 --- /dev/null +++ b/resource/ui/cinema-detail.html @@ -0,0 +1,204 @@ + + + + + +AlterFlixHub — รายละเอียดโรงภาพยนตร์ + + + + + +
+

หน้าแรก / รายละเอียดโรงภาพยนตร์

+ +
+
+
+
+ เปิดบริการ +

AlterFlix Major

+

ชั้น 4 เซ็นทรัลเวิลด์ · กรุงเทพมหานคร

+
+
+
+ +
+

4.8

คะแนน

+

12

โรงฉาย

+

2,480

ที่นั่ง

+

18

หนังรอบวันนี้

+
+ +
+

เกี่ยวกับโรงภาพยนตร์

+
+ ที่อยู่: ชั้น 4 ศูนย์การค้าเซ็นทรัลเวิลด์ · สิ่งอำนวยความสะดวก: IMAX, Dolby Atmos, VIP Lounge, ที่จอดรถฟรี 4 ชม. +
+
+ +
+

รอบฉายวันนี้

+
+
+
+ + +
+

เกี่ยวกับเรา

+

AlterFlixHub — ศูนย์รวมข้อมูลโรงภาพยนตร์ ดูรอบฉาย เปรียบเทียบ และค้นพบประสบการณ์ชมภาพยนตร์ที่ดีที่สุด

+
ผู้พัฒนา: AlterFlixHub Team · v1.0.0
+ +
+
+ + + + diff --git a/resource/ui/home.html b/resource/ui/home.html new file mode 100644 index 0000000..b77a141 --- /dev/null +++ b/resource/ui/home.html @@ -0,0 +1,195 @@ + + + + + +AlterFlixHub — หน้าแรก + + + + + +
+

ค้นพบโรงภาพยนตร์
รอบตัวคุณ

+

เลือกโรงภาพยนตร์ที่ใช่ ดูรอบฉายและรายละเอียดได้ในที่เดียว

+
+ +
+
+

โรงภาพยนตร์ทั้งหมด

+ 6 แห่ง +
+
+ +
+
+ + + + +
+

เกี่ยวกับเรา

+

AlterFlixHub — ศูนย์รวมข้อมูลโรงภาพยนตร์ ดูรอบฉาย เปรียบเทียบ และค้นพบประสบการณ์ชมภาพยนตร์ที่ดีที่สุด

+
ผู้พัฒนา: AlterFlixHub Team · v1.0.0
+ +
+
+ + + + diff --git a/resource/ui/index.html b/resource/ui/index.html new file mode 100644 index 0000000..21e0132 --- /dev/null +++ b/resource/ui/index.html @@ -0,0 +1,373 @@ + + + + + +AlterFlixHub — Action Route Map + + + + +
+
+ +
+

AlterFlixHub — Action Route Map

+
3 หน้า (route + popup state) · render desktop 1200px + ความสูงเต็ม แล้วย่อเหลือ thumbnail 300px (scale 0.25)
+
+
+ pages – + actions – +
+
+
+ +
+ +
+ +
+ +
+ เปิดดู python3 -m http.server → http://localhost:8000/resource/ui/index.html + ที่มา resource/prome.md +
+ + + +