Merge version_1 into main #2
@@ -55,14 +55,15 @@ export default function LandingPage() {
|
||||
imageAlt="Delicious Chinese takeaway dish"
|
||||
mediaAnimation="blur-reveal"
|
||||
imagePosition="right"
|
||||
background={{ variant: "glowing-orb" }}
|
||||
testimonials={[
|
||||
{
|
||||
name: "Sarah Chen", handle: "Regular Customer", testimonial: "Best Chinese takeaway in town! Always fresh and delicious.", rating: 5,
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/happy-young-pretty-caucasian-girl-smiling-camera-isolated-crimson-background_141793-32121.jpg?_wi=1"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/happy-young-pretty-caucasian-girl-smiling-camera-isolated-crimson-background_141793-32121.jpg"
|
||||
},
|
||||
{
|
||||
name: "Michael Zhang", handle: "Food Enthusiast", testimonial: "Authentic flavors that remind me of home. Highly recommended!", rating: 5,
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/young-smiling-blonde-russian-girl-puts-hands-chest-looking-side-isolated-orange-background-with-copy-space_141793-65450.jpg?_wi=1"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/young-smiling-blonde-russian-girl-puts-hands-chest-looking-side-isolated-orange-background-with-copy-space_141793-65450.jpg"
|
||||
}
|
||||
]}
|
||||
testimonialRotationInterval={5000}
|
||||
@@ -144,11 +145,11 @@ export default function LandingPage() {
|
||||
testimonials={[
|
||||
{
|
||||
id: "1", name: "Jennifer Liu", handle: "Regular Customer", testimonial: "Absolutely love the quality and taste. It's like dining at an authentic Chinese restaurant from the comfort of home!", rating: 5,
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/happy-young-pretty-caucasian-girl-smiling-camera-isolated-crimson-background_141793-32121.jpg?_wi=2"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/happy-young-pretty-caucasian-girl-smiling-camera-isolated-crimson-background_141793-32121.jpg"
|
||||
},
|
||||
{
|
||||
id: "2", name: "David Wong", handle: "Food Critic", testimonial: "Outstanding flavors and generous portions. The best Chinese takeaway I've ever ordered from.", rating: 5,
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/young-smiling-blonde-russian-girl-puts-hands-chest-looking-side-isolated-orange-background-with-copy-space_141793-65450.jpg?_wi=2"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/young-smiling-blonde-russian-girl-puts-hands-chest-looking-side-isolated-orange-background-with-copy-space_141793-65450.jpg"
|
||||
},
|
||||
{
|
||||
id: "3", name: "Emily Rodriguez", handle: "Busy Professional", testimonial: "Fast delivery, hot food, and consistently delicious. This is my go-to place for weeknight dinners.", rating: 5,
|
||||
|
||||
@@ -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);
|
||||
|
||||
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
|
||||
text,
|
||||
className = '',
|
||||
textClassName = '',
|
||||
}) => {
|
||||
return (
|
||||
<svg
|
||||
ref={svgRef}
|
||||
viewBox={viewBox}
|
||||
className={cls("w-full", className)}
|
||||
style={{ aspectRatio: aspectRatio }}
|
||||
preserveAspectRatio="none"
|
||||
role="img"
|
||||
aria-label={`${logoText} logo`}
|
||||
viewBox={`0 0 ${text.length * 60} 100`}
|
||||
className={`${className}`}
|
||||
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%"
|
||||
textAnchor="middle"
|
||||
dominantBaseline="central"
|
||||
className={`text-4xl font-bold ${textClassName}`}
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
|
||||
export default SvgTextLogo;
|
||||
export default SvgTextLogo;
|
||||
Reference in New Issue
Block a user