Merge version_1 into main #2
@@ -54,11 +54,11 @@ export default function LandingPage() {
|
||||
buttonAnimation="slide-up"
|
||||
carouselItems={[
|
||||
{ id: "1", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AqOFoNHLwhf17DacD3pyzW1tzr/uploaded-1773321259355-s0pf5gwn.png", imageAlt: "Women's Summer 26 Campaign" },
|
||||
{ id: "2", imageSrc: "http://img.b2bpic.net/free-photo/dancing-blond-girl-long-red-dress-grey-background_613910-6984.jpg?_wi=1", imageAlt: "Luxury Women's Collection" },
|
||||
{ id: "3", imageSrc: "http://img.b2bpic.net/free-photo/portrait-sexy-handsome-fashion-male-model-man-dressed-elegant-suit-studio-lights-background_158538-9609.jpg?_wi=1", imageAlt: "Premium Men's Collection" },
|
||||
{ id: "4", imageSrc: "http://img.b2bpic.net/free-photo/close-up-legs-boots-stylish-woman-jacket-walking-against-wall-street_285396-8086.jpg?_wi=1", imageAlt: "Luxury Accessories" },
|
||||
{ id: "5", imageSrc: "http://img.b2bpic.net/free-photo/woman-hands-buttoning-cuff-shirt-soft-light-clothes-details_158595-7938.jpg?_wi=1", imageAlt: "Fine Craftsmanship" },
|
||||
{ id: "6", imageSrc: "http://img.b2bpic.net/free-photo/african-american-girl-sitting-rocking-chair-against-autumn-mood-decoration-fall-africa_627829-2436.jpg?_wi=1", imageAlt: "Heritage Collection" }
|
||||
{ id: "2", imageSrc: "http://img.b2bpic.net/free-photo/dancing-blond-girl-long-red-dress-grey-background_613910-6984.jpg", imageAlt: "Luxury Women's Collection" },
|
||||
{ id: "3", imageSrc: "http://img.b2bpic.net/free-photo/portrait-sexy-handsome-fashion-male-model-man-dressed-elegant-suit-studio-lights-background_158538-9609.jpg", imageAlt: "Premium Men's Collection" },
|
||||
{ id: "4", imageSrc: "http://img.b2bpic.net/free-photo/close-up-legs-boots-stylish-woman-jacket-walking-against-wall-street_285396-8086.jpg", imageAlt: "Luxury Accessories" },
|
||||
{ id: "5", imageSrc: "http://img.b2bpic.net/free-photo/woman-hands-buttoning-cuff-shirt-soft-light-clothes-details_158595-7938.jpg", imageAlt: "Fine Craftsmanship" },
|
||||
{ id: "6", imageSrc: "http://img.b2bpic.net/free-photo/african-american-girl-sitting-rocking-chair-against-autumn-mood-decoration-fall-africa_627829-2436.jpg", imageAlt: "Heritage Collection" }
|
||||
]}
|
||||
autoPlay={true}
|
||||
autoPlayInterval={4000}
|
||||
@@ -76,9 +76,9 @@ export default function LandingPage() {
|
||||
buttons={[{ text: "View All", href: "#collections" }]}
|
||||
buttonAnimation="slide-up"
|
||||
products={[
|
||||
{ id: "1", name: "Women's Summer Dress", price: "$1,240", imageSrc: "http://img.b2bpic.net/free-photo/dancing-blond-girl-long-red-dress-grey-background_613910-6984.jpg?_wi=2", imageAlt: "Elegant women's summer dress", initialQuantity: 1 },
|
||||
{ id: "2", name: "Premium Men's Suit", price: "$2,850", imageSrc: "http://img.b2bpic.net/free-photo/portrait-sexy-handsome-fashion-male-model-man-dressed-elegant-suit-studio-lights-background_158538-9609.jpg?_wi=2", imageAlt: "Tailored premium men's suit", initialQuantity: 1 },
|
||||
{ id: "3", name: "Luxury Leather Handbag", price: "$1,890", imageSrc: "http://img.b2bpic.net/free-photo/close-up-legs-boots-stylish-woman-jacket-walking-against-wall-street_285396-8086.jpg?_wi=2", imageAlt: "High-end leather handbag", initialQuantity: 1 }
|
||||
{ id: "1", name: "Women's Summer Dress", price: "$1,240", imageSrc: "http://img.b2bpic.net/free-photo/dancing-blond-girl-long-red-dress-grey-background_613910-6984.jpg", imageAlt: "Elegant women's summer dress", initialQuantity: 1 },
|
||||
{ id: "2", name: "Premium Men's Suit", price: "$2,850", imageSrc: "http://img.b2bpic.net/free-photo/portrait-sexy-handsome-fashion-male-model-man-dressed-elegant-suit-studio-lights-background_158538-9609.jpg", imageAlt: "Tailored premium men's suit", initialQuantity: 1 },
|
||||
{ id: "3", name: "Luxury Leather Handbag", price: "$1,890", imageSrc: "http://img.b2bpic.net/free-photo/close-up-legs-boots-stylish-woman-jacket-walking-against-wall-street_285396-8086.jpg", imageAlt: "High-end leather handbag", initialQuantity: 1 }
|
||||
]}
|
||||
gridVariant="three-columns-all-equal-width"
|
||||
animationType="slide-up"
|
||||
@@ -97,8 +97,8 @@ export default function LandingPage() {
|
||||
buttons={[{ text: "Learn More", href: "#about" }]}
|
||||
buttonAnimation="blur-reveal"
|
||||
features={[
|
||||
{ id: "1", title: "Exceptional Craftsmanship", tags: ["Artisan", "Heritage"], imageSrc: "http://img.b2bpic.net/free-photo/woman-hands-buttoning-cuff-shirt-soft-light-clothes-details_158595-7938.jpg?_wi=2", imageAlt: "Fine craftsmanship detail" },
|
||||
{ id: "2", title: "Rich Fashion Heritage", tags: ["Since 1961", "Legacy"], imageSrc: "http://img.b2bpic.net/free-photo/african-american-girl-sitting-rocking-chair-against-autumn-mood-decoration-fall-africa_627829-2436.jpg?_wi=2", imageAlt: "Brand heritage collection" },
|
||||
{ id: "1", title: "Exceptional Craftsmanship", tags: ["Artisan", "Heritage"], imageSrc: "http://img.b2bpic.net/free-photo/woman-hands-buttoning-cuff-shirt-soft-light-clothes-details_158595-7938.jpg", imageAlt: "Fine craftsmanship detail" },
|
||||
{ id: "2", title: "Rich Fashion Heritage", tags: ["Since 1961", "Legacy"], imageSrc: "http://img.b2bpic.net/free-photo/african-american-girl-sitting-rocking-chair-against-autumn-mood-decoration-fall-africa_627829-2436.jpg", imageAlt: "Brand heritage collection" },
|
||||
{ id: "3", title: "Innovative Design", tags: ["Cutting Edge", "Modern"], imageSrc: "http://img.b2bpic.net/free-photo/close-up-hands-holding-ribbon_23-2149247502.jpg", imageAlt: "Forward-thinking design" }
|
||||
]}
|
||||
animationType="slide-up"
|
||||
|
||||
@@ -1,51 +1,61 @@
|
||||
"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;
|
||||
fontFamily?: 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,
|
||||
fontFamily = 'system-ui, -apple-system, sans-serif',
|
||||
letterSpacing = 0,
|
||||
fill = 'currentColor',
|
||||
}) => {
|
||||
const getTextWidth = (): number => {
|
||||
const canvas = document.createElement('canvas');
|
||||
const context = canvas.getContext('2d');
|
||||
if (!context) return text.length * (fontSize as number) * 0.6;
|
||||
context.font = `${fontWeight} ${fontSize}px ${fontFamily}`;
|
||||
return context.measureText(text).width + (letterSpacing as number) * text.length;
|
||||
};
|
||||
|
||||
const textWidth = getTextWidth();
|
||||
const height = (fontSize as number) * 1.2;
|
||||
const padding = 8;
|
||||
const width = textWidth + padding * 2;
|
||||
|
||||
const yPosition = (fontSize as number) * 0.75;
|
||||
|
||||
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 ${width} ${height}`}
|
||||
width={width}
|
||||
height={height}
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className={className}
|
||||
>
|
||||
<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={yPosition}
|
||||
fontFamily={fontFamily}
|
||||
fontSize={fontSize}
|
||||
fontWeight={fontWeight}
|
||||
letterSpacing={letterSpacing}
|
||||
fill={fill}
|
||||
dominantBaseline="middle"
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
};
|
||||
|
||||
export default SvgTextLogo;
|
||||
|
||||
Reference in New Issue
Block a user