Merge version_1 into main #2
@@ -51,6 +51,7 @@ export default function LandingPage() {
|
||||
imageAlt="Собака после профессионального груминга"
|
||||
mediaAnimation="slide-up"
|
||||
useInvertedBackground={false}
|
||||
background={{ variant: "plain" }}
|
||||
buttons={[
|
||||
{ text: "Позвонить", href: "tel:+79023133581" },
|
||||
{ text: "Написать в WhatsApp", href: "https://wa.me/79023133581" }
|
||||
@@ -113,7 +114,7 @@ export default function LandingPage() {
|
||||
{ id: "1", name: "Чистка параанальных желез", price: "300 ₽", imageSrc: "http://img.b2bpic.net/free-photo/close-up-veterinarian-taking-care-pet_23-2149143869.jpg", imageAlt: "Чистка параанальных желез" },
|
||||
{ id: "2", name: "Стрижка когтей", price: "200 ₽", imageSrc: "http://img.b2bpic.net/free-photo/front-view-owner-clipping-dog-s-nails_23-2150264999.jpg", imageAlt: "Стрижка когтей" },
|
||||
{ id: "3", name: "Стрижка мелких пород (Йорк, Мальтез, Чихуахуа)", price: "1 500 ₽", imageSrc: "http://img.b2bpic.net/free-photo/cute-chihuahua-dog-home_23-2150264998.jpg", imageAlt: "Стрижка мелких пород" },
|
||||
{ id: "4", name: "Груминг шпица", price: "1 500 ₽", imageSrc: "http://img.b2bpic.net/free-photo/close-up-adorable-cocker-spaniel_23-2148351182.jpg?_wi=1", imageAlt: "Груминг шпица" },
|
||||
{ id: "4", name: "Груминг шпица", price: "1 500 ₽", imageSrc: "http://img.b2bpic.net/free-photo/close-up-adorable-cocker-spaniel_23-2148351182.jpg", imageAlt: "Груминг шпица" },
|
||||
{ id: "5", name: "Стрижка собак средних пород", price: "1 800 ₽", imageSrc: "http://img.b2bpic.net/free-photo/adorable-dog-shelter-outside-waiting-be-adopted_23-2148682976.jpg", imageAlt: "Стрижка средних пород" },
|
||||
{ id: "6", name: "Груминг крупных пород (Лайка, Самоед, Хаски, Овчарка)", price: "4 000 ₽", imageSrc: "http://img.b2bpic.net/free-photo/medium-shot-woman-with-pet-carrier_23-2150238721.jpg", imageAlt: "Груминг крупных пород" },
|
||||
{ id: "7", name: "Стрижка кошек", price: "1 300 ₽", imageSrc: "http://img.b2bpic.net/free-photo/close-up-woman-holding-sleepy-cat_23-2149078338.jpg", imageAlt: "Стрижка кошек" },
|
||||
@@ -178,7 +179,7 @@ export default function LandingPage() {
|
||||
id: "1", category: "Йорк", title: "Стрижка йорка До/После", excerpt: "Профессиональная стрижка йорка с красивым оформлением морды и ушей", imageSrc: "http://img.b2bpic.net/free-photo/close-up-owner-holding-dog-with-bow_23-2148949390.jpg", imageAlt: "Стрижка йорка", authorName: "Стильный Барбоскин", authorAvatar: "http://img.b2bpic.net/free-psd/adopt-friend-banner_23-2148581657.jpg", date: "Недавно"
|
||||
},
|
||||
{
|
||||
id: "2", category: "Шпиц", title: "Груминг шпица До/После", excerpt: "Комплексный груминг померанского шпица с тщательной обработкой шерсти", imageSrc: "http://img.b2bpic.net/free-photo/close-up-adorable-cocker-spaniel_23-2148351182.jpg?_wi=2", imageAlt: "Груминг шпица", authorName: "Стильный Барбоскин", authorAvatar: "http://img.b2bpic.net/free-psd/adopt-friend-banner_23-2148581657.jpg", date: "Недавно"
|
||||
id: "2", category: "Шпиц", title: "Груминг шпица До/После", excerpt: "Комплексный груминг померанского шпица с тщательной обработкой шерсти", imageSrc: "http://img.b2bpic.net/free-photo/close-up-adorable-cocker-spaniel_23-2148351182.jpg", imageAlt: "Груминг шпица", authorName: "Стильный Барбоскин", authorAvatar: "http://img.b2bpic.net/free-psd/adopt-friend-banner_23-2148581657.jpg", date: "Недавно"
|
||||
},
|
||||
{
|
||||
id: "3", category: "Кошка", title: "Стрижка кошки До/После", excerpt: "Безопасная стрижка кошки без наркоза - животное спокойно и безопасно", imageSrc: "http://img.b2bpic.net/free-photo/close-up-man-holding-rabbit_23-2148949372.jpg", imageAlt: "Стрижка кошки", authorName: "Стильный Барбоскин", authorAvatar: "http://img.b2bpic.net/free-psd/adopt-friend-banner_23-2148581657.jpg", date: "Недавно"
|
||||
|
||||
@@ -1,51 +1,48 @@
|
||||
"use client";
|
||||
import React, { SVGProps } from 'react';
|
||||
|
||||
import { memo } from "react";
|
||||
import useSvgTextLogo from "./useSvgTextLogo";
|
||||
import { cls } from "@/lib/utils";
|
||||
|
||||
interface SvgTextLogoProps {
|
||||
logoText: string;
|
||||
adjustHeightFactor?: number;
|
||||
verticalAlign?: "top" | "center";
|
||||
className?: string;
|
||||
interface SvgTextLogoProps extends SVGProps<SVGSVGElement> {
|
||||
text?: string;
|
||||
fontSize?: number;
|
||||
fontWeight?: number | string;
|
||||
fill?: string;
|
||||
dominantBaseline?: 'auto' | 'text-bottom' | 'alphabetic' | 'ideographic' | 'middle' | 'central' | 'mathematical' | 'hanging';
|
||||
}
|
||||
|
||||
const SvgTextLogo = memo<SvgTextLogoProps>(function SvgTextLogo({
|
||||
logoText,
|
||||
adjustHeightFactor,
|
||||
verticalAlign = "top",
|
||||
className = "",
|
||||
}) {
|
||||
const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor);
|
||||
|
||||
return (
|
||||
<svg
|
||||
ref={svgRef}
|
||||
viewBox={viewBox}
|
||||
className={cls("w-full", className)}
|
||||
style={{ aspectRatio: aspectRatio }}
|
||||
preserveAspectRatio="none"
|
||||
role="img"
|
||||
aria-label={`${logoText} logo`}
|
||||
>
|
||||
<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"
|
||||
}}
|
||||
const SvgTextLogo = React.forwardRef<SVGSVGElement, SvgTextLogoProps>(
|
||||
(
|
||||
{
|
||||
text = 'Logo',
|
||||
fontSize = 24,
|
||||
fontWeight = 700,
|
||||
fill = '#000000',
|
||||
dominantBaseline = 'middle',
|
||||
...props
|
||||
},
|
||||
ref
|
||||
) => {
|
||||
return (
|
||||
<svg
|
||||
ref={ref}
|
||||
viewBox="0 0 200 100"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
{...props}
|
||||
>
|
||||
{logoText}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
<text
|
||||
x="50%"
|
||||
y="50%"
|
||||
textAnchor="middle"
|
||||
dominantBaseline={dominantBaseline}
|
||||
fontSize={fontSize}
|
||||
fontWeight={fontWeight}
|
||||
fill={fill}
|
||||
>
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
SvgTextLogo.displayName = 'SvgTextLogo';
|
||||
|
||||
export default SvgTextLogo;
|
||||
export default SvgTextLogo;
|
||||
Reference in New Issue
Block a user