Merge version_1 into main #2
@@ -112,10 +112,10 @@ export default function LandingPage() {
|
||||
tagIcon={ShoppingBag}
|
||||
products={[
|
||||
{
|
||||
id: "1", name: "Palette Ombres Prestige 12 Couleurs", price: "2,950 DA", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=rr48x9&_wi=1", imageAlt: "Palette de maquillage professionnelle", initialQuantity: 1
|
||||
id: "1", name: "Palette Ombres Prestige 12 Couleurs", price: "2,950 DA", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=rr48x9", imageAlt: "Palette de maquillage professionnelle", initialQuantity: 1
|
||||
},
|
||||
{
|
||||
id: "2", name: "Sérum Régénérant Intensif 30ml", price: "3,500 DA", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=0uxyxl&_wi=1", imageAlt: "Sérum soin du visage premium", initialQuantity: 1
|
||||
id: "2", name: "Sérum Régénérant Intensif 30ml", price: "3,500 DA", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=0uxyxl", imageAlt: "Sérum soin du visage premium", initialQuantity: 1
|
||||
},
|
||||
{
|
||||
id: "3", name: "Traitement Capillaire Réparation 200ml", price: "2,200 DA", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=8b748r", imageAlt: "Traitement pour cheveux de luxe", initialQuantity: 1
|
||||
@@ -124,10 +124,10 @@ export default function LandingPage() {
|
||||
id: "4", name: "Parfum Eau de Toilette 100ml", price: "4,800 DA", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=qwmhgb", imageAlt: "Flacon de parfum élégant", initialQuantity: 1
|
||||
},
|
||||
{
|
||||
id: "5", name: "Fond de Teint Fluide Longue Tenue", price: "2,650 DA", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=rr48x9&_wi=2", imageAlt: "Fond de teint professionnel", initialQuantity: 1
|
||||
id: "5", name: "Fond de Teint Fluide Longue Tenue", price: "2,650 DA", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=rr48x9", imageAlt: "Fond de teint professionnel", initialQuantity: 1
|
||||
},
|
||||
{
|
||||
id: "6", name: "Crème Hydratante Intense 50ml", price: "3,200 DA", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=0uxyxl&_wi=2", imageAlt: "Crème soin visage haut de gamme", initialQuantity: 1
|
||||
id: "6", name: "Crème Hydratante Intense 50ml", price: "3,200 DA", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=0uxyxl", imageAlt: "Crème soin visage haut de gamme", initialQuantity: 1
|
||||
}
|
||||
]}
|
||||
gridVariant="three-columns-all-equal-width"
|
||||
@@ -188,7 +188,6 @@ export default function LandingPage() {
|
||||
]}
|
||||
speed={40}
|
||||
showCard={true}
|
||||
animationType="slide-up"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,51 +1,44 @@
|
||||
"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;
|
||||
fontSize?: number;
|
||||
fontFamily?: string;
|
||||
fill?: string;
|
||||
textAnchor?: 'start' | 'middle' | 'end';
|
||||
dominantBaseline?: 'auto' | 'text-top' | 'hanging' | 'mathematical' | 'central' | 'middle' | 'text-bottom' | 'alphabetic' | 'ideographic';
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const SvgTextLogo = memo<SvgTextLogoProps>(function SvgTextLogo({
|
||||
logoText,
|
||||
adjustHeightFactor,
|
||||
verticalAlign = "top",
|
||||
className = "",
|
||||
}) {
|
||||
const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor);
|
||||
|
||||
export const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
|
||||
text,
|
||||
fontSize = 48,
|
||||
fontFamily = 'Arial, sans-serif',
|
||||
fill = '#000000',
|
||||
textAnchor = 'start',
|
||||
dominantBaseline = 'middle',
|
||||
className = '',
|
||||
}) => {
|
||||
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 1000 1000"
|
||||
width="100%"
|
||||
height="auto"
|
||||
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="50%"
|
||||
y="50%"
|
||||
fontSize={fontSize}
|
||||
fontFamily={fontFamily}
|
||||
fill={fill}
|
||||
textAnchor={textAnchor}
|
||||
dominantBaseline={dominantBaseline}
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
|
||||
export default SvgTextLogo;
|
||||
export default SvgTextLogo;
|
||||
Reference in New Issue
Block a user