6 Commits

Author SHA1 Message Date
0e6bf40ef3 Update src/app/page.tsx 2026-03-12 06:08:25 +00:00
f05eb11508 Update src/components/shared/SvgTextLogo/SvgTextLogo.tsx 2026-03-12 06:06:39 +00:00
12405eb6be Merge version_2 into main
Merge version_2 into main
2026-03-12 06:04:19 +00:00
ad101d039d Merge version_1 into main
Merge version_1 into main
2026-03-12 06:04:05 +00:00
89c32f3b4a Update src/components/shared/SvgTextLogo/SvgTextLogo.tsx 2026-03-12 06:04:01 +00:00
b1d145fe0b Update src/app/page.tsx 2026-03-12 06:04:00 +00:00
2 changed files with 36 additions and 41 deletions

View File

@@ -20,7 +20,7 @@ export default function LandingPage() {
borderRadius="rounded" borderRadius="rounded"
contentWidth="small" contentWidth="small"
sizing="largeSmallSizeLargeTitles" sizing="largeSmallSizeLargeTitles"
background="aurora" background="circleGradient"
cardStyle="gradient-bordered" cardStyle="gradient-bordered"
primaryButtonStyle="double-inset" primaryButtonStyle="double-inset"
secondaryButtonStyle="solid" secondaryButtonStyle="solid"
@@ -48,7 +48,7 @@ export default function LandingPage() {
{ text: "Explore Collection", href: "product" }, { text: "Explore Collection", href: "product" },
{ text: "Learn Our Story", href: "about" } { text: "Learn Our Story", href: "about" }
]} ]}
background={{ variant: "aurora" }} background={{ variant: "sparkles-gradient" }}
imageSrc="http://img.b2bpic.net/free-photo/top-view-gua-sha-face-products_23-2149401501.jpg" imageSrc="http://img.b2bpic.net/free-photo/top-view-gua-sha-face-products_23-2149401501.jpg"
imageAlt="Pure Glow luxury skincare products" imageAlt="Pure Glow luxury skincare products"
frameStyle="card" frameStyle="card"
@@ -77,13 +77,13 @@ export default function LandingPage() {
tag="Best Sellers" tag="Best Sellers"
products={[ products={[
{ {
id: "1", name: "Radiant Hydration Moisturizer", price: "$58", imageSrc: "http://img.b2bpic.net/free-vector/cosmetics-products-realistic-composition-poster_1284-18210.jpg", imageAlt: "Radiant Hydration Moisturizer" id: "1", name: "Radiant Hydration Moisturizer — Hydrates for 24 hours", price: "$58 • Dermatologist-tested", imageSrc: "http://img.b2bpic.net/free-vector/cosmetics-products-realistic-composition-poster_1284-18210.jpg", imageAlt: "Radiant Hydration Moisturizer"
}, },
{ {
id: "2", name: "Luminous Glow Serum", price: "$72", imageSrc: "http://img.b2bpic.net/free-photo/front-view-argan-product-composition_23-2148955787.jpg", imageAlt: "Luminous Glow Serum" id: "2", name: "Luminous Glow Serum — Clinically proven brightening", price: "$72 • Advanced anti-aging formula", imageSrc: "http://img.b2bpic.net/free-photo/front-view-argan-product-composition_23-2148955787.jpg", imageAlt: "Luminous Glow Serum"
}, },
{ {
id: "3", name: "Purifying Wellness Mask", price: "$48", imageSrc: "http://img.b2bpic.net/free-photo/flat-lay-body-butter-pink-cloth_23-2148305543.jpg", imageAlt: "Purifying Wellness Mask" id: "3", name: "Purifying Wellness Mask — Deep cleansing detox", price: "$48 • 100% natural ingredients", imageSrc: "http://img.b2bpic.net/free-photo/flat-lay-body-butter-pink-cloth_23-2148305543.jpg", imageAlt: "Purifying Wellness Mask"
} }
]} ]}
gridVariant="three-columns-all-equal-width" gridVariant="three-columns-all-equal-width"

View File

@@ -1,51 +1,46 @@
"use client"; import React from 'react';
import { memo } from "react";
import useSvgTextLogo from "./useSvgTextLogo";
import { cls } from "@/lib/utils";
interface SvgTextLogoProps { interface SvgTextLogoProps {
logoText: string; text: string;
adjustHeightFactor?: number;
verticalAlign?: "top" | "center";
className?: string; className?: string;
} }
const SvgTextLogo = memo<SvgTextLogoProps>(function SvgTextLogo({ const SvgTextLogo: React.FC<SvgTextLogoProps> = ({ text, className = '' }) => {
logoText, const textLength = text.length;
adjustHeightFactor, const charWidth = 60;
verticalAlign = "top", const width = textLength * charWidth + 40;
className = "", const height = 120;
}) {
const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor);
return ( return (
<svg <svg
ref={svgRef} width={width}
viewBox={viewBox} height={height}
className={cls("w-full", className)} viewBox={`0 0 ${width} ${height}`}
style={{ aspectRatio: aspectRatio }} xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="none" className={className}
role="img"
aria-label={`${logoText} logo`}
> >
<defs>
<linearGradient id="textGradient" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stopColor="#ff6b6b" />
<stop offset="50%" stopColor="#4ecdc4" />
<stop offset="100%" stopColor="#45b7d1" />
</linearGradient>
</defs>
<text <text
ref={textRef} x={width / 2}
x="0" y={height / 2}
y={verticalAlign === "center" ? "50%" : "0"} textAnchor="middle"
className="font-bold fill-current" dominantBaseline="middle"
style={{ fontSize="48"
fontSize: "20px", fontWeight="bold"
letterSpacing: "-0.02em", fill="url(#textGradient)"
dominantBaseline: verticalAlign === "center" ? "middle" : "text-before-edge" fontFamily="Arial, sans-serif"
}}
> >
{logoText} {text}
</text> </text>
</svg> </svg>
); );
}); };
SvgTextLogo.displayName = "SvgTextLogo";
export default SvgTextLogo; export default SvgTextLogo;