Merge version_1 into main #2
@@ -19,7 +19,7 @@ export default function LandingPage() {
|
||||
borderRadius="rounded"
|
||||
contentWidth="small"
|
||||
sizing="largeSmallSizeMediumTitles"
|
||||
background="fluid"
|
||||
background="circleGradient"
|
||||
cardStyle="layered-gradient"
|
||||
primaryButtonStyle="flat"
|
||||
secondaryButtonStyle="layered"
|
||||
@@ -46,7 +46,7 @@ export default function LandingPage() {
|
||||
tag="Limited Edition"
|
||||
tagIcon={Zap}
|
||||
tagAnimation="slide-up"
|
||||
background={{ variant: "fluid" }}
|
||||
background={{ variant: "plain" }}
|
||||
buttons={[
|
||||
{ text: "SHOP GOLF GEAR", href: "#products" },
|
||||
{ text: "SHOP BASKETBALL", href: "#products" }
|
||||
@@ -103,8 +103,8 @@ export default function LandingPage() {
|
||||
{ text: "TOGGLE CATEGORIES", href: "#" }
|
||||
]}
|
||||
buttonAnimation="slide-up"
|
||||
titleClassName="text-4xl md:text-6xl font-bold"
|
||||
descriptionClassName="text-base md:text-lg"
|
||||
textBoxTitleClassName="text-4xl md:text-6xl font-bold"
|
||||
textBoxDescriptionClassName="text-base md:text-lg"
|
||||
cardBrandClassName="text-xs font-semibold text-opacity-70"
|
||||
cardNameClassName="text-lg font-bold mt-3"
|
||||
cardPriceClassName="text-xl font-bold mt-2 text-primary-cta"
|
||||
@@ -142,8 +142,8 @@ export default function LandingPage() {
|
||||
{ text: "VIEW ALL BESTSELLERS", href: "#" }
|
||||
]}
|
||||
buttonAnimation="slide-up"
|
||||
titleClassName="text-4xl md:text-6xl font-bold"
|
||||
descriptionClassName="text-base md:text-lg"
|
||||
textBoxTitleClassName="text-4xl md:text-6xl font-bold"
|
||||
textBoxDescriptionClassName="text-base md:text-lg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -164,8 +164,8 @@ export default function LandingPage() {
|
||||
]}
|
||||
speed={50}
|
||||
showCard={true}
|
||||
titleClassName="text-4xl md:text-6xl font-bold"
|
||||
descriptionClassName="text-base md:text-lg"
|
||||
textBoxTitleClassName="text-4xl md:text-6xl font-bold"
|
||||
textBoxDescriptionClassName="text-base md:text-lg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -217,8 +217,8 @@ export default function LandingPage() {
|
||||
id: "6", title: "Trusted by the Best", quote: "In professional sports, you don't take chances with equipment. Drive & Dunk has earned the trust of top competitors across both golf and basketball.", name: "Elena Vasquez", role: "Competitive Sports Analyst", imageSrc: "http://img.b2bpic.net/free-photo/press-reporter-fallowing-leads-case_23-2149579761.jpg", imageAlt: "Elena Vasquez sports analyst"
|
||||
}
|
||||
]}
|
||||
titleClassName="text-4xl md:text-6xl font-bold"
|
||||
descriptionClassName="text-base md:text-lg"
|
||||
textBoxTitleClassName="text-4xl md:text-6xl font-bold"
|
||||
textBoxDescriptionClassName="text-base md:text-lg"
|
||||
buttonAnimation="slide-up"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -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?: 'normal' | 'bold' | 'lighter' | 'bolder' | number;
|
||||
fontFamily?: string;
|
||||
fill?: 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 = 32,
|
||||
fontWeight = 'bold',
|
||||
fontFamily = 'system-ui, -apple-system, sans-serif',
|
||||
fill = 'currentColor',
|
||||
letterSpacing = 0,
|
||||
}) => {
|
||||
const padding = 20;
|
||||
const estimatedWidth = text.length * (fontSize * 0.6) + padding * 2;
|
||||
const estimatedHeight = fontSize + padding * 2;
|
||||
|
||||
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 ${estimatedWidth} ${estimatedHeight}`}
|
||||
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={padding}
|
||||
y={fontSize + padding * 0.75}
|
||||
fontSize={fontSize}
|
||||
fontWeight={fontWeight}
|
||||
fontFamily={fontFamily}
|
||||
fill={fill}
|
||||
letterSpacing={letterSpacing}
|
||||
dominantBaseline="hanging"
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
};
|
||||
|
||||
export default SvgTextLogo;
|
||||
|
||||
Reference in New Issue
Block a user