Merge version_1 into main #1

Merged
bender merged 2 commits from version_1 into main 2026-03-11 13:56:50 +00:00
2 changed files with 33 additions and 38 deletions

View File

@@ -140,6 +140,7 @@ export default function LandingPage() {
{ icon: Truck, label: "Delivery", value: "30 Mins" },
{ icon: Calendar, label: "Reservations", value: "Premium" }
]}
metricsAnimation="slide-up"
useInvertedBackground={false}
/>
</div>
@@ -163,8 +164,8 @@ export default function LandingPage() {
src: "http://img.b2bpic.net/free-photo/close-up-portrait-attractive-male-model-color-flash-light_158595-5107.jpg", alt: "Guest four"
}
]}
ratingAnimation="entrance-slide"
avatarsAnimation="entrance-slide"
ratingAnimation="slide-up"
avatarsAnimation="slide-up"
useInvertedBackground={true}
/>
</div>

View File

@@ -1,51 +1,45 @@
"use client";
import React from 'react';
import { memo } from "react";
import useSvgTextLogo from "./useSvgTextLogo";
import { cls } from "@/lib/utils";
interface SvgTextLogoProps {
logoText: string;
adjustHeightFactor?: number;
verticalAlign?: "top" | "center";
export interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
letterSpacing?: number;
}
const SvgTextLogo = memo<SvgTextLogoProps>(function SvgTextLogo({
logoText,
adjustHeightFactor,
verticalAlign = "top",
className = "",
}) {
const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor);
const SvgTextLogo = ({
text,
className = '',
fontSize = 48,
letterSpacing = 2,
}: SvgTextLogoProps) => {
const textWidth = text.length * (fontSize * 0.6);
const padding = 20;
const width = textWidth + padding * 2;
const height = fontSize + padding * 2;
return (
<svg
ref={svgRef}
viewBox={viewBox}
className={cls("w-full", className)}
style={{ aspectRatio: aspectRatio }}
preserveAspectRatio="none"
width={width}
height={height}
viewBox={`0 0 ${width} ${height}`}
className={className}
role="img"
aria-label={`${logoText} logo`}
aria-label={text}
>
<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={padding}
y={padding + fontSize * 0.75}
fontSize={fontSize}
fontWeight="bold"
letterSpacing={letterSpacing}
fill="currentColor"
dominantBaseline="central"
>
{logoText}
{text}
</text>
</svg>
);
});
};
SvgTextLogo.displayName = "SvgTextLogo";
export default SvgTextLogo;
export default SvgTextLogo;