Merge version_1 into main #1

Merged
bender merged 2 commits from version_1 into main 2026-03-11 06:54:49 +00:00
2 changed files with 43 additions and 39 deletions

View File

@@ -75,15 +75,15 @@ export default function LandingPage() {
features={[
{
id: 1,
title: "Meridian Residence", description: "A contemporary family home that embraces clean lines and natural light. Featuring open-plan living spaces with strategic material transitions.", imageSrc: "http://img.b2bpic.net/free-photo/beautiful-contemporary-modern-design-apartment-with-natural-light-fron-bir-window-white-curtain_609648-50.jpg", imageAlt: "Meridian Residence minimalist home"
title: "Meridian Residence", description="A contemporary family home that embraces clean lines and natural light. Featuring open-plan living spaces with strategic material transitions.", imageSrc: "http://img.b2bpic.net/free-photo/beautiful-contemporary-modern-design-apartment-with-natural-light-fron-bir-window-white-curtain_609648-50.jpg", imageAlt: "Meridian Residence minimalist home"
},
{
id: 2,
title: "Corporate Nexus", description: "A landmark office building that prioritizes employee wellness through thoughtful spatial design and minimal visual complexity.", imageSrc: "http://img.b2bpic.net/free-photo/skyscrapers-from-low-angle-view_1359-573.jpg", imageAlt: "Corporate Nexus office building"
title: "Corporate Nexus", description="A landmark office building that prioritizes employee wellness through thoughtful spatial design and minimal visual complexity.", imageSrc: "http://img.b2bpic.net/free-photo/skyscrapers-from-low-angle-view_1359-573.jpg", imageAlt: "Corporate Nexus office building"
},
{
id: 3,
title: "Retreat Studios", description: "An intimate residential complex that reinterprets minimalism through material honesty and architectural restraint.", imageSrc: "http://img.b2bpic.net/free-photo/comfortable-modern-living-room-with-elegant-decor-generated-by-ai_188544-45634.jpg", imageAlt: "Retreat Studios residential complex"
title: "Retreat Studios", description="An intimate residential complex that reinterprets minimalism through material honesty and architectural restraint.", imageSrc: "http://img.b2bpic.net/free-photo/comfortable-modern-living-room-with-elegant-decor-generated-by-ai_188544-45634.jpg", imageAlt: "Retreat Studios residential complex"
}
]}
/>

View File

@@ -1,51 +1,55 @@
"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;
strokeWidth?: number;
stroke?: 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',
strokeWidth = 0,
stroke = 'none',
}) => {
const textLength = text.length;
const charWidth = fontSize * 0.6;
const svgWidth = textLength * charWidth + 40;
const svgHeight = 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={svgWidth}
height={svgHeight}
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="20"
y={fontSize + 10}
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
fill={fill}
strokeWidth={strokeWidth}
stroke={stroke}
fontFamily="inherit"
dominantBaseline="hanging"
>
{logoText}
{text}
</text>
</svg>
);
});
};
SvgTextLogo.displayName = "SvgTextLogo";
export default SvgTextLogo;
export default SvgTextLogo;