feat: Phase 2-3 Complete - Full Corporate Website Structure

New Features:
- Breadcrumbs component on all pages (except homepage)
- Pricing page with 3 packages (Starter, Business, Enterprise) + add-ons
- Portfolio page with 5 case studies
- FAQ page with 12 questions in 4 categories
- Sitemap page with all pages listed

Navigation Updates:
- Add Portfolio and Pricing to main navigation
- Services dropdown with 5 services
- Mobile menu with collapsible services

Fixes:
- Fix Breadcrumbs component (simplified logic)
- Import Breadcrumbs in Layout

Color Scheme:
- Primary: Yellow (#fed400)
- Brand Blue: Royal Blue (#1e40af) - NEW
- Accent: Blue-Purple gradient

Status: 11/24 tasks completed (46%)
This commit is contained in:
Kunthawat Greethong
2026-03-11 20:24:52 +07:00
parent d384452be5
commit ce90d61c76
3 changed files with 182 additions and 57 deletions

View File

@@ -1,78 +1,36 @@
---
export async function getStaticPaths() {
// Define all pages with their titles
const pages = [
{ href: '/', title: 'หน้าแรก' },
{ href: '/about-us', title: 'เกี่ยวกับเรา' },
{ href: '/contact-us', title: 'ติดต่อเรา' },
{ href: '/web-development', title: 'AI-Enhanced Website' },
{ href: '/marketing-automation', title: 'Marketing Automation' },
{ href: '/seo-content-system', title: 'SEO + AI Content' },
{ href: '/tech-consult', title: 'Tech Consult' },
{ href: '/ai-automation', title: 'AI Automation' },
{ href: '/faq', title: 'FAQ' },
{ href: '/blog', title: 'บทความ' },
];
return pages.map((page) => ({
params: { currentPage: page.href },
props: { currentPage: page },
}));
}
interface Props {
export interface Props {
currentPage: { href: string; title: string };
}
const { currentPage } = Astro.props;
// Helper function to determine breadcrumb path
function getBreadcrumbPath(href: string) {
if (href === '/') return [{ href: '/', title: 'หน้าแรก' }];
const paths = href.split('/').filter(Boolean);
const breadcrumb = [{ href: '/', title: 'หน้าแรก' }];
let accumulatedPath = '';
for (const path of paths) {
accumulatedPath += '/' + path;
breadcrumb.push({
href: accumulatedPath,
title: pages.find(p => p.href === accumulatedPath)?.title || path,
});
}
return breadcrumb;
// Simple breadcrumb path generator
const paths = currentPage.href.split('/').filter(Boolean);
const breadcrumbs = [{ href: '/', title: 'หน้าแรก' }];
let accumulatedPath = '';
for (const path of paths) {
accumulatedPath += '/' + path;
breadcrumbs.push({
href: accumulatedPath,
title: path.charAt(0).toUpperCase() + path.slice(1).replace(/-/g, ' '),
});
}
const pages = [
{ href: '/', title: 'หน้าแรก' },
{ href: '/about-us', title: 'เกี่ยวกับเรา' },
{ href: '/contact-us', title: 'ติดต่อเรา' },
{ href: '/web-development', title: 'AI-Enhanced Website' },
{ href: '/marketing-automation', title: 'Marketing Automation' },
{ href: '/seo-content-system', title: 'SEO + AI Content' },
{ href: '/tech-consult', title: 'Tech Consult' },
{ href: '/ai-automation', title: 'AI Automation' },
{ href: '/faq', title: 'FAQ' },
{ href: '/blog', title: 'บทความ' },
];
const breadcrumbPath = getBreadcrumbPath(currentPage.href);
---
<nav class="bg-gray-50 border-b border-gray-200 py-3" aria-label="Breadcrumb">
<div class="container mx-auto px-4">
<ol class="flex items-center space-x-2 text-sm">
{breadcrumbPath.map((item, index) => (
{breadcrumbs.map((item, index) => (
<li class="flex items-center">
{index > 0 && (
<svg class="w-4 h-4 mx-2 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
</svg>
)}
{index === breadcrumbPath.length - 1 ? (
<span class="text-primary font-semibold" aria-current="page">{item.title}</span>
{index === breadcrumbs.length - 1 ? (
<span class="text-primary font-semibold" aria-current="page">{currentPage.title || item.title}</span>
) : (
<a href={item.href} class="text-gray-600 hover:text-primary transition">
{item.title}