🎨 Fix: Add Header and Footer to all pages + standardize colors
MAJOR FIX - Pages were missing Header and Footer components: ✅ Added Header import to all pages ✅ Added Footer import to all pages ✅ Added <Header /> and <Footer /> components ✅ Changed custom colors to standard Tailwind (green-600, gray-*) ✅ Fixed: about-us, services, products, blog pages COLOR SCHEME: - primary-600 → green-600 (trust, growth) - secondary-900 → gray-900 (professional) - secondary-800 → gray-800 - secondary-600 → gray-600 - secondary-200 → gray-200 All pages now show proper Header navigation and Footer with links!
This commit is contained in:
@@ -1,32 +1,22 @@
|
||||
---
|
||||
import { getCollection } from 'astro:content';
|
||||
import BlogCard from '../../components/BlogCard.astro';
|
||||
import BaseLayout from '../../layouts/BaseLayout.astro';
|
||||
import Header from '../../components/Header.astro';
|
||||
import Footer from '../../components/Footer.astro';
|
||||
import FloatingContact from '../../components/FloatingContact.astro';
|
||||
import BlogCard from '../../components/BlogCard.astro';
|
||||
import { getCollection } from 'astro:content';
|
||||
|
||||
const posts = await getCollection('blog');
|
||||
|
||||
export const metadata = {
|
||||
title: 'บทความความรู้',
|
||||
description: 'บทความความรู้เกี่ยวกับวัสดุท่อ อุปกรณ์ระบบท่อ และเทคนิคการติดตั้ง',
|
||||
};
|
||||
|
||||
export const prerender = true;
|
||||
---
|
||||
|
||||
<BaseLayout title={metadata.title} description={metadata.description}>
|
||||
<main class="pt-32 pb-16">
|
||||
<BaseLayout title="บล็อก" description="บทความและข่าวสาร">
|
||||
<Header />
|
||||
|
||||
<main class="pt-32 pb-16 bg-gray-50">
|
||||
<div class="container mx-auto px-4">
|
||||
<!-- Hero -->
|
||||
<div class="text-center mb-12">
|
||||
<h1 class="text-4xl md:text-5xl font-bold text-secondary-900 mb-4">
|
||||
บทความ<span class="text-primary-600">ความรู้</span>
|
||||
</h1>
|
||||
<p class="text-xl text-secondary-600 max-w-2xl mx-auto">
|
||||
บทความความรู้เกี่ยวกับวัสดุท่อ อุปกรณ์ระบบท่อ และเทคนิคการติดตั้ง
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Blog Grid -->
|
||||
<h1 class="section-title text-center mb-4">บล็อก</h1>
|
||||
<p class="section-subtitle text-center mb-12">บทความและข่าวสารจากเรา</p>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
{posts.map((post) => (
|
||||
<BlogCard post={post} />
|
||||
@@ -34,4 +24,7 @@ export const prerender = true;
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<Footer />
|
||||
<FloatingContact />
|
||||
</BaseLayout>
|
||||
|
||||
Reference in New Issue
Block a user