Merge version_1 into main #3

Merged
bender merged 2 commits from version_1 into main 2026-03-12 17:43:53 +00:00
2 changed files with 29 additions and 38 deletions

View File

@@ -41,7 +41,7 @@ export default function LandingPage() {
<HeroSplitKpi
title="Buy New & Second Hand Mobiles at Best Prices"
description="Trusted mobile store in Vapi offering smartphones, accessories, repair services, and EMI options. Visit us for the latest iPhones, Android phones, and quality second-hand devices."
background={{ variant: "circleGradient" }}
background={{ variant: "glowing-orb" }}
kpis={[
{ value: "⭐ 5.0", label: "Google Rating (2 Reviews)" },
{ value: "Best Prices", label: "Guaranteed Lowest Rates" },
@@ -78,6 +78,7 @@ export default function LandingPage() {
imageSrc="http://img.b2bpic.net/free-photo/abstract-blur-shopping-mall_1203-8604.jpg"
imageAlt="F.R. Mobile Shop interior"
mediaAnimation="slide-up"
metricsAnimation="slide-up"
/>
</div>
@@ -196,6 +197,7 @@ export default function LandingPage() {
imageSrc="http://img.b2bpic.net/free-photo/abstract-blur-shopping-mall_1203-8604.jpg"
imageAlt="Store address location"
mediaAnimation="slide-up"
metricsAnimation="slide-up"
/>
</div>

View File

@@ -1,51 +1,40 @@
"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;
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);
export const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 24,
fontWeight = 'bold',
fill = 'currentColor',
dominantBaseline = 'middle',
}) => {
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 ${text.length * fontSize} ${fontSize * 1.5}`}
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={fontSize / 2}
y={fontSize / 1.2}
fontSize={fontSize}
fontWeight={fontWeight}
fill={fill}
dominantBaseline={dominantBaseline}
>
{logoText}
{text}
</text>
</svg>
);
});
};
SvgTextLogo.displayName = "SvgTextLogo";
export default SvgTextLogo;
export default SvgTextLogo;