diff --git a/src/components/Footer.astro b/src/components/Footer.astro index b48a5dd..6b87226 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,439 +1,82 @@ --- /** - * MOREMINIMORE - FOOTER COMPONENT (LIGHT THEME) - * White bg + dark text + black-text logo (matches new light theme) + * MOREMINIMORE - FOOTER (from v6-footer) + * Extracted from Desktop/moreminomore-mockup-v7-5.html lines 1516-1565 + * + * 4-col sitemap: brand + services + company + contact + * Data bound from site settings + nav data (single source of truth) */ -import Icon from './Icon.astro'; +import { getEntry } from 'astro:content'; +import type { CollectionEntry } from 'astro:content'; +import { servicesDropdown, mainLinks } from '../data/nav'; +const site = (await getEntry('settings', 'site')) as CollectionEntry<'settings'>; +const data = site?.data; const currentYear = new Date().getFullYear(); -const navLinks = [ - { label: 'หน้าแรก', href: '/' }, - { label: 'บริการ', href: '/services' }, - { label: 'ผลงาน', href: '/portfolio' }, - { label: 'บทความ', href: '/blog' }, - { label: 'ติดต่อ', href: '/contact' }, -]; +// Company links (subset of mainLinks — exclude "หน้าแรก" and dropdown items) +const companyLinks = mainLinks + .filter((l) => !l.hasDropdown && l.href !== '/') + .map((l) => ({ label: l.label, href: l.href })); -const serviceLinks = [ - { label: 'พัฒนาเว็บไซต์', href: '/services/webdev' }, - { label: 'Marketing Automation', href: '/services/marketing' }, - { label: 'AI Automation', href: '/services/automation' }, - { label: 'Tech Consult', href: '/services/ai-consult' }, +// Contact links — built from settings +const contactLinks = [ + { label: 'ปรึกษาฟรี 30 นาที', href: '/contact' }, + { label: data?.email ?? 'contact@moreminimore.com', href: `mailto:${data?.email ?? 'contact@moreminimore.com'}`, isEmail: true }, + { label: 'LINE: ' + (data?.line_id ?? '@moreminimore'), href: data?.line ?? '#', isExternal: true }, + { label: data?.phone ?? '080-995-5945', href: `tel:${(data?.phone ?? '080-995-5945').replace(/-/g, '')}` }, ]; - --- -