Add EmDash CMS blog + hero standardization + seed fix

- Add EmDash CMS integration with SQLite and local storage
- Add blog collection (seed/seed.json) with 3 sample posts
- Add /บทความ list page and /บทความ/[slug] detail page
- Add blog section to homepage
- Fix reserved field slugs (slug, published_at removed from fields)
- Fix date field mapping (publishedAt camelCase)
- Fix featured image URL for admin-uploaded images (meta.storageKey)
- Standardize all product page hero sections
- Update navigation with 'บทความ' link
- Configure Google OAuth provider
This commit is contained in:
Kunthawat Greethong
2026-06-01 15:44:02 +07:00
parent 825d3264b3
commit c8cf03a725
35 changed files with 5786 additions and 185 deletions

View File

@@ -26,7 +26,7 @@ import StickyBottomCTA from '@/components/common/StickyBottomCTA.astro';
<main class="bg-white min-h-screen pb-24 md:pb-0">
<!-- Hero Section -->
<section class="bg-gradient-to-br from-primary-700 to-primary-600 text-white py-12 relative overflow-hidden">
<section class="relative bg-gradient-to-br from-primary-800 via-primary-700 to-primary-900 text-white py-16 lg:py-24 overflow-hidden">
<!-- Animated Background -->
<div class="absolute inset-0 overflow-hidden pointer-events-none">
@@ -36,8 +36,6 @@ import StickyBottomCTA from '@/components/common/StickyBottomCTA.astro';
<div class="absolute top-1/4 left-1/4 w-2 h-2 bg-white/30 rounded-full animate-float"></div>
<div class="absolute top-1/3 right-1/4 w-3 h-3 bg-primary-300/20 rounded-full animate-float-delayed-1"></div>
<div class="absolute top-2/3 left-1/3 w-2 h-2 bg-primary-200/20 rounded-full animate-float-delayed-2"></div>
<div class="absolute top-1/2 right-1/3 w-4 h-4 bg-white/15 rounded-full animate-float"></div>
<div class="absolute bottom-1/4 left-2/3 w-3 h-3 bg-primary-400/15 rounded-full animate-float-delayed-3"></div>
<!-- Water-inspired Waves -->
<svg class="absolute bottom-0 left-0 w-full h-[250px] opacity-20" viewBox="0 0 1440 250" preserveAspectRatio="none">
@@ -64,25 +62,26 @@ import StickyBottomCTA from '@/components/common/StickyBottomCTA.astro';
<nav class="text-sm mb-4 text-primary-100">
<a href="/" class="hover:text-white">หน้าแรก</a> / <a href="/all-products" class="hover:text-white">สินค้าทั้งหมด</a> / <span class="text-white">เทอร์โมเบรค Thermobreak</span>
</nav>
<div class="grid lg:grid-cols-2 gap-8 items-start">
<div class="grid lg:grid-cols-2 gap-12 items-start">
<div class="lg:sticky lg:top-24">
<div class="img-hover rounded-2xl overflow-hidden bg-white/10">
<div class="rounded-2xl overflow-hidden bg-white/10" p-2>
<img src="/images/thermobreak/thermobreak-solarblock.png" alt="เทอร์โมเบรค Thermobreak" class="w-full" loading="eager" />
</div>
</div>
<div>
<span class="text-sm text-primary-200 font-medium">ฉนวนและรั้ว</span>
<h1 class="text-3xl lg:text-4xl font-bold mt-2 mb-4">เทอร์โมเบรค Thermobreak</h1>
<p class="text-primary-100 text-lg mb-6">ฉนวนเทอร์โมเบรค คุณภาพสูงจากออสเตรเลีย ป้องกันความร้อนได้ดีเยี่ยม มาตรฐาน FM และ UL</p>
<span class="inline-block px-4 py-1.5 bg-white/20 text-white rounded-full text-sm font-medium mb-4">ฉนวนและรั้ว</span>
<h1 class="text-3xl sm:text-4xl lg:text-5xl font-bold mb-4">เทอร์โมเบรค Thermobreak</h1>
<p class="text-lg sm:text-xl text-white/80 mb-6 leading-relaxed">ฉนวนเทอร์โมเบรค คุณภาพสูงจากออสเตรเลีย ป้องกันความร้อนได้ดีเยี่ยม มาตรฐาน FM และ UL</p>
<div class="flex flex-wrap gap-4 mb-8">
<a href="https://line.me/ti/p/~JPPSELECTION" target="_blank" class="bg-accent-500 hover:bg-accent-600 text-white py-3 px-6 rounded-xl font-semibold flex items-start gap-2">
<span>แชท Line</span>
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24"><path d="M19.365 9.863c.349 0 .63.285.63.631 0 .345-.281.63-.63.63H17.61v1.125h1.755c.349 0 .63.283.63.63 0 .344-.281.629-.63.629h-2.386c-.345 0-.627-.285-.627-.629V8.108c0-.344.282-.629.627-.629h2.386c.349 0 .63.285.63.63 0 .349-.281.63-.63.63H17.61v1.125h1.755zm-3.855 3.016c0 .27-.174.51-.432.596-.064.021-.133.031-.199.031-.211 0-.391-.09-.51-.25l-2.443-3.317v2.94c0 .344-.279.629-.631.629-.346 0-.626-.285-.626-.629V8.108c0-.27.173-.51.43-.595.06-.023.136-.033.194-.033.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.629.63-.629.345 0 .63.284.63.629v4.771zm-5.741 0c0 .344-.282.629-.631.629-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.629.627-.629.349 0 .631.284.631.629v4.771zm-2.466.629H4.917c-.345 0-.63-.285-.63-.629V8.108c0-.345.285-.629.63-.629.348 0 .63.284.63.629v4.141h1.756c.348 0 .629.283.629.63 0 .344-.282.629-.629.629M24 10.314C24 4.943 18.615.572 12 .572S0 4.943 0 10.314c0 4.811 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.301.079.766.038 1.08l-.164 1.02c-.045.301-.24 1.186 1.049.645 1.291-.539 6.916-4.078 9.436-6.975C23.176 14.393 24 12.458 24 10.314"/></svg>
<span>แชท Line</span>
</a>
<a href="tel:0905551415" class="bg-white text-primary-700 hover:bg-primary-50 py-3 px-6 rounded-xl font-semibold flex items-start gap-2">
<span>090-555-1415</span>
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"/>
</svg>
<span>090-555-1415</span>
</a>
<a href="#pricelist" data-price-button class="hidden bg-white text-primary-700 hover:bg-primary-50 py-3 px-6 rounded-xl font-semibold flex items-start gap-2">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">