Merge version_1 into main #2
@@ -92,7 +92,7 @@ export default function LandingPage() {
|
||||
description="Experience the power of AI-driven compatibility matching"
|
||||
subdescription="Trusted by thousands of couples"
|
||||
icon={Sparkles}
|
||||
imageSrc="http://img.b2bpic.net/free-photo/romantic-couple-spending-time-seashore_74855-23375.jpg?_wi=1"
|
||||
imageSrc="http://img.b2bpic.net/free-photo/romantic-couple-spending-time-seashore_74855-23375.jpg"
|
||||
imageAlt="Happy couple"
|
||||
useInvertedBackground={true}
|
||||
mediaAnimation="slide-up"
|
||||
@@ -107,7 +107,7 @@ export default function LandingPage() {
|
||||
testimonials={[
|
||||
{
|
||||
id: "1", name: "Sarah Johnson", role: "Marketing Manager", company: "Matched in 3 weeks", rating: 5,
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/romantic-couple-spending-time-seashore_74855-23375.jpg?_wi=2", imageAlt: "Sarah Johnson"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/romantic-couple-spending-time-seashore_74855-23375.jpg", imageAlt: "Sarah Johnson"
|
||||
},
|
||||
{
|
||||
id: "2", name: "Michael Chen", role: "Software Engineer", company: "Found his soulmate", rating: 5,
|
||||
|
||||
@@ -1,51 +1,49 @@
|
||||
"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;
|
||||
fontSize?: number;
|
||||
fontWeight?: number | string;
|
||||
letterSpacing?: number;
|
||||
fill?: 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 = '',
|
||||
fontSize = 48,
|
||||
fontWeight = 700,
|
||||
letterSpacing = 0,
|
||||
fill = 'currentColor',
|
||||
}) => {
|
||||
// Calculate approximate width for viewBox
|
||||
const charWidth = fontSize * 0.6;
|
||||
const totalWidth = text.length * charWidth + letterSpacing * (text.length - 1);
|
||||
const padding = fontSize * 0.2;
|
||||
const viewBoxWidth = totalWidth + padding * 2;
|
||||
const viewBoxHeight = fontSize * 1.4;
|
||||
|
||||
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 ${viewBoxWidth} ${viewBoxHeight}`}
|
||||
className={className}
|
||||
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={padding}
|
||||
y={fontSize * 0.85}
|
||||
fontSize={fontSize}
|
||||
fontWeight={fontWeight}
|
||||
letterSpacing={letterSpacing}
|
||||
fill={fill}
|
||||
dominantBaseline="middle"
|
||||
textAnchor="start"
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
};
|
||||
|
||||
export default SvgTextLogo;
|
||||
|
||||
Reference in New Issue
Block a user