feat: light theme page templates + integration with new content collections
- All 11 page templates rewritten for light theme - index.astro: 8 sections (hero, stats yellow band, problem cards, services mega-grid, black pull-quote, blog preview, yellow CTA) - about.astro: story + values (4 dark-icon cards) + process 4-step - contact.astro: 4 channel picker cards + 8-field form (added budget field) + 3-step 'what happens next' + pre-submit FAQ + yellow final CTA - faq.astro: dynamic category rendering from content/faq collection (5 categories, 20 Q&A) + tag cloud + 3 channel cards - portfolio.astro: industry filter bar (sticky) + 9 items with new schema (industry, what_we_did, result fields) + 'ดีลที่เราเลือก' section - services/index.astro: decision table (6 rows, scannable in 30s) + 3 pricing tiers (Starter/Business/Enterprise) + add-on chips - services/[slug].astro: 4 service types with light hero + pricing + tech options + AI features + 6-FAQ per service - blog/index.astro: featured + 4-card grid from content collection - blog/[slug].astro: 2-column with sidebar (about, contact, related) - privacy.astro + terms.astro: legal content, light theme - All form posts go to setTimeout success (placeholder for backend wire)
This commit is contained in:
@@ -5,17 +5,22 @@ import Footer from '../../components/Footer.astro';
|
||||
import PageHero from '../../components/PageHero.astro';
|
||||
import { getCollection, render } from 'astro:content';
|
||||
|
||||
// For SSR mode, use Astro.params directly
|
||||
const { slug } = Astro.params;
|
||||
|
||||
const allPosts = await getCollection('blog');
|
||||
// Use id for matching since slug might be undefined
|
||||
const post = allPosts.find(p => p.id === slug);
|
||||
|
||||
if (!post) {
|
||||
return Astro.redirect('/404');
|
||||
}
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const allPosts = await getCollection('blog');
|
||||
return allPosts.map(post => ({
|
||||
params: { slug: post.id },
|
||||
props: { post },
|
||||
}));
|
||||
}
|
||||
|
||||
const { Content } = await render(post);
|
||||
|
||||
const related = allPosts
|
||||
@@ -33,13 +38,12 @@ const formattedDate = post.data.date.toLocaleDateString('th-TH', {
|
||||
<Base title={`${post.data.title} | MoreminiMore`}>
|
||||
<Navigation />
|
||||
|
||||
<PageHero
|
||||
<PageHero
|
||||
badge={post.data.category}
|
||||
title={post.data.title}
|
||||
subtitle={formattedDate}
|
||||
/>
|
||||
|
||||
<!-- Article Image -->
|
||||
{post.data.image && (
|
||||
<div class="article-image">
|
||||
<div class="container">
|
||||
@@ -48,7 +52,6 @@ const formattedDate = post.data.date.toLocaleDateString('th-TH', {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<!-- Article Content -->
|
||||
<section class="section article-section">
|
||||
<div class="container">
|
||||
<div class="article-grid">
|
||||
@@ -57,27 +60,23 @@ const formattedDate = post.data.date.toLocaleDateString('th-TH', {
|
||||
<Content />
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<!-- Sidebar -->
|
||||
|
||||
<aside class="article-sidebar">
|
||||
<!-- About -->
|
||||
<div class="sidebar-card">
|
||||
<h3 class="sidebar-title">เกี่ยวกับ MoreminiMore</h3>
|
||||
<p class="sidebar-text">
|
||||
ดิจิทัลเอเจนซี่ที่ช่วยให้ธุรกิจไทยเติบโตด้วยเทคโนโลยีสมัยใหม่
|
||||
</p>
|
||||
<a href="/about" class="btn btn-dark btn-sm">ดูเพิ่มเติม</a>
|
||||
<a href="/about" class="btn btn-outline-dark btn-sm">ดูเพิ่มเติม</a>
|
||||
</div>
|
||||
|
||||
<!-- Contact -->
|
||||
<div class="sidebar-card">
|
||||
<h3 class="sidebar-title">สนใจบริการ?</h3>
|
||||
<p class="sidebar-text">ติดต่อเราได้เลย ปรึกษาฟรี!</p>
|
||||
<a href="/contact" class="btn btn-primary btn-sm">ติดต่อเรา</a>
|
||||
<a href="tel:0809955945" class="btn btn-outline btn-sm" style="margin-top: 8px;">080-995-5945</a>
|
||||
<a href="tel:0809955945" class="btn btn-outline-dark btn-sm" style="margin-top: 8px;">080-995-5945</a>
|
||||
</div>
|
||||
|
||||
<!-- Related Posts -->
|
||||
{related.length > 0 && (
|
||||
<div class="sidebar-card">
|
||||
<h3 class="sidebar-title">บทความที่เกี่ยวข้อง</h3>
|
||||
@@ -102,18 +101,16 @@ const formattedDate = post.data.date.toLocaleDateString('th-TH', {
|
||||
<style>
|
||||
.article-image {
|
||||
padding: 40px 0;
|
||||
background: var(--color-gray-100);
|
||||
background: var(--color-bg-alt);
|
||||
}
|
||||
.article-image img {
|
||||
width: 100%;
|
||||
max-height: 500px;
|
||||
object-fit: cover;
|
||||
border-radius: 20px;
|
||||
border-radius: var(--radius-xl);
|
||||
}
|
||||
|
||||
.article-section {
|
||||
padding-top: 60px;
|
||||
}
|
||||
.article-section { background: var(--color-white); }
|
||||
|
||||
.article-grid {
|
||||
display: grid;
|
||||
@@ -124,55 +121,42 @@ const formattedDate = post.data.date.toLocaleDateString('th-TH', {
|
||||
.article-body {
|
||||
font-size: 18px;
|
||||
line-height: 1.8;
|
||||
color: var(--color-gray-600);
|
||||
color: var(--color-gray-700);
|
||||
}
|
||||
|
||||
.article-body :global(h2) {
|
||||
font-family: var(--font-display);
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
color: var(--color-dark);
|
||||
font-weight: 800;
|
||||
color: var(--color-black);
|
||||
margin: 40px 0 20px;
|
||||
}
|
||||
|
||||
.article-body :global(h3) {
|
||||
font-family: var(--font-display);
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: var(--color-dark);
|
||||
font-weight: 800;
|
||||
color: var(--color-black);
|
||||
margin: 32px 0 16px;
|
||||
}
|
||||
|
||||
.article-body :global(p) {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.article-body :global(p) { margin-bottom: 20px; }
|
||||
.article-body :global(ul), .article-body :global(ol) {
|
||||
margin: 20px 0;
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.article-body :global(li) {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.article-body :global(li) { margin-bottom: 12px; }
|
||||
.article-body :global(a) {
|
||||
color: var(--color-primary);
|
||||
color: var(--color-primary-dark);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.article-body :global(a:hover) {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.article-body :global(a:hover) { text-decoration: underline; }
|
||||
.article-body :global(blockquote) {
|
||||
border-left: 4px solid var(--color-primary);
|
||||
padding-left: 24px;
|
||||
margin: 32px 0;
|
||||
font-style: italic;
|
||||
color: var(--color-gray-600);
|
||||
color: var(--color-gray-700);
|
||||
}
|
||||
|
||||
.article-body :global(img) {
|
||||
border-radius: 12px;
|
||||
border-radius: var(--radius-md);
|
||||
margin: 24px 0;
|
||||
}
|
||||
|
||||
@@ -182,32 +166,30 @@ const formattedDate = post.data.date.toLocaleDateString('th-TH', {
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.sidebar-card {
|
||||
background: var(--color-gray-100);
|
||||
border-radius: 16px;
|
||||
background: var(--color-bg-alt);
|
||||
border: 1px solid var(--color-gray-200);
|
||||
border-radius: var(--radius-xl);
|
||||
padding: 28px;
|
||||
}
|
||||
|
||||
.sidebar-title {
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
color: var(--color-dark);
|
||||
margin-bottom: 16px;
|
||||
font-family: var(--font-display);
|
||||
font-size: 16px;
|
||||
font-weight: 800;
|
||||
color: var(--color-black);
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.sidebar-text {
|
||||
font-size: 14px;
|
||||
color: var(--color-gray-600);
|
||||
line-height: 1.6;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.btn-sm {
|
||||
padding: 12px 20px;
|
||||
font-size: 14px;
|
||||
border-radius: 8px;
|
||||
font-weight: 600;
|
||||
padding: 10px 20px;
|
||||
font-size: 13px;
|
||||
border-radius: var(--radius-md);
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
display: inline-flex;
|
||||
@@ -215,91 +197,39 @@ const formattedDate = post.data.date.toLocaleDateString('th-TH', {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btn-dark {
|
||||
background: var(--color-dark);
|
||||
color: var(--color-white);
|
||||
}
|
||||
|
||||
.btn-dark:hover {
|
||||
background: var(--color-dark-light);
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--color-primary);
|
||||
color: var(--color-black);
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background: var(--color-primary-dark);
|
||||
}
|
||||
|
||||
.btn-outline {
|
||||
background: transparent;
|
||||
border: 2px solid var(--color-dark);
|
||||
color: var(--color-dark);
|
||||
}
|
||||
|
||||
.btn-outline:hover {
|
||||
background: var(--color-dark);
|
||||
color: var(--color-white);
|
||||
}
|
||||
|
||||
/* Related Posts */
|
||||
.related-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.related-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px;
|
||||
padding: 8px;
|
||||
background: var(--color-white);
|
||||
border-radius: 12px;
|
||||
transition: all 0.3s ease;
|
||||
border-radius: var(--radius-md);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.related-item:hover {
|
||||
transform: translateX(4px);
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.related-item:hover { transform: translateX(4px); }
|
||||
.related-item img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-sm);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.related-item span {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--color-dark);
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
color: var(--color-black);
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.article-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.article-sidebar {
|
||||
order: -1;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
.article-grid { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.article-sidebar {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.article-body {
|
||||
font-size: 16px;
|
||||
}
|
||||
.article-body { font-size: 16px; }
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import Base from '../../layouts/Base.astro';
|
||||
import Navigation from '../../components/Navigation.astro';
|
||||
import Footer from '../../components/Footer.astro';
|
||||
import PageHero from '../../components/PageHero.astro';
|
||||
import { getCollection } from 'astro:content';
|
||||
|
||||
const blogPosts = await getCollection('blog');
|
||||
@@ -11,56 +12,14 @@ const sortedPosts = blogPosts.sort((a, b) => b.data.date.valueOf() - a.data.date
|
||||
<Base title="บทความ | MoreminiMore - รับทำเว็บไซต์ SEO AI Chatbot">
|
||||
<Navigation />
|
||||
|
||||
<!-- =============================================
|
||||
HERO SECTION - DARK THEME
|
||||
============================================= -->
|
||||
<section class="blog-hero">
|
||||
<div class="hero-bg">
|
||||
<div class="hero-grid"></div>
|
||||
<div class="orb orb-1"></div>
|
||||
<div class="orb orb-2"></div>
|
||||
<div class="particles">
|
||||
<div class="particle p-1"></div>
|
||||
<div class="particle p-2"></div>
|
||||
<div class="particle p-3"></div>
|
||||
<div class="particle p-4"></div>
|
||||
</div>
|
||||
<div class="lines">
|
||||
<div class="line line-1"></div>
|
||||
<div class="line line-2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<PageHero
|
||||
badge="บทความ"
|
||||
title="ความรู้ด้านดิจิทัล"
|
||||
subtitle="เทคนิคและความรู้ใหม่ๆ สำหรับธุรกิจไทย — อ่านจบใน 5 นาที เน้นลงมือทำ ไม่ใช่ทฤษฎี"
|
||||
/>
|
||||
|
||||
<div class="container">
|
||||
<div class="hero-content">
|
||||
<div class="hero-badge">
|
||||
<span class="badge-dot"></span>
|
||||
<span class="badge-text">บทความ</span>
|
||||
</div>
|
||||
|
||||
<h1 class="hero-title">
|
||||
<span class="title-line">ความรู้</span>
|
||||
<span class="title-accent">ด้านดิจิทัล</span>
|
||||
</h1>
|
||||
|
||||
<p class="hero-desc">
|
||||
เทคนิคและความรู้ใหม่ๆ สำหรับธุรกิจไทย
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hero-wave">
|
||||
<svg viewBox="0 0 1440 100" fill="none" preserveAspectRatio="none">
|
||||
<path d="M0 50C240 100 480 0 720 50C960 100 1200 0 1440 50V100H0V50Z" fill="#F8FAFC"/>
|
||||
</svg>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- =============================================
|
||||
FEATURED POST
|
||||
============================================= -->
|
||||
{sortedPosts.length > 0 && (
|
||||
<section class="featured-section">
|
||||
<section class="featured-section section-soft">
|
||||
<div class="container">
|
||||
<a href={`/blog/${sortedPosts[0].slug}`} class="featured-card">
|
||||
<div class="featured-image">
|
||||
@@ -85,16 +44,11 @@ const sortedPosts = blogPosts.sort((a, b) => b.data.date.valueOf() - a.data.date
|
||||
</section>
|
||||
)}
|
||||
|
||||
<!-- =============================================
|
||||
BLOG GRID
|
||||
============================================= -->
|
||||
<section class="section blog-section">
|
||||
<div class="container">
|
||||
<div class="section-header">
|
||||
<span class="section-badge">บทความทั้งหมด</span>
|
||||
<h2 class="section-title">
|
||||
บทความ<br/><span class="title-accent">ล่าสุด</span>
|
||||
</h2>
|
||||
<h2 class="section-title">บทความ <span class="highlight">ล่าสุด</span></h2>
|
||||
</div>
|
||||
|
||||
<div class="blog-grid">
|
||||
@@ -119,16 +73,13 @@ const sortedPosts = blogPosts.sort((a, b) => b.data.date.valueOf() - a.data.date
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- =============================================
|
||||
CTA SECTION
|
||||
============================================= -->
|
||||
<section class="section cta-section">
|
||||
<section class="section section-yellow cta-section">
|
||||
<div class="container">
|
||||
<div class="cta-content">
|
||||
<h2 class="cta-title">ต้องการความช่วยเหลือ?</h2>
|
||||
<p class="cta-desc">ปรึกษาฟรี! เราพร้อมช่วยวิเคราะห์และให้คำแนะนำ</p>
|
||||
<div class="cta-actions">
|
||||
<a href="/contact" class="btn btn-dark btn-lg">ติดต่อเรา</a>
|
||||
<a href="/contact" class="btn btn-dark btn-lg">ติดต่อเรา →</a>
|
||||
<a href="tel:0809955945" class="btn btn-outline-dark btn-lg">080-995-5945</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -139,242 +90,59 @@ const sortedPosts = blogPosts.sort((a, b) => b.data.date.valueOf() - a.data.date
|
||||
</Base>
|
||||
|
||||
<style>
|
||||
/* =============================================
|
||||
BLOG HERO
|
||||
============================================= */
|
||||
|
||||
.blog-hero {
|
||||
position: relative;
|
||||
min-height: 50vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #0F172A;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.hero-bg {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.hero-grid {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-image:
|
||||
linear-gradient(rgba(254, 212, 0, 0.03) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(254, 212, 0, 0.03) 1px, transparent 1px);
|
||||
background-size: 60px 60px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.orb {
|
||||
position: absolute;
|
||||
border-radius: 50%;
|
||||
filter: blur(60px);
|
||||
opacity: 0.4;
|
||||
}
|
||||
.orb-1 {
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
background: rgba(254, 212, 0, 0.3);
|
||||
top: -50px;
|
||||
right: 10%;
|
||||
animation: orbFloat1 8s ease-in-out infinite;
|
||||
}
|
||||
.orb-2 {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background: rgba(254, 212, 0, 0.2);
|
||||
bottom: 20%;
|
||||
left: 5%;
|
||||
animation: orbFloat2 10s ease-in-out infinite;
|
||||
}
|
||||
@keyframes orbFloat1 {
|
||||
0%, 100% { transform: translate(0, 0) scale(1); }
|
||||
50% { transform: translate(-40px, 30px) scale(1.1); }
|
||||
}
|
||||
@keyframes orbFloat2 {
|
||||
0%, 100% { transform: translate(0, 0) scale(1); }
|
||||
50% { transform: translate(50px, -30px) scale(1.15); }
|
||||
}
|
||||
.particles { position: absolute; inset: 0; overflow: hidden; }
|
||||
.particle {
|
||||
position: absolute;
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
background: #fed400;
|
||||
border-radius: 50%;
|
||||
opacity: 0;
|
||||
}
|
||||
.p-1 { top: 30%; left: 15%; animation: particleFloat 7s ease-in-out infinite; }
|
||||
.p-2 { top: 50%; left: 75%; animation: particleFloat 8s ease-in-out infinite; animation-delay: 2s; }
|
||||
.p-3 { top: 70%; left: 30%; animation: particleFloat 6s ease-in-out infinite; animation-delay: 1s; }
|
||||
.p-4 { top: 20%; left: 60%; animation: particleFloat 9s ease-in-out infinite; animation-delay: 3s; }
|
||||
@keyframes particleFloat {
|
||||
0% { opacity: 0; transform: translateY(50px) scale(0); }
|
||||
20% { opacity: 0.8; }
|
||||
80% { opacity: 0.8; }
|
||||
100% { opacity: 0; transform: translateY(-50px) scale(1); }
|
||||
}
|
||||
.lines { position: absolute; inset: 0; overflow: hidden; }
|
||||
.line {
|
||||
position: absolute;
|
||||
height: 1px;
|
||||
background: linear-gradient(90deg, transparent, rgba(254, 212, 0, 0.3), transparent);
|
||||
animation: lineMove 12s linear infinite;
|
||||
}
|
||||
.line-1 { width: 50%; top: 35%; left: -50%; animation-delay: 0s; }
|
||||
.line-2 { width: 40%; top: 65%; left: -40%; animation-delay: 6s; }
|
||||
@keyframes lineMove {
|
||||
0% { left: -50%; }
|
||||
100% { left: 110%; }
|
||||
}
|
||||
|
||||
.hero-content {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
text-align: center;
|
||||
padding: 80px 0 60px;
|
||||
}
|
||||
|
||||
.hero-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 10px 20px;
|
||||
background: rgba(254, 212, 0, 0.15);
|
||||
border: 1px solid rgba(254, 212, 0, 0.3);
|
||||
border-radius: 100px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.badge-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background: #fed400;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.badge-text {
|
||||
font-family: var(--font-display);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
color: #fed400;
|
||||
}
|
||||
|
||||
.hero-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(32px, 5vw, 52px);
|
||||
font-weight: 900;
|
||||
line-height: 1.1;
|
||||
color: #ffffff;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.title-line {
|
||||
display: block;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.title-accent {
|
||||
display: block;
|
||||
color: #fed400;
|
||||
}
|
||||
|
||||
.hero-desc {
|
||||
font-size: 18px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
max-width: 500px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.hero-wave {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 80px;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.hero-wave svg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* =============================================
|
||||
FEATURED SECTION
|
||||
============================================= */
|
||||
|
||||
.featured-section {
|
||||
background: #F8FAFC;
|
||||
padding: 60px 0 80px;
|
||||
}
|
||||
.section-soft { background: var(--color-bg-alt); }
|
||||
.section-yellow { background: var(--color-primary); }
|
||||
|
||||
/* Featured */
|
||||
.featured-section { padding: 60px 0; }
|
||||
.featured-card {
|
||||
display: grid;
|
||||
grid-template-columns: 1.5fr 1fr;
|
||||
gap: 0;
|
||||
background: #ffffff;
|
||||
border: 2px solid #E2E8F0;
|
||||
border-radius: 20px;
|
||||
background: var(--color-white);
|
||||
border: 1px solid var(--color-gray-200);
|
||||
border-radius: var(--radius-xl);
|
||||
overflow: hidden;
|
||||
transition: all 0.4s ease;
|
||||
}
|
||||
|
||||
.featured-card:hover {
|
||||
border-color: #fed400;
|
||||
transform: scale(1.01);
|
||||
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
|
||||
box-shadow: var(--shadow-md);
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
|
||||
.featured-image {
|
||||
position: relative;
|
||||
aspect-ratio: 16/10;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.featured-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transition: transform 0.5s ease;
|
||||
}
|
||||
|
||||
.featured-card:hover .featured-image img {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.featured-badge {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
left: 16px;
|
||||
background: #fed400;
|
||||
color: #000000;
|
||||
background: var(--color-primary);
|
||||
color: var(--color-black);
|
||||
padding: 6px 14px;
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.featured-content {
|
||||
padding: 40px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.category-badge {
|
||||
display: inline-block;
|
||||
background: #F1F5F9;
|
||||
color: #64748B;
|
||||
background: var(--color-bg-alt);
|
||||
color: var(--color-gray-600);
|
||||
padding: 4px 12px;
|
||||
border-radius: 8px;
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
@@ -382,191 +150,129 @@ const sortedPosts = blogPosts.sort((a, b) => b.data.date.valueOf() - a.data.date
|
||||
align-self: flex-start;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.featured-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(22px, 3vw, 28px);
|
||||
font-weight: 800;
|
||||
color: #0F172A;
|
||||
color: var(--color-black);
|
||||
margin-bottom: 12px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.featured-excerpt {
|
||||
font-size: 14px;
|
||||
color: #64748B;
|
||||
color: var(--color-gray-600);
|
||||
line-height: 1.7;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.read-more {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: #fed400;
|
||||
color: var(--color-black);
|
||||
font-family: var(--font-display);
|
||||
font-weight: 700;
|
||||
font-weight: 800;
|
||||
font-size: 14px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.read-more:hover {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.read-more svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
/* =============================================
|
||||
SECTION HEADER
|
||||
============================================= */
|
||||
|
||||
.section-header {
|
||||
text-align: center;
|
||||
margin-bottom: 48px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.read-more:hover { color: var(--color-primary-dark); }
|
||||
.read-more svg { width: 18px; height: 18px; }
|
||||
|
||||
/* Section header */
|
||||
.section-header { text-align: center; margin-bottom: 48px; }
|
||||
.section-badge {
|
||||
display: inline-block;
|
||||
background: #fed400;
|
||||
color: #000000;
|
||||
background: var(--color-primary);
|
||||
color: var(--color-black);
|
||||
padding: 8px 20px;
|
||||
border-radius: 100px;
|
||||
font-size: 11px;
|
||||
border-radius: var(--radius-full);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(28px, 4vw, 40px);
|
||||
font-weight: 900;
|
||||
line-height: 1.2;
|
||||
color: #0F172A;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* =============================================
|
||||
BLOG SECTION
|
||||
============================================= */
|
||||
|
||||
.blog-section {
|
||||
background: #ffffff;
|
||||
padding: 80px 0;
|
||||
color: var(--color-black);
|
||||
}
|
||||
.section-title .highlight { color: var(--color-primary-dark); }
|
||||
|
||||
/* Blog grid */
|
||||
.blog-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 32px;
|
||||
}
|
||||
|
||||
.blog-card {
|
||||
display: block;
|
||||
background: #ffffff;
|
||||
border: 2px solid #E2E8F0;
|
||||
border-radius: 16px;
|
||||
background: var(--color-white);
|
||||
border: 1px solid var(--color-gray-200);
|
||||
border-radius: var(--radius-xl);
|
||||
overflow: hidden;
|
||||
transition: all 0.4s ease;
|
||||
animation: fadeUp 0.6s ease backwards;
|
||||
animation-delay: var(--delay);
|
||||
}
|
||||
|
||||
.blog-card:hover {
|
||||
border-color: #fed400;
|
||||
transform: translateY(-8px);
|
||||
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
|
||||
box-shadow: var(--shadow-md);
|
||||
border-color: var(--color-primary);
|
||||
}
|
||||
|
||||
.blog-image {
|
||||
aspect-ratio: 16/10;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.blog-image { aspect-ratio: 16/10; overflow: hidden; background: var(--color-bg-soft); }
|
||||
.blog-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transition: transform 0.5s ease;
|
||||
}
|
||||
|
||||
.blog-card:hover .blog-image img {
|
||||
transform: scale(1.08);
|
||||
}
|
||||
|
||||
.blog-content {
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.blog-card:hover .blog-image img { transform: scale(1.08); }
|
||||
.blog-content { padding: 24px; }
|
||||
.blog-category {
|
||||
display: inline-block;
|
||||
background: #F1F5F9;
|
||||
color: #64748B;
|
||||
background: var(--color-primary);
|
||||
color: var(--color-black);
|
||||
padding: 4px 12px;
|
||||
border-radius: 8px;
|
||||
font-size: 10px;
|
||||
border-radius: var(--radius-sm);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.blog-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: 17px;
|
||||
font-size: 18px;
|
||||
font-weight: 800;
|
||||
color: #0F172A;
|
||||
margin-bottom: 10px;
|
||||
color: var(--color-black);
|
||||
margin-bottom: 12px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.blog-excerpt {
|
||||
font-size: 14px;
|
||||
color: #64748B;
|
||||
color: var(--color-gray-600);
|
||||
line-height: 1.6;
|
||||
margin-bottom: 14px;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.blog-date {
|
||||
font-size: 12px;
|
||||
color: #94A3B8;
|
||||
}
|
||||
|
||||
/* =============================================
|
||||
CTA SECTION
|
||||
============================================= */
|
||||
|
||||
.cta-section {
|
||||
background: #fed400;
|
||||
padding: 80px 0;
|
||||
}
|
||||
|
||||
.cta-content {
|
||||
text-align: center;
|
||||
color: var(--color-gray-500);
|
||||
}
|
||||
|
||||
/* CTA */
|
||||
.cta-content { text-align: center; max-width: 700px; margin: 0 auto; }
|
||||
.cta-title {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(28px, 4vw, 36px);
|
||||
font-weight: 800;
|
||||
color: #000000;
|
||||
margin-bottom: 12px;
|
||||
font-size: clamp(28px, 4vw, 44px);
|
||||
font-weight: 900;
|
||||
color: var(--color-black);
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.cta-desc {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
margin-bottom: 28px;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.cta-actions {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
@@ -574,91 +280,13 @@ const sortedPosts = blogPosts.sort((a, b) => b.data.date.valueOf() - a.data.date
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* =============================================
|
||||
BUTTONS
|
||||
============================================= */
|
||||
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
padding: 14px 28px;
|
||||
font-family: var(--font-display);
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1.5px;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn-dark {
|
||||
background: #0F172A;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-dark:hover {
|
||||
background: #1E293B;
|
||||
}
|
||||
|
||||
.btn-outline-dark {
|
||||
background: transparent;
|
||||
color: #000000;
|
||||
border: 2px solid #000000;
|
||||
}
|
||||
|
||||
.btn-outline-dark:hover {
|
||||
background: #000000;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-lg {
|
||||
padding: 16px 32px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@keyframes fadeUp {
|
||||
from { opacity: 0; transform: translateY(20px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
/* =============================================
|
||||
RESPONSIVE
|
||||
============================================= */
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.featured-card {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.featured-image {
|
||||
aspect-ratio: 16/7;
|
||||
}
|
||||
|
||||
.blog-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
.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: 28px;
|
||||
}
|
||||
|
||||
.cta-actions {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.btn-lg {
|
||||
width: 100%;
|
||||
}
|
||||
.blog-grid { grid-template-columns: 1fr; }
|
||||
.cta-actions { flex-direction: column; }
|
||||
.cta-actions .btn { width: 100%; justify-content: center; }
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user