Commit Graph
8 Commits
Author SHA1 Message Date
Bkk1234 ddfb0a5053 refactor(media): แยกรูปออกจาก code — รูปทั้งหมดอยู่บน object storage
code อยู่ใน git · รูปอยู่บน SeaweedFS (https://storage.hobbypj.com/hobbypj/alterflixhub/)

- อัปโหลด images/ (21 ไฟล์) + og/ (1 ไฟล์) ขึ้น storage แล้วตรวจ sha256 ตรงทุกไฟล์
- แทนที่อ้างอิง 894 จุด ใน 37 ไฟล์: /images/… → <storage>/images/…, /og/… → <storage>/og/…
  (absolute URL ทุกที่ รวม JSON-LD/og:image/twitter:image และ placeholder ในหลังบ้าน)
- ลบ images/ + og/ ออกจาก repo · สำเนาในเครื่องย้ายไป media/ (gitignored)
- scripts/media-to-storage.py: สคริปต์ที่ใช้ย้าย (บันทึกวิธี + ใช้ซ้ำได้เมื่อเปลี่ยน base)
- scripts/media-sync.py: --check / --upload รูปขึ้น storage (basic auth หรือ SSH tunnel ไป filer)
- sw.js: bump v2.1.6 + แคชรูปจาก storage แบบ cache-first (isMedia/mediaCacheFirst) กันออฟไลน์แล้วรูปหาย
- docker/traefik-storage-alterflixhub.yml: router เปิดอ่านสาธารณะเฉพาะ /hobbypj/alterflixhub/
  (host storage บังคับ Basic auth ทั้ง host — ต้องมี router priority 300 + CORS ก่อน)
- docs/media-storage.md: วิธีอัปโหลด/เพิ่มรูป + ข้อกำหนดฝั่ง Traefik
- .gitignore/.dockerignore: กัน media/, images/, og/ กลับเข้า repo/image

ไอคอน PWA (icon-*.png, favicon.svg) ยังอยู่ใน repo — ต้อง same-origin ให้ติดตั้ง PWA ได้
2026-11-27 02:08:19 +07:00
Bkk1234 b1322b971e fix(deploy): CSS hash เก่าไม่ 404 + เงียบ /_agent-native 404 + sw v2.1.5
จาก audit log จริงบน Dokploy เจอ 2 เคส
1) GET /assets/global-DjioL_Jq.css → 404 (หน้าที่ยังค้างแคช/SW รุ่นก่อนอ้าง CSS hash เก่า)
   → nginx: ^/assets/*.css ใช้ try_files $uri /assets/global.css
   → 30-origin.sh คัดลอก assets/global-<hash>.css → assets/global.css ตอนสตาร์ท (ไม่ต้อง hardcode hash)
2) GET /_agent-native/auth/session|agent-engine/status, POST /_agent-native/auth/attribution, /__agent-native-chunk-recovery → 404 31KB
   → nginx: return 204 + access_log off (client chunk ยังยิงอยู่ แต่ไม่กิน log/แบนด์วิดท์)
3) sw.js VERSION v2.1.5 (ล้างแคชหน้าเก่าให้ผู้ใช้)
2026-11-25 03:26:41 +07:00
Bkk1234 a8a022ec54 fix(cards): จำกัดพื้นที่คลิกที่ "กล่องข้อความ" เท่านั้น — รูปไม่ navigate
- card-click v2: ตรวจว่าคลิกอยู่ใน parent ของลิงก์ "ดูรายละเอียด" (= กล่อง bg-[#1B1B1B])
  · คลิกรูป/พื้นที่ด้านบนการ์ด → ไม่ทำอะไร
  · คลิกกล่องข้อความ (km./ชื่อ/ที่ตั้ง/tag/ช่องว่าง) → เปิดหน้าโรงหนัง
  · ปุ่มแชร์ยังทำงานเอง
- cursor: pointer เฉพาะกล่องข้อความ (article = auto)
- ลบ card-click.v1.js · อัปเดตแท็กใน 64 หน้า · sw VERSION v2.1.4 + precache v2
- docs/card-clickable.md: อธิบายขอบเขตการคลิกด้วยโครงสร้าง DOM จริง
2026-11-24 15:29:04 +07:00
Bkk1234 c2506b8ed4 feat(cards): คลิกการ์ดโรงหนังได้ทั้งใบ (ไม่ใช่แค่ "ดูรายละเอียด")
- assets/card-click.v1.js: event delegation บน <article> → location.assign(a[href^="/cinema/"])
  · ยกเว้นปุ่ม/ลิงก์ภายในใบ (ปุ่มแชร์ยังทำงานเอง) และตอนลากเลือกข้อความ
  · cursor pointer + focus ring ที่ลิงก์ "ดูรายละเอียด"
- scripts/apply-card-click.mjs: เติม <script defer> ให้ทุก .html (64 ไฟล์) + โหมด --check
- sw.js: precache card-click + VERSION v2.1.3
- docs/card-clickable.md: กติกา ผลทดสอบ และขั้นตอนหลัง re-export
2026-11-24 15:25:06 +07:00
Bkk1234 82374ebfdd fix(scroll): mouse wheel did not scroll the page
main.agent-native-app-main is a scroll container (overflow-y:auto +
overscroll-contain) whose content equals its own height, so it swallowed the
wheel and the document never scrolled; the site wrapper's overflow-x:hidden
also made its overflow-y compute to auto. Neutralise both scrollers so the
document is the only scroller (overflow-x:clip keeps horizontal clipping).

Cache safety: the patched CSS kept its old hashed filename, and nginx served
/assets/* as immutable for a year, so visitors with the earlier CSS could
never receive the fix. Renamed the stylesheet to a content hash and updated
34 HTML references, switched /assets/ to no-cache (revalidate, 304), bumped
sw.js VERSION to v2.1.2. docs/deploy-dokploy.md updated.
2026-11-22 22:52:17 +07:00
Bkk1234 0426b8e953 chore(repo): add .gitignore for secrets/data + bump sw.js VERSION to v2.1.1
Ignore credential and private-key files, the real content data directory
(data/ holds phone numbers, emails, addresses), backups/logs that can carry
that data, plus build/dependency artifacts for future source work.
No tracked file matches a new rule; published export files stay tracked.
Bump sw.js VERSION to v2.1.1 so the cache-first /assets/ rule refreshes.
2026-11-22 22:34:54 +07:00
Bkk1234 1078c50249 fix(layout): unlock page scroll in static export (ToolkitProvider shell clipped at 100vh)
The exported HTML wraps the site in the agent-native ToolkitProvider shell
(div.flex.h-screen.overflow-hidden), so the document could not scroll and
every [data-reveal] block below the fold stayed at opacity:0 - the site
looked like it had no content after the hero. Override the shell height /
overflow in the global stylesheet, and bump sw.js VERSION to v2.0.6 so the
cache-first /assets/ rule does not keep serving the old CSS.
2026-11-22 22:30:47 +07:00
Bkk1234 e6c4ebff48 chore(publish): replace source tree with static export at repo root
Publish the prerendered static export (index.html, 404.html, cinema/,
c/, about/, for-cinemas/, for-film-lovers/, assets/, images/, og/,
sitemap.xml, robots.txt) as the site root and remove the React Router
+ Nitro source tree from this branch. Source remains available in
history at 0548772.

Note: public/sw.js here reports VERSION v2.0.5 while the removed source
tree (v2.1.0) was newer, and .gitignore was not carried over.
2026-11-22 22:24:36 +07:00