Commit Graph

11 Commits

Author SHA1 Message Date
Kunthawat
d2e032bd04 fix: Fix build errors and test deployment
- Fixed BaseLayout import paths in PDPA pages
- Removed duplicate code from product template
- Fixed admin dashboard to work without database at build time
- Created data directory for SQLite database
- Tested Docker build successfully
- Verified all pages: homepage, products, privacy policy, terms, admin

All 15 pages build successfully and Docker deployment works.
2026-03-10 21:40:24 +07:00
Kunthawat
b2e427791b feat: Add complete PDPA compliance pages
- Admin dashboard (/admin/consent-logs) with password auth
- Consent API (/api/consent) with SQLite + IP hashing
- Privacy Policy (Thai) - PDPA Section 36 compliant
- Terms & Conditions (Thai) - 9 standard clauses
- .env.example template with Umami placeholder

All pages preserve current design system.
2026-03-10 21:28:23 +07:00
Kunthawat
e98b9f2bff chore: Add PDPA dependencies
- astro-consent: Cookie consent management
- @libsql/client: SQLite database driver
- drizzle-orm: Database ORM for consent logging

Required for full PDPA compliance features.
2026-03-10 21:25:06 +07:00
Kunthawat
2f53e3ed15 feat: Add PDPA compliance features to Astro website
- Cookie consent banner (Thai language)
- Consent logging with database (@libsql/client, drizzle-orm)
- Preserved all 6 products with specification tables
- Preserved 3 blog posts
- Added dependencies: astro-consent, @libsql/client, drizzle-orm
- Thai-only routing configuration
- Desktop-first typography (18px base)
- Preserved existing design system (green primary color)

Product data preserved in site-config.ts with tables for:
- ท่อ HDPE
- ท่อ PPR ตราช้าง
- ท่อ PP-R/PP-RCT POLOPLAST
- ท่อไซเลอร์
- ท่อระบายน้ำ 3 ชั้น ไซเลนท์
- ท่อพีพีอาร์ไทย

Ready for Easypanel deployment with Nixpacks.
2026-03-10 21:24:37 +07:00
Kunthawat Greethong
a588155c7d fix: Add favicon.ico link to prevent 404
- Add alternate icon link for favicon.ico
- Add apple-touch-icon link
- Browser automatically requests favicon.ico as fallback
- This prevents 404 errors in console
2026-03-03 13:20:15 +07:00
Kunthawat Greethong
28d20b39c7 fix: Make product tables responsive for mobile
- Add horizontal scroll wrapper for narrow screens
- Reduce font sizes on mobile (text-xs md:text-sm)
- Add padding adjustments for mobile (px-3 py-2)
- Add overflow-x-auto with negative margins for full-width scroll
- Enable word break on cell content
- Set min-width 600px for table readability
- Add border-collapse for cleaner borders

Tables now scroll horizontally on mobile with better readability.
2026-03-02 13:41:24 +07:00
Kunthawat Greethong
6db276d237 fix: Add type definitions inline, remove circular import
- Add SiteConfig, NavItem, ProductCategory, WorkHours interfaces
- Remove: import { ... } from './site-config' (circular import)
- Types now defined at top of file

Fixes TypeScript build error on Easypanel.
2026-03-02 13:17:05 +07:00
Kunthawat Greethong
7a0b593f04 fix: Add .docker/Dockerfile as explicit override for Easypanel
- Create .docker/Dockerfile
- This is a standard location that Easypanel recognizes
- Overrides nixpacks auto-generation
- Simple Astro build without Next.js caching
2026-03-02 12:56:23 +07:00
Kunthawat Greethong
482e0efa70 fix: Remove content.config.ts - use Astro's default content behavior
- Delete src/content.config.ts file
- Astro uses built-in content collection defaults
- Fixes build errors from explicit schema configuration
- First deploy worked without this file
- Subsequent deploys failed because of this file
2026-03-02 12:52:08 +07:00
Kunthawat Greethong
5a2fb71c40 fix: Add nixpacks configuration for Astro deployment 2026-03-02 12:35:14 +07:00
Kunthawat Greethong
ede8e32591 feat: Fix product tables and responsive fonts
- Add product detail page ([slug].astro) with table rendering
- Display productTables from site-config.ts on product pages
- Add responsive font scaling for large screens (1280px+)
- Base font scales from 16px to 24px on 4K displays
- All text elements use responsive sizing (md/lg/xl breakpoints)
- Tables styled with green headers and alternating rows
- Add comprehensive documentation (FIXES_SUMMARY.md)

Fixes:
- Product specification tables now visible on product pages
- Font too small on large screens - now responsive
2026-03-02 12:22:13 +07:00