Merge version_1 into main #2
@@ -106,10 +106,10 @@ export default function LandingPage() {
|
||||
useInvertedBackground={false}
|
||||
products={[
|
||||
{
|
||||
id: "1", name: "Attivazione SPID", price: "Prenota", imageSrc: "http://img.b2bpic.net/free-photo/sales-contract-forms-documents-legal-concept_53876-134015.jpg?_wi=1", imageAlt: "Servizio SPID"
|
||||
id: "1", name: "Attivazione SPID", price: "Prenota", imageSrc: "http://img.b2bpic.net/free-photo/sales-contract-forms-documents-legal-concept_53876-134015.jpg", imageAlt: "Servizio SPID"
|
||||
},
|
||||
{
|
||||
id: "2", name: "Firma Digitale", price: "Scopri", imageSrc: "http://img.b2bpic.net/free-photo/sales-contract-forms-documents-legal-concept_53876-134015.jpg?_wi=2", imageAlt: "Firma digitale"
|
||||
id: "2", name: "Firma Digitale", price: "Scopri", imageSrc: "http://img.b2bpic.net/free-photo/sales-contract-forms-documents-legal-concept_53876-134015.jpg", imageAlt: "Firma digitale"
|
||||
},
|
||||
{
|
||||
id: "3", name: "Ricarica Telefonica", price: "Ricarica", imageSrc: "http://img.b2bpic.net/free-vector/landing-page-with-phone-business-template_23-2148335284.jpg", imageAlt: "Ricariche telefoniche"
|
||||
@@ -124,7 +124,7 @@ export default function LandingPage() {
|
||||
id: "6", name: "Spedizioni", price: "Spedisci", imageSrc: "http://img.b2bpic.net/free-photo/positive-casually-dressed-woman-holding-new-letter-from-postal-delivery-getting-her-post-out-her-letterbox_657921-1045.jpg", imageAlt: "Spedizioni pacchi"
|
||||
}
|
||||
]}
|
||||
gridVariant="three-columns-all-equal-width"
|
||||
gridVariant="uniform-all-items-equal"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -142,6 +142,7 @@ export default function LandingPage() {
|
||||
imageSrc="http://img.b2bpic.net/free-photo/thoughtful-people-doing-paperwork_23-2147669290.jpg"
|
||||
imageAlt="Centro servizi Edicola Brigante"
|
||||
mediaAnimation="blur-reveal"
|
||||
metricsAnimation="slide-up"
|
||||
useInvertedBackground={false}
|
||||
/>
|
||||
</div>
|
||||
@@ -161,7 +162,7 @@ export default function LandingPage() {
|
||||
{ id: "2", value: "2", description: "Visita il negozio o contattaci" },
|
||||
{ id: "3", value: "3", description: "Ricevi il servizio istantaneamente" }
|
||||
]}
|
||||
gridVariant="three-columns-all-equal-width"
|
||||
gridVariant="uniform-all-items-equal"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,51 +1,34 @@
|
||||
"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;
|
||||
textClassName?: 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,
|
||||
textClassName,
|
||||
}) => {
|
||||
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 400 100"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className={className}
|
||||
aria-label={text}
|
||||
>
|
||||
<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%"
|
||||
dominantBaseline="middle"
|
||||
textAnchor="middle"
|
||||
className={textClassName}
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
};
|
||||
|
||||
export default SvgTextLogo;
|
||||
|
||||
Reference in New Issue
Block a user