Merge version_1 into main #2

Merged
bender merged 2 commits from version_1 into main 2026-03-11 13:32:19 +00:00
2 changed files with 36 additions and 38 deletions

View File

@@ -40,10 +40,10 @@ export default function LandingPage() {
<HeroBillboard
title="Welcome to Our Store"
description="Your local destination for quality products and exceptional customer service. Visit us today and discover what makes us special."
background={{ variant: "circleGradient" }}
background={{ variant: "plain" }}
tag="Local Business"
tagIcon={Store}
imageSrc="http://img.b2bpic.net/free-photo/full-shot-young-woman-posing-outdoors_23-2149462161.jpg?_wi=1"
imageSrc="http://img.b2bpic.net/free-photo/full-shot-young-woman-posing-outdoors_23-2149462161.jpg"
imageAlt="Modern retail store interior"
buttons={[
{ text: "Get Directions", href: "location" },
@@ -113,7 +113,7 @@ export default function LandingPage() {
description="123 Main Street"
subdescription="Your City, State 12345"
icon={Phone}
imageSrc="http://img.b2bpic.net/free-photo/full-shot-young-woman-posing-outdoors_23-2149462161.jpg?_wi=2"
imageSrc="http://img.b2bpic.net/free-photo/full-shot-young-woman-posing-outdoors_23-2149462161.jpg"
imageAlt="Store location map"
mediaAnimation="slide-up"
useInvertedBackground={false}

View File

@@ -1,51 +1,49 @@
"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;
fill?: string;
}
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,
fill = 'currentColor',
}) => {
// Calculate dimensions based on text length and font size
const charWidth = fontSize * 0.6;
const totalWidth = charWidth * text.length + letterSpacing * (text.length - 1) + 40;
const totalHeight = 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={totalWidth}
height={totalHeight}
viewBox={`0 0 ${totalWidth} ${totalHeight}`}
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={totalWidth / 2}
y={totalHeight / 2}
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
fill={fill}
textAnchor="middle"
dominantBaseline="central"
>
{logoText}
{text}
</text>
</svg>
);
});
SvgTextLogo.displayName = "SvgTextLogo";
};
export default SvgTextLogo;