Commit Graph
12 Commits
Author SHA1 Message Date
Bkk1234 8dca22622a docs(traefik): add dynamic file-provider config for alterflixhub.hobbypj.com
Adds docker/traefik-dynamic.example.yml (web -> 301 https, websecure with
letsencrypt resolver, loadBalancer to container:30004 with /healthz check)
and a deploy-dokploy.md section covering the Dokploy Traefik File System
steps, the DNS/dokploy-network prerequisites, and post-save verification.
2026-11-22 22:59:04 +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 ae34597847 feat(docker): nginx static-export image + Dokploy compose with env-driven PORT/origin
- Dockerfile: nginx:1.27-alpine serving the exported site, PORT from env,
  /healthz healthcheck, origin rewrite hook in docker-entrypoint.d
- docker/default.conf.template: envsubst PORT, clean URLs without trailing-slash
  redirect, long cache for hashed assets, no-cache for HTML/sw.js/manifest,
  301 http->https via X-Forwarded-Proto, gzip
- docker/security-headers.conf: single include so add_header survives per location
- docker-compose.yml (Dokploy, no host ports) + docker-compose.override.yml (local)
- bake canonical/OG/sitemap/robots origin to https://alterflixhub.hobbypj.com
  (was the export-time 127.0.0.1:8090), overridable via PUBLIC_ORIGIN
- docs/deploy-dokploy.md
2026-11-22 22:48:12 +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
Bkk1234 507cd44d49 docs: เปลี่ยน remote Gitea เป็น git.hobbypj.com + ลบตัวอย่าง token ในเอกสาร 2026-11-21 15:26:18 +07:00
Bkk1234 1cf1398ba4 feat(admin): รองรับตัวกรองประเภทโรงหนังเต็มรูปแบบ
- ลิสต์โรงหนัง: ช่องค้นหา (ไทย/อังกฤษ/slug) + ชิปกรองประเภทพร้อมจำนวน (ทั้งหมด/ท้องถิ่น/อินดี้/กลุ่ม/ยังไม่จัด)
- ป้ายประเภทท้ายชื่อทุกแถว (ยังไม่จัด = ป้ายแดง) + empty state
- ตั้งประเภททีละกลุ่ม: "ตั้งประเภทให้ N โรงที่กรองอยู่" → เลือกประเภท → ใช้ (แล้วกดบันทึกทั้งหมด)
- หัวหลังบ้านสรุปจำนวนต่อประเภท
- แท็บคำศัพท์: ปุ่มลัดสร้าง key `venues.<ประเภท>` สำหรับแปลชื่อตัวกรอง
- ปิดลากสลับลำดับขณะกรอง + hint อธิบาย
- logic ย้ายไป lib: filterAdminCinemas / setVenueForSlugs / venueCounts + unit tests (169 ผ่าน)
- DESIGN.md / docs/admin-guide.md อัปเดต
2026-11-16 01:54:15 +07:00
Bkk1234 1932098a1d feat(home): ชั้นกรองที่ 1 — ประเภทโรงหนัง (ท้องถิ่น / อินดี้ / กลุ่มคนฉายหนัง)
- แถบกรองสองชั้นในแถวเดียว: ทั้งหมด → 3 ประเภท │ ยอดนิยม → หมวดภาพยนตร์เดิม
- เก็บประเภทที่ฟิลด์เดี่ยว cinema.venue_type (ค่าเดียว) + hasVenue()/filterCinemas({ venue })
- ย้าย "กลุ่มคนฉายหนัง" จาก categories ขึ้นชั้น 1 (ไม่ให้ปุ่มซ้ำ) · tag ยังอยู่และยังค้นหาเจอ
- เลือกได้ทีละชั้น: กดประเภทล้างหมวด / กดหมวดล้างประเภท / ทั้งหมดล้างทั้งคู่
- ปิด popularity path เมื่อกรองด้วยประเภท (กันจัดอันดับข้ามประเภท)
- หลังบ้าน: ช่อง "ประเภทโรงหนัง" ในหมวดข้อมูลหลัก + sanitize เฉพาะค่าใน VENUE_TYPES
- i18n: messages.venues (TH/EN) · override ได้ผ่าน site.terms
- scripts/set-venue-types.mjs จัดประเภท 29 โรง (15 ท้องถิ่น / 11 อินดี้ / 3 กลุ่มคนฉายหนัง) พร้อมสำรอง content.json
- tests: hasVenue + filterCinemas (165 ผ่าน) · sw v2.0.5 · DESIGN/AGENTS/README/admin-guide/api อัปเดต
2026-11-16 01:46:59 +07:00
Bkk1234 42572020d8 fix(contacts): ช่องทางติดต่อกดใช้ได้จริง (tel:/mailto:/โซเชียล) + ซ่อมข้อมูลเดิม
ปัญหา: href ในข้อมูลดิบไม่สม่ำเสมอ (ว่าง / www. ไม่มี scheme / เบอร์ไม่มี tel: /
facebook ติด fbclid) ทำให้กดแล้วไม่เกิดอะไร และปุ่มโทรใช้ไม่ได้

