Merge version_1 into main #2

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

View File

@@ -54,7 +54,7 @@ export default function LandingPage() {
background={{ variant: "radial-gradient" }}
carouselItems={[
{
id: "1", imageSrc: "http://img.b2bpic.net/free-vector/clinic-reception-realistic-modern-interior_1284-24101.jpg?_wi=1", imageAlt: "Modern dental clinic interior"
id: "1", imageSrc: "http://img.b2bpic.net/free-vector/clinic-reception-realistic-modern-interior_1284-24101.jpg", imageAlt: "Modern dental clinic interior"
},
{
id: "2", imageSrc: "http://img.b2bpic.net/free-photo/dentist-smiling-office_1328-4082.jpg", imageAlt: "Dr. Shahnawaz Ahmed"
@@ -69,7 +69,7 @@ export default function LandingPage() {
id: "5", imageSrc: "http://img.b2bpic.net/free-photo/dentist-work-young-woman-dentist-treating-kid-tooth-dentistry-concept_169016-66741.jpg", imageAlt: "Professional dental cleaning"
},
{
id: "6", imageSrc: "http://img.b2bpic.net/free-vector/clinic-reception-realistic-modern-interior_1284-24101.jpg?_wi=2", imageAlt: "Welcoming clinic entrance"
id: "6", imageSrc: "http://img.b2bpic.net/free-vector/clinic-reception-realistic-modern-interior_1284-24101.jpg", imageAlt: "Welcoming clinic entrance"
}
]}
autoPlay={true}
@@ -202,4 +202,4 @@ export default function LandingPage() {
</div>
</ThemeProvider>
);
}
}

View File

@@ -1,51 +1,52 @@
"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?: 'normal' | 'bold' | '600' | '700';
letterSpacing?: 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 = 24,
fontWeight = 'bold',
letterSpacing = 0,
}) => {
const textLength = text.length;
const charWidth = fontSize * 0.6;
const totalWidth = textLength * charWidth + (textLength - 1) * letterSpacing + 40;
const viewBoxHeight = 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 ${totalWidth} ${viewBoxHeight}`}
className={`w-full h-auto ${className}`}
preserveAspectRatio="xMidYMid meet"
xmlns="http://www.w3.org/2000/svg"
>
<defs>
<linearGradient id="textGradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" stopColor="currentColor" />
<stop offset="100%" stopColor="currentColor" stopOpacity="0.8" />
</linearGradient>
</defs>
<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="50%"
y="50%"
dominantBaseline="middle"
textAnchor="middle"
fontSize={fontSize}
fontWeight={fontWeight}
fill="url(#textGradient)"
letterSpacing={letterSpacing}
>
{logoText}
{text}
</text>
</svg>
);
});
SvgTextLogo.displayName = "SvgTextLogo";
};
export default SvgTextLogo;