Merge version_1 into main #1

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

View File

@@ -19,7 +19,7 @@ export default function LandingPage() {
borderRadius="soft"
contentWidth="mediumSmall"
sizing="large"
background="fluid"
background="circleGradient"
cardStyle="subtle-shadow"
primaryButtonStyle="primary-glow"
secondaryButtonStyle="glass"
@@ -47,7 +47,7 @@ export default function LandingPage() {
{ text: "Request Supply" }
]}
buttonAnimation="slide-up"
background={{ variant: "fluid" }}
background={{ variant: "sparkles-gradient" }}
imageSrc="http://img.b2bpic.net/free-photo/side-view-delivery-man-wearing-cap-posing-with-water-bottle_23-2148382517.jpg"
imageAlt="Water bottles and delivery service"
mediaAnimation="opacity"
@@ -144,7 +144,7 @@ export default function LandingPage() {
useInvertedBackground={false}
speed={40}
showCard={true}
tagAnimation="entrance-slide"
tagAnimation="slide-up"
/>
</div>

View File

@@ -1,51 +1,48 @@
"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;
fill?: string;
fontFamily?: string;
}
const SvgTextLogo = memo<SvgTextLogoProps>(function SvgTextLogo({
logoText,
adjustHeightFactor,
verticalAlign = "top",
className = "",
}) {
const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor);
export const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 48,
fontWeight = 700,
fill = 'currentColor',
fontFamily = 'system-ui, -apple-system, sans-serif',
}) => {
const textLength = text.length;
const charWidth = fontSize * 0.6;
const width = charWidth * textLength + 40;
const height = fontSize + 20;
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 ${width} ${height}`}
className={className}
xmlns="http://www.w3.org/2000/svg"
aria-label={text}
>
<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={width / 2}
y={height / 2}
fontSize={fontSize}
fontWeight={fontWeight}
fill={fill}
fontFamily={fontFamily}
textAnchor="middle"
dominantBaseline="central"
>
{logoText}
{text}
</text>
</svg>
);
});
SvgTextLogo.displayName = "SvgTextLogo";
};
export default SvgTextLogo;