Merge version_1 into main #2
@@ -135,10 +135,10 @@ export default function LandingPage() {
|
||||
description="Confira as avaliações autênticas de clientes satisfeitos que confiam em nossa qualidade."
|
||||
testimonials={[
|
||||
{
|
||||
id: "1", name: "Jean Baldi", handle: "@jeanbaldi", testimonial: "Top, uma delicia a portuguesa moda da casa. Melhor pizza que já comi em Vila Velha!", imageSrc: "http://img.b2bpic.net/free-photo/happy-smiling-young-woman-outdoor-with-headphones_624325-2758.jpg?_wi=1", imageAlt: "Jean Baldi"
|
||||
id: "1", name: "Jean Baldi", handle: "@jeanbaldi", testimonial: "Top, uma delicia a portuguesa moda da casa. Melhor pizza que já comi em Vila Velha!", imageSrc: "http://img.b2bpic.net/free-photo/happy-smiling-young-woman-outdoor-with-headphones_624325-2758.jpg", imageAlt: "Jean Baldi"
|
||||
},
|
||||
{
|
||||
id: "2", name: "Joemisson Conceição", handle: "@joemisson", testimonial: "Bom atendimento pouca espera ambiente muito agradável variedades de pizzas. Super recomendo!", imageSrc: "http://img.b2bpic.net/free-photo/vertical-photo-beautiful-lady-sitting-restaurant-smiling-camera_114579-92383.jpg?_wi=1", imageAlt: "Joemisson Conceição"
|
||||
id: "2", name: "Joemisson Conceição", handle: "@joemisson", testimonial: "Bom atendimento pouca espera ambiente muito agradável variedades de pizzas. Super recomendo!", imageSrc: "http://img.b2bpic.net/free-photo/vertical-photo-beautiful-lady-sitting-restaurant-smiling-camera_114579-92383.jpg", imageAlt: "Joemisson Conceição"
|
||||
},
|
||||
{
|
||||
id: "3", name: "Andréia Pacheco Boldt", handle: "@andreia.boldt", testimonial: "Massa fina, porção generosa de queijo e bom recheio. Voltarei com certeza!", imageSrc: "http://img.b2bpic.net/free-photo/senior-woman-smiling-restaurant_23-2149316809.jpg", imageAlt: "Andréia Pacheco Boldt"
|
||||
@@ -147,10 +147,10 @@ export default function LandingPage() {
|
||||
id: "4", name: "Carlos Silva", handle: "@carlossilva", testimonial: "Pizzaria impecável! Atendimento atencioso e pizza saborosa. Já é meu lugar favorito.", imageSrc: "http://img.b2bpic.net/free-photo/joyful-casual-middle-aged-man-showing-empty-hands-isolated-purple-wall_141793-114471.jpg", imageAlt: "Carlos Silva"
|
||||
},
|
||||
{
|
||||
id: "5", name: "Mariana Costa", handle: "@mariana.costa", testimonial: "Fiz pedido pelo WhatsApp e chegou rápido e quentinho. Muito bom mesmo!", imageSrc: "http://img.b2bpic.net/free-photo/happy-smiling-young-woman-outdoor-with-headphones_624325-2758.jpg?_wi=2", imageAlt: "Mariana Costa"
|
||||
id: "5", name: "Mariana Costa", handle: "@mariana.costa", testimonial: "Fiz pedido pelo WhatsApp e chegou rápido e quentinho. Muito bom mesmo!", imageSrc: "http://img.b2bpic.net/free-photo/happy-smiling-young-woman-outdoor-with-headphones_624325-2758.jpg", imageAlt: "Mariana Costa"
|
||||
},
|
||||
{
|
||||
id: "6", name: "Roberto Pereira", handle: "@robepereira", testimonial: "Levei minha família e todos adoraram. Ambiente familiar e comida de qualidade!", imageSrc: "http://img.b2bpic.net/free-photo/vertical-photo-beautiful-lady-sitting-restaurant-smiling-camera_114579-92383.jpg?_wi=2", imageAlt: "Roberto Pereira"
|
||||
id: "6", name: "Roberto Pereira", handle: "@robepereira", testimonial: "Levei minha família e todos adoraram. Ambiente familiar e comida de qualidade!", imageSrc: "http://img.b2bpic.net/free-photo/vertical-photo-beautiful-lady-sitting-restaurant-smiling-camera_114579-92383.jpg", imageAlt: "Roberto Pereira"
|
||||
}
|
||||
]}
|
||||
animationType="slide-up"
|
||||
|
||||
@@ -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;
|
||||
className?: string;
|
||||
fontSize?: number;
|
||||
fontWeight?: number | 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 = 48,
|
||||
fontWeight = 700,
|
||||
letterSpacing = 0,
|
||||
}) => {
|
||||
const svgWidth = text.length * (fontSize * 0.6) + 40;
|
||||
const svgHeight = fontSize + 40;
|
||||
|
||||
return (
|
||||
<svg
|
||||
ref={svgRef}
|
||||
viewBox={viewBox}
|
||||
className={cls("w-full", className)}
|
||||
style={{ aspectRatio: aspectRatio }}
|
||||
preserveAspectRatio="none"
|
||||
role="img"
|
||||
aria-label={`${logoText} logo`}
|
||||
width={svgWidth}
|
||||
height={svgHeight}
|
||||
viewBox={`0 0 ${svgWidth} ${svgHeight}`}
|
||||
className={className}
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<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="20"
|
||||
y={fontSize + 10}
|
||||
fontSize={fontSize}
|
||||
fontWeight={fontWeight}
|
||||
letterSpacing={letterSpacing}
|
||||
fill="currentColor"
|
||||
dominantBaseline="auto"
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
};
|
||||
|
||||
export default SvgTextLogo;
|
||||
|
||||
Reference in New Issue
Block a user