- app/lib/contact-link.ts: resolveContact() จับคู่ลิงก์ตามชนิด
  · เบอร์ → tel:+66… (แปลง 0 นำหน้า, ตัดขีด/ช่องว่าง/วงเล็บ)
  · อีเมล → mailto: · LINE @id → line.me · เว็บ → https + ตัด fbclid/_rdc/utm_*
- ContactPanel: ไอคอนตามชนิด (phone/mail/fb/ig/line/ticket/globe),
  tel/mailto เปิดแท็บเดิม, เว็บเปิดแท็บใหม่; แถวที่ไม่มีลิงก์แสดงเป็นข้อความ (ไม่หลอกให้กด)
- sanitizeCinemas: คำนวณ href ใหม่ทุกครั้งที่บันทึก → ข้อมูลเก่าไม่กลับมาเพี้ยน
- ContactsEditor: auto-format ตอนออกจากช่อง + พรีวิว "✓ กดโทรได้ → tel:+66…"
- scripts/audit-contacts.mjs [--fix]: ตรวจ/ซ่อมทั้งไฟล์ (แก้ไป 13 จุด, สำรองข้อมูลแล้ว)
- contact-link.spec.ts 13 tests · docs: admin-guide/api/DESIGN
2026-11-15 23:56:46 +07:00
Bkk1234 2c5918a614 feat(admin): อัปโหลดรูปโรงหนังจากเครื่อง (เดิมใส่ได้แค่ URL)
- POST /api/admin/uploads (multipart, ≤8MB, ตรวจ magic bytes JPEG/PNG/WebP/AVIF)
  เก็บ data/uploads/cinemas/ คืน /uploads/cinemas/<slug>-<random>-<ts>.<ext>
- GET /uploads/** เสิร์ฟไฟล์อัปโหลด (Nitro route, immutable cache, กัน path traversal)
- PhotosEditor: ปุ่มอัปโหลด + ลากไฟล์มาวาง + Ctrl+V วางจากคลิปบอร์ด, หลายไฟล์พร้อมกัน
- app/lib/upload.ts กติกากลาง + upload.spec.ts (13 tests)
- docs: api.md, admin-guide.md (วิธีอัปโหลด), DESIGN.md, README
2026-11-15 23:36:35 +07:00
Bkk1234 e6e935762e docs: ปรับเอกสารให้ตรงสถานะปัจจุบัน (motion, parity, SEO, push)
- README: เพิ่มบรรทัด "หน้าตาเท่ากันทุกเอนจิน" + อธิบายการ gate อนิเมชันแบบสองชั้น
- docs/api.md: content store มี forCinemas/forFilmLovers · loader คืน origin/siteUrl/shareOrigin · sitemap/robots เป็น Nitro route
- docs/architecture.html: แก้ robots ไม่ใช่ static, 7 แท็บ, เพิ่ม ShareOriginProvider/MotionBootstrap, parity layer, แก้คำผิด "블록"
- docs/push-to-gitea.md: เขียนใหม่ให้ตรงจริง (repo web-alterflixhub, ต้อง -c http.version=HTTP/1.1, ลำดับก่อน push, วิธีตรวจว่า push ขึ้น)
2026-11-14 13:27:53 +07:00
Bkk1234 319c271d23 feat: บทความ 2 หน้า + แชร์/ลิงก์ย่อ + PWA + แอนิเมชัน + SEO/AI + เอกสาร
- บทความจากหลังบ้าน: /for-film-lovers, /for-cinemas (ArticlePage + ArticleEditor แบบบล็อกย่อหน้า/รูป)
- แชร์: ปุ่มบนการ์ดและท้ายหน้ารายละเอียด · ลิงก์ย่อ /c/<slug> (302) · ธีมแก้วตาม DESIGN.md
- PWA: manifest/sw/offline + ถอดการล็อกซูม (WCAG 1.4.4) + touch target ≥44px
- แอนิเมชัน reveal: IntersectionObserver + gate ด้วย html.fx-motion · เคารพ prefers-reduced-motion
- ค้นหา: normalize/ตัดวรรณยุกต์ + AND หลายคำ + จัดอันดับ · รองรับ /?q= จาก SearchAction
- SEO: pageMeta (canonical/OG/Twitter) + JSON-LD (WebSite/Organization/BreadcrumbList/MovieTheater/Article)
- ไม่ฝังโดเมนในโค้ด: origin มาจาก request (x-forwarded-host/proto) ทั้ง canonical, sitemap, robots, ลิงก์แชร์
- กัน AI: robots.txt (Nitro route, บล็อก AI 21 ตัว) + ai.txt + OG image 1200x630
- เอกสาร: README สรุปโปรเจกต์, DESIGN.md (motion/PWA/SEO/ข้อมูล), architecture.html, admin-guide
- tests: 135 ผ่าน (16 ไฟล์)
2026-11-10 02:31:10 +07:00
Bkk1234 1e84023a44 reboot alterflixhub 2026-11-01 17:24:44 +07:00