Before EmDash migration - plain Astro site with 22 pages, unique hero layouts per page, Thai content

This commit is contained in:
Kunthawat Greethong
2026-05-06 09:55:37 +07:00
commit 0dcaf2f253
85 changed files with 11009 additions and 0 deletions

343
src/pages/blog/index.astro Normal file
View File

@@ -0,0 +1,343 @@
---
import Base from '../../layouts/Base.astro';
import Navigation from '../../components/Navigation.astro';
import Hero from '../../components/Hero.astro';
import Footer from '../../components/Footer.astro';
const blogPosts = [
{
slug: "5-ways-ai-increase-sales",
title: "5 วิธี AI เพิ่มยอดขาย",
excerpt: "เรียนรู้ 5 วิธีที่ AI สามารถช่วยเพิ่มยอดขายของคุณได้อย่างมีประสิทธิภาพ",
image: "/images/blog/5-ways-ai-increase-sales.jpg",
date: "2026-01-15",
category: "AI"
},
{
slug: "ai-content-google-love",
title: "AI Content ที่ Google รัก",
excerpt: "วิธีสร้าง AI Content ที่ท z้ both user-friendly และ SEO-friendly",
image: "/images/blog/ai-content-google-love.jpg",
date: "2026-01-10",
category: "AI"
},
{
slug: "ai-for-sme-thailand",
title: "AI สำหรับ SME ไทย",
excerpt: "คู่มือการใช้ AI สำหรับธุรกิจ SME ไทยเพื่อเพิ่มขีดความสามารถในการแข่งขัน",
image: "/images/blog/ai-for-sme-thailand.jpg",
date: "2026-01-05",
category: "AI"
},
{
slug: "back-office-automation",
title: "Back Office Automation",
excerpt: "ลดต้นทุนและเพิ่มประสิทธิภาพด้วยระบบอัตโนมัติ",
image: "/images/blog/back-office-automation.jpg",
date: "2025-12-28",
category: "Automation"
},
{
slug: "chatbot-business-case-study",
title: "Chatbot Business Case Study",
excerpt: "กรณีศึกษาการใช้ Chatbot เพื่อเพิ่มยอดขายและลดต้นทุนการให้บริการ",
image: "/images/blog/chatbot-business-case-study.jpg",
date: "2025-12-20",
category: "Chatbot"
},
{
slug: "data-driven-marketing",
title: "Data Driven Marketing",
excerpt: "การตลาดที่ขับเคลื่อนด้วยข้อมูลเพื่อผลลัพธ์ที่ดีที่สุด",
image: "/images/blog/data-driven-marketing.jpg",
date: "2025-12-15",
category: "Marketing"
},
{
slug: "digital-transformation-guide",
title: "Digital Transformation Guide",
excerpt: "คู่มือฉบับสมบูรณ์สำหรับการ transform ธุรกิจของคุณสู่ดิจิทัล",
image: "/images/blog/digital-transformation.jpg",
date: "2025-12-10",
category: "Business"
},
{
slug: "marketing-automation-guide",
title: "Marketing Automation Guide",
excerpt: "เรียนรู้พื้นฐานของ Marketing Automation และวิธีเริ่มต้น",
image: "/images/blog/marketing-automation-guide.jpg",
date: "2025-12-05",
category: "Marketing"
},
{
slug: "seo-2026-business-guide",
title: "SEO 2026 Business Guide",
excerpt: "การทำ SEO สำหรับธุรกิจในยุค 2026 ต้องรู้อะไรบ้าง",
image: "/images/blog/seo-2026-business-guide.jpg",
date: "2025-11-28",
category: "SEO"
},
{
slug: "website-2026-must-have",
title: "Website 2026 Must Have",
excerpt: "ฟีเจอร์ที่เว็บไซต์ต้องมีในปี 2026",
image: "/images/blog/website-2026-must-have.jpg",
date: "2025-11-20",
category: "Web Dev"
}
];
const categories = ["ทั้งหมด", "AI", "Marketing", "Automation", "SEO", "Web Dev", "Business", "Chatbot"];
function formatDate(dateStr: string) {
const date = new Date(dateStr);
return date.toLocaleDateString('th-TH', { year: 'numeric', month: 'long', day: 'numeric' });
}
---
<Base title="บทความ | MoreminiMore">
<Navigation />
<!-- Hero Section -->
<Hero
title="ความรู้ด้านดิจิทัล"
subtitle="อ่านบทความล่าสุดเกี่ยวกับ AI, Marketing และเทคโนโลยีสำหรับธุรกิจ"
badge="บทความ"
image="/images/hero/blog-hero.jpg"
theme="yellow"
showCTA={false}
variant="centered"
size="compact"
/>
<!-- Blog Section -->
<section class="section blog-section">
<div class="container">
<!-- Featured Post -->
<div class="featured-post">
<a href={`/blog/${blogPosts[0].slug}`} class="featured-card">
<div class="featured-image">
<img src={blogPosts[0].image} alt={blogPosts[0].title} />
</div>
<div class="featured-content">
<span class="category-badge">{blogPosts[0].category}</span>
<h2 class="featured-title">{blogPosts[0].title}</h2>
<p class="featured-excerpt">{blogPosts[0].excerpt}</p>
<span class="read-more">อ่านต่อ →</span>
</div>
</a>
</div>
<!-- Blog Grid -->
<div class="blog-grid">
{blogPosts.slice(1).map((post) => (
<a href={`/blog/${post.slug}`} class="blog-card card">
<div class="blog-image">
<img src={post.image} alt={post.title} loading="lazy" />
</div>
<div class="blog-content">
<span class="category-badge">{post.category}</span>
<h3 class="blog-title">{post.title}</h3>
<p class="blog-excerpt">{post.excerpt}</p>
<span class="blog-date">{formatDate(post.date)}</span>
</div>
</a>
))}
</div>
</div>
</section>
<!-- CTA Section -->
<section class="section section-primary cta-section">
<div class="container">
<div class="cta-content">
<h2 class="cta-title">ต้องการความช่วยเหลือ?</h2>
<p class="cta-desc">ปรึกษาฟรี! เราพร้อมช่วยวิเคราะห์และให้คำแนะนำ</p>
<a href="/contact" class="btn btn-secondary btn-lg">ติดต่อเรา</a>
</div>
</div>
</section>
<Footer />
</Base>
<style>
.blog-section {
background: var(--color-white);
}
.featured-post {
margin-bottom: 60px;
}
.featured-card {
display: grid;
grid-template-columns: 1.5fr 1fr;
gap: 48px;
background: var(--color-light-gray);
border-radius: 24px;
overflow: hidden;
}
.featured-image {
aspect-ratio: 16/10;
overflow: hidden;
}
.featured-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.5s;
}
.featured-card:hover .featured-image img {
transform: scale(1.05);
}
.featured-content {
padding: 48px;
display: flex;
flex-direction: column;
justify-content: center;
}
.category-badge {
display: inline-block;
background: var(--color-primary);
color: var(--color-black);
padding: 6px 16px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
align-self: flex-start;
margin-bottom: 16px;
}
.featured-title {
font-size: 32px;
font-weight: 700;
margin-bottom: 16px;
line-height: 1.3;
}
.featured-excerpt {
font-size: 16px;
color: var(--color-medium-gray);
line-height: 1.7;
margin-bottom: 24px;
}
.read-more {
color: var(--color-primary);
font-weight: 600;
font-size: 16px;
}
.blog-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 32px;
}
.blog-card {
display: flex;
flex-direction: column;
overflow: hidden;
}
.blog-image {
aspect-ratio: 16/10;
overflow: hidden;
}
.blog-image img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.5s;
}
.blog-card:hover .blog-image img {
transform: scale(1.05);
}
.blog-content {
padding: 24px;
flex-grow: 1;
display: flex;
flex-direction: column;
}
.blog-title {
font-size: 18px;
font-weight: 600;
margin-bottom: 8px;
line-height: 1.4;
}
.blog-excerpt {
font-size: 14px;
color: var(--color-medium-gray);
line-height: 1.6;
margin-bottom: 16px;
flex-grow: 1;
}
.blog-date {
font-size: 12px;
color: #999;
}
.cta-section {
padding: 100px 0;
}
.cta-content {
text-align: center;
max-width: 600px;
margin: 0 auto;
}
.cta-title {
font-size: clamp(28px, 4vw, 40px);
font-weight: 800;
margin-bottom: 16px;
}
.cta-desc {
font-size: 18px;
margin-bottom: 32px;
opacity: 0.8;
}
.btn-lg {
padding: 18px 40px;
font-size: 16px;
}
@media (max-width: 1024px) {
.featured-card {
grid-template-columns: 1fr;
}
.blog-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 640px) {
.blog-grid {
grid-template-columns: 1fr;
}
.featured-content {
padding: 32px;
}
.featured-title {
font-size: 24px;
}
}
</style>