diff --git a/apps/api/src/routes/restaurants.ts b/apps/api/src/routes/restaurants.ts index 6f7dde9..b6ce2d2 100644 --- a/apps/api/src/routes/restaurants.ts +++ b/apps/api/src/routes/restaurants.ts @@ -155,14 +155,24 @@ export const restaurantsRoutes: FastifyPluginAsync = async (app) => { return reply.code(400).send({ message: "themeKey is required" }); } + const THEME_NAMES: Record = { + 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(); diff --git a/apps/mobile/build-1787183277274.ipa b/apps/mobile/build-1787184959643.ipa similarity index 69% rename from apps/mobile/build-1787183277274.ipa rename to apps/mobile/build-1787184959643.ipa index 67b3db5..6d5326e 100644 Binary files a/apps/mobile/build-1787183277274.ipa and b/apps/mobile/build-1787184959643.ipa differ diff --git a/apps/mobile/src/components/menu/ThemeSelectorSheet.tsx b/apps/mobile/src/components/menu/ThemeSelectorSheet.tsx index e4b8969..89b59f5 100644 --- a/apps/mobile/src/components/menu/ThemeSelectorSheet.tsx +++ b/apps/mobile/src/components/menu/ThemeSelectorSheet.tsx @@ -31,6 +31,18 @@ export interface ThemeOption { } export const THEME_OPTIONS: ThemeOption[] = [ + { + key: "swiss", + name: "Swiss Brutalist", + category: "Modern Sanat & Konsept", + color: "#000000", + badgeBg: "#000000", + badgeText: "#FFFFFF", + bgPreview: "#FFFFFF", + accent: "Monokrom Siyah & Kobalt Mavi", + desc: "Brutalist İsviçre tipografisi, 8px kalın siyah kenarlıklar, bölüm numaraları (Ø1, Ø2) ve monokrom ızgara.", + suitableFor: "Çağdaş restoranlar, sanat galerisi kafeleri, avangard mutfaklar, konsept bistrolar", + }, { key: "artisan", name: "Amber Artisan", diff --git a/apps/web/src/components/PublicMenuClient.tsx b/apps/web/src/components/PublicMenuClient.tsx index 5d95862..8bc55f4 100644 --- a/apps/web/src/components/PublicMenuClient.tsx +++ b/apps/web/src/components/PublicMenuClient.tsx @@ -315,7 +315,7 @@ export function PublicMenuClient({

- Canlı Tema Önizleme (6 Şablon) + Canlı Tema Önizleme (7 Şablon)

-
+
{Object.values(THEME_PRESETS).map((preset) => { const isSelected = selectedThemeKey === preset.key; return ( @@ -422,176 +422,252 @@ export function PublicMenuClient({
) : ( - filteredCategories.map((category) => ( -
- {/* Sticky Category Heading Banner */} -
-
-

- {category.name} -

- {category.description && ( -

- {category.description} -

- )} -
- - {category.menu_items.length} Ürün - -
+ filteredCategories.map((category, catIndex) => { + const chapterNum = String(catIndex + 1).padStart(2, "0"); + const isSwiss = theme.key === "swiss"; - {/* Items Container: Grid / Card / List Layout based on Theme */} - {/* Items Container: Grid / Card / List Layout based on Theme */} -
- {category.menu_items.map((item) => { - if (theme.key === "artisan") { + {/* Category Heading Banner */} + {isSwiss ? ( +
+
+ + CHAPTER {chapterNum} // SECTION + +

+ {category.name} +

+ {category.description && ( +

+ {category.description} +

+ )} +
+
+ Ø{catIndex + 1} +
+
+ ) : ( +
+
+

+ {category.name} +

+ {category.description && ( +

+ {category.description} +

+ )} +
+ + {category.menu_items.length} Ürün + +
+ )} + + {/* Items Container: Grid / Card / List Layout based on Theme */} +
+ {category.menu_items.map((item, itemIndex) => { + if (isSwiss) { + const itemCode = `${String.fromCharCode(65 + catIndex)}${String(itemIndex + 1).padStart(2, "0")}`; + return ( +
setSelectedItem(item)} + className="group bg-white hover:bg-stone-50 cursor-pointer flex flex-col sm:flex-row transition-all duration-200" + > +
+
+
+ + [{itemCode}] + +

+ {item.name} +

+
+ {item.description && ( +

+ {item.description} +

+ )} +
+ +
+ + [ORGANIC] [HOUSE-MADE] + + + ₺{item.price.toFixed(0)} + +
+
+ + {item.image_url && ( +
+ {item.name} +
+ )} +
+ ); + } + + if (theme.key === "artisan") { + return ( +
setSelectedItem(item)} + className="group relative rounded-3xl p-3.5 transition-all duration-300 cursor-pointer border flex flex-col justify-between hover:scale-[1.02] active:scale-[0.98] shadow-md" + style={{ + backgroundColor: theme.cardBg, + borderColor: theme.cardBorder, + }} + > + {/* Image Container with 3D Dish presentation */} +
+ {item.image_url ? ( + {item.name} + ) : ( +
+ )} + + ÖZEL + +
+ + {/* Info */} +
+
+

+ {item.name} +

+ {item.description ? ( +

+ {item.description} +

+ ) : null} +
+ +
+ + ₺{item.price.toFixed(0)} + + + + + +
+
+
+ ); + } + return (
setSelectedItem(item)} - className="group relative rounded-3xl p-3.5 transition-all duration-300 cursor-pointer border flex flex-col justify-between hover:scale-[1.02] active:scale-[0.98] shadow-md" + className={`group relative rounded-2xl p-4 transition-all duration-200 cursor-pointer border hover:shadow-lg active:scale-[0.99] flex gap-3.5 items-center ${ + theme.config.productLayout === "list" ? "justify-between" : "" + }`} style={{ backgroundColor: theme.cardBg, borderColor: theme.cardBorder, }} > - {/* Image Container with 3D Dish presentation */} -
- {item.image_url ? ( - {item.name} - ) : ( -
- )} - - ÖZEL - -
- - {/* Info */} -
-
-

+ {/* Item Details */} +
+
+

{item.name}

- {item.description ? ( -

- {item.description} -

- ) : null}
-
+ {item.description && ( +

+ {item.description} +

+ )} + +
₺{item.price.toFixed(0)} - - + + + + İncele →
+ + {/* Item Thumbnail Image */} + {item.image_url && ( +
+ {item.name} +
+ )}

); - } - - return ( -
setSelectedItem(item)} - className={`group relative rounded-2xl p-4 transition-all duration-200 cursor-pointer border hover:shadow-lg active:scale-[0.99] flex gap-3.5 items-center ${ - theme.config.productLayout === "list" ? "justify-between" : "" - }`} - style={{ - backgroundColor: theme.cardBg, - borderColor: theme.cardBorder, - }} - > - {/* Item Details */} -
-
-

- {item.name} -

-
- - {item.description && ( -

- {item.description} -

- )} - -
- - ₺{item.price.toFixed(0)} - - - - İncele → - -
-
- - {/* Item Thumbnail Image */} - {item.image_url && ( -
- {item.name} -
- )} -
- ); - })} -
-
- )) + })} +
+ + ); + }) )} diff --git a/apps/web/src/lib/theme.ts b/apps/web/src/lib/theme.ts index a8481cf..e8d315e 100644 --- a/apps/web/src/lib/theme.ts +++ b/apps/web/src/lib/theme.ts @@ -16,6 +16,25 @@ export interface ThemePreset { } export const THEME_PRESETS: Record = { + swiss: { + key: "swiss", + name: "Swiss Brutalist", + fontFamily: "heading", + config: { + primaryColor: "#000000", + background: "#FFFFFF", + productLayout: "card", + categoryLayout: "tabs", + }, + cardBg: "#FFFFFF", + cardBorder: "#000000", + textPrimary: "#000000", + textSecondary: "#666666", + accentBg: "#F0F0F0", + headerGradient: "linear-gradient(180deg, #000000 0%, #111111 100%)", + badgeBg: "#000000", + badgeText: "#FFFFFF", + }, artisan: { key: "artisan", name: "Amber Artisan",