Refactor: Update category structure, mega menu, footer, and remove unused pages

- Move DURGO from ระบบน้ำ to อุปกรณ์ปรับอากาศ
- Add -category suffix to อุปกรณ์ดับเพลิง and ฉนวนหุ้มท่อ category pages
- Update Header mega menu with correct category slugs
- Fix Footer layout: split categories to 2 columns, remove quick links
- Delete unused pages: all-projects, join-us, services, product
- All product images fixed to 1:1 aspect ratio
This commit is contained in:
Kunthawat
2026-03-31 22:54:54 +07:00
parent dbbd9e22a2
commit 9cddd3da57
53 changed files with 3865 additions and 2888 deletions

View File

@@ -0,0 +1,31 @@
import type { APIRoute } from 'astro';
export const POST: APIRoute = async ({ request }) => {
const consentData = await request.json();
const record = {
id: crypto.randomUUID(),
essential: consentData.essential ?? true,
analytics: consentData.analytics ?? false,
marketing: consentData.marketing ?? false,
timestamp: consentData.timestamp || Date.now(),
policyVersion: consentData.policyVersion || '1.0',
ip: request.headers.get('x-forwarded-for') || 'unknown',
userAgent: request.headers.get('user-agent') || 'unknown',
createdAt: new Date().toISOString()
};
console.log('[Consent Log]', JSON.stringify(record));
return new Response(JSON.stringify({ success: true, record }), {
status: 200,
headers: { 'Content-Type': 'application/json' },
});
};
export const GET: APIRoute = () => {
return new Response(JSON.stringify({ error: 'Method not allowed' }), {
status: 405,
headers: { 'Content-Type': 'application/json', 'Allow': 'POST' },
});
};