Merge version_1 into main #1

Merged
bender merged 2 commits from version_1 into main 2026-03-12 14:52:52 +00:00
2 changed files with 64 additions and 46 deletions

View File

@@ -21,7 +21,7 @@ export default function LandingPage() {
borderRadius="pill"
contentWidth="mediumLarge"
sizing="largeSmallSizeMediumTitles"
background="noise"
background="circleGradient"
cardStyle="inset"
primaryButtonStyle="primary-glow"
secondaryButtonStyle="radial-glow"
@@ -44,7 +44,7 @@ export default function LandingPage() {
<HeroBillboardRotatedCarousel
title="Ärikliendile ehitatud finantseerimislahendused"
description="Kiired otsused, paindlikud tingimused ja usaldusväärne partner teie ettevõtte kasvu toetamiseks. Rahastame asjatundlikult ja usaldusega."
background={{ variant: "noise" }}
background={{ variant: "animated-grid" }}
tag="Äriklient"
tagIcon={Sparkles}
tagAnimation="slide-up"
@@ -223,7 +223,7 @@ export default function LandingPage() {
tagIcon={Mail}
title="Kontakt ja avaldus"
description="Alustage oma rahastuse ajalugu. Täitke lihtne vorm ja meie meeskond teiega ühendust võtab."
background={{ variant: "noise" }}
background={{ variant: "animated-grid" }}
useInvertedBackground={false}
inputPlaceholder="teie@ettevõte.ee"
buttonText="Saada avaldus"

View File

@@ -1,51 +1,69 @@
"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";
interface SvgTextLogoProps extends SVGProps<SVGSVGElement> {
text: string;
fontSize?: number;
fontFamily?: string;
fontWeight?: string | number;
letterSpacing?: number;
className?: string;
}
const SvgTextLogo = memo<SvgTextLogoProps>(function SvgTextLogo({
logoText,
adjustHeightFactor,
verticalAlign = "top",
className = "",
}) {
const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor);
const SvgTextLogo = React.forwardRef<SVGSVGElement, SvgTextLogoProps>(
(
{
text,
fontSize = 32,
fontFamily = 'system-ui, -apple-system, sans-serif',
fontWeight = 'bold',
letterSpacing = 0,
className = '',
...props
},
ref
) => {
const textElement = React.useRef<SVGTextElement>(null);
const [bbox, setBbox] = React.useState({ width: 0, height: 0 });
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"
}}
React.useEffect(() => {
if (textElement.current) {
try {
const bounds = textElement.current.getBBox();
setBbox({
width: bounds.width + 20,
height: bounds.height + 20,
});
} catch (e) {
// Handle error silently
}
}
}, [text]);
return (
<svg
ref={ref}
viewBox={`0 0 ${Math.max(bbox.width, 100)} ${Math.max(bbox.height, 50)}`}
className={`inline-block ${className}`}
{...props}
>
{logoText}
</text>
</svg>
);
});
<text
ref={textElement}
x="10"
y="30"
fontSize={fontSize}
fontFamily={fontFamily}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
dominantBaseline="auto"
className="fill-current"
>
{text}
</text>
</svg>
);
}
);
SvgTextLogo.displayName = "SvgTextLogo";
SvgTextLogo.displayName = 'SvgTextLogo';
export default SvgTextLogo;
export default SvgTextLogo;