Merge version_1 into main #2

Merged
bender merged 2 commits from version_1 into main 2026-03-11 14:15:02 +00:00
2 changed files with 53 additions and 39 deletions

View File

@@ -17,7 +17,7 @@ export default function LandingPage() {
return (
<ThemeProvider
defaultButtonVariant="elastic-effect"
defaultTextAnimation="reveal-blur"
defaultTextAnimation="entrance-slide"
borderRadius="rounded"
contentWidth="mediumSmall"
sizing="mediumLargeSizeLargeTitles"
@@ -63,7 +63,7 @@ export default function LandingPage() {
imageSrc: "http://img.b2bpic.net/free-photo/group-businesspeople-standing-board-meeting_23-2147857271.jpg", imageAlt: "Nowoczesny sprzęt rehabilitacyjny"
},
{
imageSrc: "http://img.b2bpic.net/free-photo/patient-doing-physiotherapy-close-up_23-2149047463.jpg?_wi=1", imageAlt: "Sesja terapii urazów"
imageSrc: "http://img.b2bpic.net/free-photo/patient-doing-physiotherapy-close-up_23-2149047463.jpg", imageAlt: "Sesja terapii urazów"
}
]}
autoplayDelay={5000}
@@ -92,7 +92,7 @@ export default function LandingPage() {
features={[
{
id: "1", title: "Rehabilitacja pourazowa", tags: ["Dorosłych", "Uzdrowienie"],
imageSrc: "http://img.b2bpic.net/free-photo/patient-doing-physiotherapy-close-up_23-2149047463.jpg?_wi=2", imageAlt: "Rehabilitacja pourazowa"
imageSrc: "http://img.b2bpic.net/free-photo/patient-doing-physiotherapy-close-up_23-2149047463.jpg", imageAlt: "Rehabilitacja pourazowa"
},
{
id: "2", title: "Leczenie bólu przewlekłego", tags: ["Długotrwałe", "Ulga"],
@@ -120,7 +120,7 @@ export default function LandingPage() {
]}
memberVariant="default"
useInvertedBackground={false}
membersAnimation="reveal-blur"
membersAnimation="slide-up"
/>
</div>

View File

@@ -1,51 +1,65 @@
"use client";
import { memo } from "react";
import useSvgTextLogo from "./useSvgTextLogo";
import { cls } from "@/lib/utils";
import React, { useState, useEffect } from 'react';
interface SvgTextLogoProps {
logoText: string;
adjustHeightFactor?: number;
verticalAlign?: "top" | "center";
text: string;
className?: string;
fontSize?: number;
fontWeight?: number | string;
fontFamily?: string;
fill?: string;
textAnchor?: 'start' | 'middle' | 'end';
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);
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 48,
fontWeight = 'bold',
fontFamily = 'system-ui, -apple-system, sans-serif',
fill = 'currentColor',
textAnchor = 'middle',
dominantBaseline = 'middle',
}) => {
const [dimensions, setDimensions] = useState({ width: 100, height: 100 });
const svgRef = React.useRef<SVGSVGElement>(null);
useEffect(() => {
if (svgRef.current) {
const textElement = svgRef.current.querySelector('text');
if (textElement) {
const bbox = (textElement as SVGTextElement).getBBox();
setDimensions({
width: Math.ceil(bbox.width) + 20,
height: Math.ceil(bbox.height) + 20,
});
}
}
}, [text, fontSize, fontWeight, fontFamily]);
return (
<svg
ref={svgRef}
viewBox={viewBox}
className={cls("w-full", className)}
style={{ aspectRatio: aspectRatio }}
preserveAspectRatio="none"
role="img"
aria-label={`${logoText} logo`}
width={dimensions.width}
height={dimensions.height}
viewBox={`0 0 ${dimensions.width} ${dimensions.height}`}
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={dimensions.width / 2}
y={dimensions.height / 2}
fontSize={fontSize}
fontWeight={fontWeight}
fontFamily={fontFamily}
fill={fill}
textAnchor={textAnchor}
dominantBaseline={dominantBaseline}
>
{logoText}
{text}
</text>
</svg>
);
});
};
SvgTextLogo.displayName = "SvgTextLogo";
export default SvgTextLogo;
export default SvgTextLogo;