feat(themes): add Swiss Brutalist restaurant design system with chapter numbers and high-contrast grid
This commit is contained in:
@@ -155,14 +155,24 @@ export const restaurantsRoutes: FastifyPluginAsync = async (app) => {
|
||||
return reply.code(400).send({ message: "themeKey is required" });
|
||||
}
|
||||
|
||||
const THEME_NAMES: Record<string, string> = {
|
||||
swiss: "Swiss Brutalist",
|
||||
artisan: "Amber Artisan",
|
||||
elegant: "Elegant Gold",
|
||||
modern: "Modern Sapphire",
|
||||
dark: "Luxury Dark",
|
||||
minimal: "Nordic Minimal",
|
||||
classic: "Classic Bistro",
|
||||
};
|
||||
|
||||
let themeId = themeData?.id;
|
||||
if (!themeId) {
|
||||
const { data: newTheme } = await supabase
|
||||
.from("themes")
|
||||
.insert({
|
||||
key: themeKey,
|
||||
name: themeKey === "artisan" ? "Amber Artisan" : themeKey,
|
||||
config: { primaryColor: "#E5A855", background: "#121316", productLayout: "card", categoryLayout: "tabs" },
|
||||
name: THEME_NAMES[themeKey] || themeKey,
|
||||
config: { primaryColor: themeKey === "swiss" ? "#000000" : "#E5A855", background: themeKey === "swiss" ? "#FFFFFF" : "#121316", productLayout: "card", categoryLayout: "tabs" },
|
||||
})
|
||||
.select("id")
|
||||
.maybeSingle();
|
||||
|
||||
Reference in New Issue
Block a user