Merge version_1 into main #2
@@ -54,10 +54,10 @@ export default function LandingPage() {
|
||||
]}
|
||||
mediaItems={[
|
||||
{
|
||||
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=b62xpp&_wi=1", imageAlt: "High-performance racing motorcycle"
|
||||
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=b62xpp", imageAlt: "High-performance racing motorcycle"
|
||||
},
|
||||
{
|
||||
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=dhwlbh&_wi=1", imageAlt: "Professional motorcycle workshop"
|
||||
imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=dhwlbh", imageAlt: "Professional motorcycle workshop"
|
||||
}
|
||||
]}
|
||||
buttonAnimation="slide-up"
|
||||
@@ -94,16 +94,16 @@ export default function LandingPage() {
|
||||
tagAnimation="blur-reveal"
|
||||
features={[
|
||||
{
|
||||
id: "sales", title: "Motorcycle Sales", description: "New and used motorcycles carefully selected and inspected for quality and performance.", tag: "Sales", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=b62xpp&_wi=2", buttons: [{ text: "View Bikes", href: "#" }]
|
||||
id: "sales", title: "Motorcycle Sales", description: "New and used motorcycles carefully selected and inspected for quality and performance.", tag: "Sales", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=b62xpp", buttons: [{ text: "View Bikes", href: "#" }]
|
||||
},
|
||||
{
|
||||
id: "repairs", title: "Repairs & Servicing", description: "Professional mechanical work and regular maintenance to keep your bike running perfectly.", tag: "Service", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=4c9kfg&_wi=1", buttons: [{ text: "Request Service", href: "tel:051430988" }]
|
||||
id: "repairs", title: "Repairs & Servicing", description: "Professional mechanical work and regular maintenance to keep your bike running perfectly.", tag: "Service", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=4c9kfg", buttons: [{ text: "Request Service", href: "tel:051430988" }]
|
||||
},
|
||||
{
|
||||
id: "tuning", title: "Performance Tuning", description: "Engine upgrades and racing setups designed to maximize your bike's potential.", tag: "Upgrade", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=ir62q9", buttons: [{ text: "Get Quote", href: "tel:051430988" }]
|
||||
},
|
||||
{
|
||||
id: "parts", title: "Motorcycle Parts", description: "High-quality components and performance parts sourced from trusted manufacturers.", tag: "Parts", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=4c9kfg&_wi=2", buttons: [{ text: "Browse Parts", href: "#" }]
|
||||
id: "parts", title: "Motorcycle Parts", description: "High-quality components and performance parts sourced from trusted manufacturers.", tag: "Parts", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=4c9kfg", buttons: [{ text: "Browse Parts", href: "#" }]
|
||||
},
|
||||
{
|
||||
id: "custom", title: "Custom Builds", description: "Bespoke racing bikes and performance builds crafted to your exact specifications.", tag: "Custom", imageSrc: "https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=85lj3j", buttons: [{ text: "Start Project", href: "tel:051430988" }]
|
||||
@@ -124,7 +124,7 @@ export default function LandingPage() {
|
||||
description="SMRacing - Sidz Motorcycles Racing"
|
||||
subdescription="Bloemfontein's Premier Motorcycle Shop Since 2009"
|
||||
icon={Award}
|
||||
imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=dhwlbh&_wi=2"
|
||||
imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/default/no-image.jpg?id=dhwlbh"
|
||||
imageAlt="SMRacing workshop team"
|
||||
mediaAnimation="slide-up"
|
||||
useInvertedBackground={true}
|
||||
|
||||
@@ -1,51 +1,57 @@
|
||||
"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;
|
||||
fontFamily?: string;
|
||||
fontWeight?: number | string;
|
||||
letterSpacing?: number;
|
||||
fill?: string;
|
||||
stroke?: string;
|
||||
strokeWidth?: 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,
|
||||
fontFamily = 'Arial, sans-serif',
|
||||
fontWeight = 'bold',
|
||||
letterSpacing = 0,
|
||||
fill = 'currentColor',
|
||||
stroke = 'none',
|
||||
strokeWidth = 0,
|
||||
}) => {
|
||||
const padding = 20;
|
||||
const estimatedWidth = text.length * (fontSize * 0.6) + padding * 2;
|
||||
const estimatedHeight = fontSize + padding * 2;
|
||||
|
||||
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 ${estimatedWidth} ${estimatedHeight}`}
|
||||
width={estimatedWidth}
|
||||
height={estimatedHeight}
|
||||
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={padding}
|
||||
y={fontSize + padding / 2}
|
||||
fontSize={fontSize}
|
||||
fontFamily={fontFamily}
|
||||
fontWeight={fontWeight}
|
||||
fill={fill}
|
||||
stroke={stroke}
|
||||
strokeWidth={strokeWidth}
|
||||
letterSpacing={letterSpacing}
|
||||
dominantBaseline="middle"
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
|
||||
export default SvgTextLogo;
|
||||
export default SvgTextLogo;
|
||||
Reference in New Issue
Block a user