feat(home): link the homepage of every local project in the workspace
- server: GET /api/local-projects scans sibling folders for index.html (title from <title>/<h1>, generic titles fall back to the folder name, sorted by newest edit) and GET /projects/<folder>/ serves that folder - both endpoints are loopback-only; node_modules/.git/.hermes blocked and path traversal rejected; WORKSPACE_DIR=none disables the feature - home: new 'โปรเจคในเครื่อง' list (2 columns >=700px) that hides itself when the API is absent, so the live static site never shows fake rows - SW skips /projects/* so other projects' files are never cached; version 2026.11.19.5 - docs: README/AGENTS/DESIGN cover the endpoints, the loopback rule and the layout
This commit is contained in:
1 parent
b27acd40ee
commit
db7724b237
9 files changed
+417
-5
No files matched your search
@@ -54,6 +54,8 @@
|
||||
- **ฮีโร่**: พื้นไล่เฉดอุ่นอ่อน + การ์ดลอย 3 ใบ **สุ่มจากโปรเจคทั้งหมดใหม่ทุกครั้งที่โหลดหน้า** (Fisher–Yates, ไม่ซ้ำ) แสดงเฉพาะ ≥1080px, `aria-hidden`
|
||||
- **หลังบ้าน**: พาเนล + การ์ดรายการ, ปุ่มเลื่อนขึ้น/ลง/ลบ, แถบบันทึกแบบ sticky ด้านล่าง, `<dialog>` ยืนยันการลบ/ทิ้งการแก้ไข
|
||||
|
||||
- **โปรเจคในเครื่อง (localhost)**: รายการ 2 คอลัมน์ (≥700px) / 1 คอลัมน์ (มือถือ) — ไอคอนโฟลเดอร์ 34px, ชื่อโปรเจค 15px ตัวกลาง, บรรทัดล่างเป็น `<folder> · index.html · แก้ล่าสุด <วันที่ไทย>` (12.5px, โมโนสเปซเฉพาะชื่อโฟลเดอร์), ปุ่มขวา “เปิดหน้าแรก →” (ซ่อนข้อความเมื่อ <560px เหลือลูกศร) · แสดงเฉพาะเมื่อเปิดผ่านเซิร์ฟเวอร์ในเครื่อง
|
||||
|
||||
## 6. สิ่งที่ห้าม
|
||||
|
||||
- ห้ามใช้อิโมจิเป็นไอคอน (ใช้ SVG เส้น 1.7px ใน `ui/ui.js`)
|
||||
|
||||
Reference in new issue
Block a user