Merge version_1 into main #1

Merged
bender merged 2 commits from version_1 into main 2026-03-10 23:07:08 +00:00
2 changed files with 29 additions and 38 deletions

View File

@@ -19,7 +19,7 @@ export default function LandingPage() {
borderRadius="pill"
contentWidth="mediumSmall"
sizing="mediumLarge"
background="fluid"
background="circleGradient"
cardStyle="layered-gradient"
primaryButtonStyle="gradient"
secondaryButtonStyle="solid"
@@ -44,7 +44,7 @@ export default function LandingPage() {
<HeroLogoBillboardSplit
logoText="KOBERSTEIN"
description="Ihr kompetentes Autohaus in Schorndorf. Finden Sie Ihr Traumauto in unserem großen Bestand nur 20 km vor den Toren Stuttgarts."
background={{ variant: "fluid" }}
background={{ variant: "plain" }}
buttons={[
{ text: "Fahrzeuge ansehen", href: "#products" },
{ text: "Kontakt", href: "#contact" }

View File

@@ -1,51 +1,42 @@
"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?: string | 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 = "bold"}) => {
// Approximate text width calculation
const charWidth = fontSize * 0.6;
const textWidth = text.length * charWidth;
const padding = fontSize * 0.5;
const svgWidth = textWidth + padding * 2;
const svgHeight = fontSize * 1.5;
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 ${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={svgWidth / 2}
y={svgHeight / 2}
fontSize={fontSize}
fontWeight={fontWeight}
textAnchor="middle"
dominantBaseline="central"
fill="currentColor"
>
{logoText}
{text}
</text>
</svg>
);
});
};
SvgTextLogo.displayName = "SvgTextLogo";
export default SvgTextLogo;
export default SvgTextLogo;