diff --git a/src/app/meshkee/static-image-slots/route.ts b/src/app/meshkee/static-image-slots/route.ts new file mode 100644 index 0000000..9222f54 --- /dev/null +++ b/src/app/meshkee/static-image-slots/route.ts @@ -0,0 +1,14 @@ +import { NextResponse } from "next/server"; +import { STATIC_IMAGE_SLOT_CATALOG } from "@/lib/static-images"; + +export function GET() { + return NextResponse.json( + { slots: STATIC_IMAGE_SLOT_CATALOG }, + { + headers: { + "Access-Control-Allow-Origin": "*", + "Cache-Control": "public, max-age=60", + }, + }, + ); +} diff --git a/src/lib/static-images.ts b/src/lib/static-images.ts index 9619f6d..5795df1 100644 --- a/src/lib/static-images.ts +++ b/src/lib/static-images.ts @@ -9,6 +9,45 @@ export const HOME_SLOT_KEYS = { oneBannerRow: "one-banner-row", } as const; +export const STATIC_IMAGE_SLOT_CATALOG = [ + { + key: HOME_SLOT_KEYS.slider, + label: "Homepage slider", + kind: "list" as const, + pageKey: "home", + aspectRatio: "16:9", + itemCount: null, + recommendedWidth: 1538, + }, + { + key: HOME_SLOT_KEYS.besideSlider, + label: "Banners beside slider", + kind: "list" as const, + pageKey: "home", + aspectRatio: "74:41", + itemCount: 2, + recommendedWidth: 370, + }, + { + key: HOME_SLOT_KEYS.twoBannerRow, + label: "Two banner row", + kind: "list" as const, + pageKey: "home", + aspectRatio: "569:264", + itemCount: 2, + recommendedWidth: 569, + }, + { + key: HOME_SLOT_KEYS.oneBannerRow, + label: "Discount banner", + kind: "single" as const, + pageKey: "home", + aspectRatio: "146:33", + itemCount: 1, + recommendedWidth: 1168, + }, +]; + export type StaticImage = { id: string; url: string;