fix: render true SVG template vector graphic as stand background
This commit is contained in:
@@ -205,6 +205,75 @@ export function QrStandGeneratorClient({
|
|||||||
style={{ background: activePreset.bgGradient }}
|
style={{ background: activePreset.bgGradient }}
|
||||||
>
|
>
|
||||||
{/* Tabletop Plaque Container */}
|
{/* Tabletop Plaque Container */}
|
||||||
|
{activePreset.svgTemplateUrl ? (
|
||||||
|
<div
|
||||||
|
ref={standRef}
|
||||||
|
className="w-[360px] sm:w-[380px] aspect-[672/900] rounded-[2.5rem] relative overflow-hidden shadow-[0_25px_60px_rgba(0,0,0,0.6)] border-2 border-white/10"
|
||||||
|
>
|
||||||
|
{/* SVG Template Vector Background Graphic */}
|
||||||
|
<img
|
||||||
|
src={activePreset.svgTemplateUrl}
|
||||||
|
alt={activePreset.name}
|
||||||
|
className="absolute inset-0 w-full h-full object-cover pointer-events-none"
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* Dynamic Restaurant Logo & Name Header Overlay */}
|
||||||
|
<div className="absolute top-[13%] left-0 right-0 flex flex-col items-center justify-center px-6 text-center z-10">
|
||||||
|
{logoUrl ? (
|
||||||
|
<img
|
||||||
|
src={logoUrl}
|
||||||
|
alt={restaurantName}
|
||||||
|
className="h-9 w-auto max-w-[130px] object-contain mb-1"
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
<span
|
||||||
|
className="font-black text-lg sm:text-xl tracking-wider uppercase font-['Montserrat'] leading-tight drop-shadow-md"
|
||||||
|
style={{ color: activePreset.accentText }}
|
||||||
|
>
|
||||||
|
{restaurantName}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Dynamic QR Code Canvas Overlay */}
|
||||||
|
<div className="absolute top-[37%] left-1/2 -translate-x-1/2 w-[52%] aspect-square rounded-2xl p-2.5 shadow-2xl flex items-center justify-center bg-[#f8f3eb] z-10 border border-black/10">
|
||||||
|
<QRCodeCanvas
|
||||||
|
value={targetUrl}
|
||||||
|
size={170}
|
||||||
|
bgColor={activePreset.qrBg || "#f8f3eb"}
|
||||||
|
fgColor={activePreset.qrColor || "#a64d2a"}
|
||||||
|
level="H"
|
||||||
|
style={{ width: "100%", height: "100%" }}
|
||||||
|
includeMargin={false}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Dynamic Categories Overlay */}
|
||||||
|
<div className="absolute bottom-[8%] left-0 right-0 flex flex-col items-center justify-center px-6 text-center z-10">
|
||||||
|
<p
|
||||||
|
className="text-[11px] sm:text-xs tracking-wide mb-2 font-semibold"
|
||||||
|
style={{ color: activePreset.subText }}
|
||||||
|
>
|
||||||
|
Telefonunuzun kamerasını doğrultun
|
||||||
|
</p>
|
||||||
|
<div
|
||||||
|
className="flex flex-col gap-1 max-w-[200px] w-full font-['Montserrat'] font-extrabold uppercase tracking-widest text-xs sm:text-sm"
|
||||||
|
style={{ color: activePreset.headerText }}
|
||||||
|
>
|
||||||
|
{displayCategories.map((cat, idx) => (
|
||||||
|
<div key={idx} className="w-full">
|
||||||
|
<div className="py-0.5">{cat}</div>
|
||||||
|
{idx < displayCategories.length - 1 && (
|
||||||
|
<div
|
||||||
|
className="w-full h-[1px] my-0.5"
|
||||||
|
style={{ backgroundColor: activePreset.dividerColor }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
<div
|
<div
|
||||||
ref={standRef}
|
ref={standRef}
|
||||||
className="w-[360px] sm:w-[380px] min-h-[660px] rounded-[2.5rem] p-7 flex flex-col items-center text-center relative shadow-[0_25px_60px_rgba(0,0,0,0.6)] border-2"
|
className="w-[360px] sm:w-[380px] min-h-[660px] rounded-[2.5rem] p-7 flex flex-col items-center text-center relative shadow-[0_25px_60px_rgba(0,0,0,0.6)] border-2"
|
||||||
@@ -296,6 +365,7 @@ export function QrStandGeneratorClient({
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Reference in New Issue
Block a user