Merge version_1 into main #2

Merged
bender merged 2 commits from version_1 into main 2026-03-12 06:07:11 +00:00
2 changed files with 44 additions and 40 deletions

View File

@@ -19,7 +19,7 @@ export default function LandingPage() {
borderRadius="rounded"
contentWidth="mediumSmall"
sizing="mediumSizeLargeTitles"
background="aurora"
background="circleGradient"
cardStyle="layered-gradient"
primaryButtonStyle="double-inset"
secondaryButtonStyle="glass"
@@ -44,7 +44,7 @@ export default function LandingPage() {
tag="Premium Specialty Coffee"
tagIcon={Coffee}
tagAnimation="blur-reveal"
background={{ variant: "aurora" }}
background={{ variant: "glowing-orb" }}
leftCarouselItems={[
{
imageSrc: "http://img.b2bpic.net/free-psd/floating-roasted-coffee-beans-transparent-background_84443-68959.jpg", imageAlt: "Coffee beans roasting"
@@ -89,7 +89,7 @@ export default function LandingPage() {
tag="Our Journey"
tagIcon={Leaf}
tagAnimation="slide-up"
imageSrc="http://img.b2bpic.net/free-photo/front-view-coffee-beans-container_23-2148523095.jpg?_wi=1"
imageSrc="http://img.b2bpic.net/free-photo/front-view-coffee-beans-container_23-2148523095.jpg"
imageAlt="Brew Haven coffee roastery"
buttons={[{ text: "Visit Us", href: "#contact" }]}
buttonAnimation="slide-up"
@@ -190,7 +190,7 @@ export default function LandingPage() {
<div id="footer" data-section="footer">
<FooterMedia
imageSrc="http://img.b2bpic.net/free-photo/front-view-coffee-beans-container_23-2148523095.jpg?_wi=2"
imageSrc="http://img.b2bpic.net/free-photo/front-view-coffee-beans-container_23-2148523095.jpg"
imageAlt="Brew Haven coffee roastery"
logoText="Brew Haven"
copyrightText="© 2025 Brew Haven | Specialty Coffee Roasters"

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;
}
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 = 2,
}) => {
const textLength = text.length;
const charWidth = fontSize * 0.6;
const width = textLength * charWidth + letterSpacing * (textLength - 1) + 40;
const height = 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={width}
height={height}
viewBox={`0 0 ${width} ${height}`}
xmlns="http://www.w3.org/2000/svg"
className={className}
aria-label={`Text logo: ${text}`}
>
<defs>
<linearGradient id="textGradient" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style={{ stopColor: '#ffffff', stopOpacity: 1 }} />
<stop offset="100%" style={{ stopColor: '#cccccc', stopOpacity: 1 }} />
</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={width / 2}
y={height / 2}
textAnchor="middle"
dominantBaseline="middle"
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
fill="url(#textGradient)"
fontFamily="system-ui, -apple-system, sans-serif"
>
{logoText}
{text}
</text>
</svg>
);
});
};
SvgTextLogo.displayName = "SvgTextLogo";
export default SvgTextLogo;
export default SvgTextLogo;