Merge version_1 into main #1

Merged
bender merged 2 commits from version_1 into main 2026-03-11 04:07:44 +00:00
2 changed files with 27 additions and 36 deletions

View File

@@ -104,6 +104,9 @@ export default function LandingPage() {
tag="Partners"
textboxLayout="default"
useInvertedBackground={true}
names={[
"Apple", "Google", "Microsoft", "Figma", "Stripe", "Notion", "Vercel"
]}
logos={[
"http://img.b2bpic.net/free-photo/notepad-with-fruit-black-desk_23-2148193381.jpg", "http://img.b2bpic.net/free-photo/multi-colored-spheres-bright-celebration-backdrop-generated-by-ai_188544-11875.jpg", "http://img.b2bpic.net/free-vector/web-development-concept-set_1284-6769.jpg", "http://img.b2bpic.net/free-vector/design-process-concept-landing-page_23-2148314296.jpg", "http://img.b2bpic.net/free-vector/green-circuit-background_23-2147610540.jpg", "http://img.b2bpic.net/free-vector/flat-business-banners-soft-tones_23-2147552344.jpg", "http://img.b2bpic.net/free-vector/hand-drawn-nerd-logo-template_23-2149208857.jpg"
]}

View File

@@ -1,51 +1,39 @@
"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?: string;
letterSpacing?: number;
}
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 = 'bold',
letterSpacing = 0,
}) => {
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 * fontSize * 0.6} ${fontSize * 1.2}`}
className={className}
xmlns="http://www.w3.org/2000/svg"
>
<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"
}}
y={fontSize}
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
fill="currentColor"
dominantBaseline="auto"
>
{logoText}
{text}
</text>
</svg>
);
});
};
SvgTextLogo.displayName = "SvgTextLogo";
export default SvgTextLogo;
export default SvgTextLogo;