Merge version_1 into main #2
@@ -21,7 +21,7 @@ export default function LandingPage() {
|
||||
borderRadius="rounded"
|
||||
contentWidth="medium"
|
||||
sizing="largeSizeMediumTitles"
|
||||
background="fluid"
|
||||
background="circleGradient"
|
||||
cardStyle="gradient-mesh"
|
||||
primaryButtonStyle="flat"
|
||||
secondaryButtonStyle="solid"
|
||||
@@ -49,7 +49,7 @@ export default function LandingPage() {
|
||||
{ text: "Visit Us Today", href: "#location" }
|
||||
]}
|
||||
buttonAnimation="slide-up"
|
||||
background={{ variant: "fluid" }}
|
||||
background={{ variant: "plain" }}
|
||||
imageSrc="http://img.b2bpic.net/free-photo/rice-noodles-red-curry-with-meatballs-with-dried-chilies-basil-cucumber-long-beans_1150-27076.jpg"
|
||||
imageAlt="DOJO Kopihouse cinematic food hero"
|
||||
mediaAnimation="opacity"
|
||||
@@ -97,7 +97,7 @@ export default function LandingPage() {
|
||||
id: "4", name: "Nasi Ayam Penyet", price: "RM14", variant: "Smashed chicken with sambal & turmeric rice", imageSrc: "http://img.b2bpic.net/free-photo/crispy-omelet-topped-with-minced-pork-mixed-vegetables-sauce_1150-27791.jpg", imageAlt: "Nasi Ayam Penyet"
|
||||
},
|
||||
{
|
||||
id: "5", name: "Claypot Noodles", price: "RM15", variant: "Sizzling hot clay pot with charred edges", imageSrc: "http://img.b2bpic.net/free-photo/noodles-bowl-with-chopsticks-garlic_23-2148382851.jpg?_wi=1", imageAlt: "Claypot Noodles"
|
||||
id: "5", name: "Claypot Noodles", price: "RM15", variant: "Sizzling hot clay pot with charred edges", imageSrc: "http://img.b2bpic.net/free-photo/noodles-bowl-with-chopsticks-garlic_23-2148382851.jpg", imageAlt: "Claypot Noodles"
|
||||
}
|
||||
]}
|
||||
carouselMode="buttons"
|
||||
@@ -203,7 +203,7 @@ export default function LandingPage() {
|
||||
id: "2", name: "Lunch", role: "Hearty Noodles & Rice", imageSrc: "http://img.b2bpic.net/free-photo/acacia-pennata-omelette-with-chili-paste_1339-4617.jpg", imageAlt: "Traditional nasi lemak lunch"
|
||||
},
|
||||
{
|
||||
id: "3", name: "Evening", role: "Claypot & Favorites", imageSrc: "http://img.b2bpic.net/free-photo/noodles-bowl-with-chopsticks-garlic_23-2148382851.jpg?_wi=2", imageAlt: "Sizzling claypot noodles"
|
||||
id: "3", name: "Evening", role: "Claypot & Favorites", imageSrc: "http://img.b2bpic.net/free-photo/noodles-bowl-with-chopsticks-garlic_23-2148382851.jpg", imageAlt: "Sizzling claypot noodles"
|
||||
},
|
||||
{
|
||||
id: "4", name: "Community", role: "Friends & Family Gather", imageSrc: "http://img.b2bpic.net/free-photo/high-angle-view-happy-friends-toasting-with-wine-while-having-dinner-together_637285-3334.jpg", imageAlt: "Family dining at DOJO"
|
||||
|
||||
@@ -1,51 +1,34 @@
|
||||
"use client";
|
||||
|
||||
import { memo } from "react";
|
||||
import useSvgTextLogo from "./useSvgTextLogo";
|
||||
import { cls } from "@/lib/utils";
|
||||
import React from 'react';
|
||||
|
||||
interface SvgTextLogoProps {
|
||||
logoText: string;
|
||||
adjustHeightFactor?: number;
|
||||
verticalAlign?: "top" | "center";
|
||||
text: string;
|
||||
className?: string;
|
||||
textClassName?: string;
|
||||
}
|
||||
|
||||
const SvgTextLogo = memo<SvgTextLogoProps>(function SvgTextLogo({
|
||||
logoText,
|
||||
adjustHeightFactor,
|
||||
verticalAlign = "top",
|
||||
className = "",
|
||||
}) {
|
||||
const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor);
|
||||
|
||||
export default function SvgTextLogo({
|
||||
text,
|
||||
className = '',
|
||||
textClassName = '',
|
||||
}: SvgTextLogoProps) {
|
||||
return (
|
||||
<svg
|
||||
ref={svgRef}
|
||||
viewBox={viewBox}
|
||||
className={cls("w-full", className)}
|
||||
style={{ aspectRatio: aspectRatio }}
|
||||
preserveAspectRatio="none"
|
||||
role="img"
|
||||
aria-label={`${logoText} logo`}
|
||||
className={className}
|
||||
viewBox="0 0 400 100"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
preserveAspectRatio="xMidYMid meet"
|
||||
>
|
||||
<text
|
||||
ref={textRef}
|
||||
x="0"
|
||||
y={verticalAlign === "center" ? "50%" : "0"}
|
||||
className="font-bold fill-current"
|
||||
style={{
|
||||
fontSize: "20px",
|
||||
letterSpacing: "-0.02em",
|
||||
dominantBaseline: verticalAlign === "center" ? "middle" : "text-before-edge"
|
||||
}}
|
||||
x="50%"
|
||||
y="50%"
|
||||
className={textClassName}
|
||||
textAnchor="middle"
|
||||
dominantBaseline="middle"
|
||||
fontSize="48"
|
||||
fontWeight="bold"
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
|
||||
export default SvgTextLogo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user