feat(header): add UtilityBar + Marquee + Navigation from v6-nav
- UtilityBar.astro (v6-utility): phone, clock, date, email from site settings Clock updated by fxClock() in src/lib/fx-animations.ts - Marquee.astro (v6-marquee): log ticker with 4 entries (animated horizontally) Content duplicated for seamless loop - Navigation.astro (v6-nav): REPLACED legacy. Adds 'บริการ' dropdown (4 services) + 'บทความ' link per plan round 2. Click-to-toggle on mobile. - src/data/nav.ts: single source of truth for mainLinks + servicesDropdown - fx-system.css: +27 lines for dropdown styles + active link underline (v6-nav originally had no dropdown — we added per spec) Refs: .hermes/plans/2026-06-13_124000-moreminimore-v7-5-migration.md Task 2.1-2.4
This commit is contained in:
43
src/data/nav.ts
Normal file
43
src/data/nav.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* MOREMINIMORE - Nav data (single source of truth)
|
||||
* Used by Navigation.astro and Footer.astro
|
||||
*
|
||||
* Per plan 2026-06-13 round 2:
|
||||
* - Main menu: 7 items including 'บทความ' (blog) + 'FAQ' + 'ติดต่อ'
|
||||
* - Services dropdown: 4 services (matched to content collection slugs)
|
||||
* - Social: facebook, line, linkedin (from settings collection at runtime)
|
||||
*
|
||||
* Slugs match src/content/services/*-new.mdx:
|
||||
* - ai-consult-new → /services/ai-consult
|
||||
* - marketing-new → /services/marketing
|
||||
* - automation-new → /services/automation
|
||||
* - webdev-new → /services/webdev
|
||||
*
|
||||
* Href uses /services/{slug-without-new} to match the [slug].astro route.
|
||||
*/
|
||||
export const mainLinks = [
|
||||
{ label: 'หน้าแรก', href: '/' },
|
||||
{ label: 'บริการ', href: '/services', hasDropdown: true },
|
||||
{ label: 'ผลงาน', href: '/portfolio' },
|
||||
{ label: 'บทความ', href: '/blog' },
|
||||
{ label: 'เกี่ยวกับ', href: '/about' },
|
||||
{ label: 'FAQ', href: '/faq' },
|
||||
{ label: 'ติดต่อ', href: '/contact' },
|
||||
];
|
||||
|
||||
export const servicesDropdown = [
|
||||
{ label: 'AI Consult', href: '/services/ai-consult' },
|
||||
{ label: 'Marketing Automation', href: '/services/marketing' },
|
||||
{ label: 'AI Automation', href: '/services/automation' },
|
||||
{ label: 'Website Development', href: '/services/webdev' },
|
||||
];
|
||||
|
||||
/**
|
||||
* Social links are passed as props to the component
|
||||
* (because they come from the settings collection which is loaded async)
|
||||
*/
|
||||
export interface SocialLinks {
|
||||
facebook?: string;
|
||||
line?: string;
|
||||
linkedin?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user