Merge version_1 into main #2
@@ -54,9 +54,9 @@ export default function LandingPage() {
|
||||
buttonAnimation="slide-up"
|
||||
background={{ variant: "plain" }}
|
||||
carouselItems={[
|
||||
{ id: "1", imageSrc: "http://img.b2bpic.net/free-photo/high-angle-delicious-pizza-table_23-2148305632.jpg?_wi=1", imageAlt: "Margherita Pizza" },
|
||||
{ id: "2", imageSrc: "http://img.b2bpic.net/free-photo/pizza-word-written-flour-wooden-board_23-2148753794.jpg?_wi=1", imageAlt: "Pepperoni Pizza" },
|
||||
{ id: "3", imageSrc: "http://img.b2bpic.net/free-photo/high-angle-baking-delicious-pizza_23-2150235780.jpg?_wi=1", imageAlt: "Specialty Pizza" },
|
||||
{ id: "1", imageSrc: "http://img.b2bpic.net/free-photo/high-angle-delicious-pizza-table_23-2148305632.jpg", imageAlt: "Margherita Pizza" },
|
||||
{ id: "2", imageSrc: "http://img.b2bpic.net/free-photo/pizza-word-written-flour-wooden-board_23-2148753794.jpg", imageAlt: "Pepperoni Pizza" },
|
||||
{ id: "3", imageSrc: "http://img.b2bpic.net/free-photo/high-angle-baking-delicious-pizza_23-2150235780.jpg", imageAlt: "Specialty Pizza" },
|
||||
{ id: "4", imageSrc: "http://img.b2bpic.net/free-photo/thyme-kneaded-dough-with-dusted-flour-black-kitchen-worktop_23-2147975142.jpg", imageAlt: "Gourmet Pizza" },
|
||||
{ id: "5", imageSrc: "http://img.b2bpic.net/free-photo/pizza-wooden-plate_181624-990.jpg", imageAlt: "Classic Pizza" },
|
||||
{ id: "6", imageSrc: "http://img.b2bpic.net/free-photo/top-view-square-pizza-with-tomatoes_23-2149235619.jpg", imageAlt: "Wood-Fired Pizza" }
|
||||
@@ -79,9 +79,9 @@ export default function LandingPage() {
|
||||
animationType="slide-up"
|
||||
gridVariant="three-columns-all-equal-width"
|
||||
products={[
|
||||
{ id: "1", name: "Margherita Classic", price: "$14.99", imageSrc: "http://img.b2bpic.net/free-photo/high-angle-delicious-pizza-table_23-2148305632.jpg?_wi=2", imageAlt: "Margherita Pizza" },
|
||||
{ id: "2", name: "Pepperoni Perfection", price: "$16.99", imageSrc: "http://img.b2bpic.net/free-photo/pizza-word-written-flour-wooden-board_23-2148753794.jpg?_wi=2", imageAlt: "Pepperoni Pizza" },
|
||||
{ id: "3", name: "House Special", price: "$18.99", imageSrc: "http://img.b2bpic.net/free-photo/high-angle-baking-delicious-pizza_23-2150235780.jpg?_wi=2", imageAlt: "House Special Pizza" }
|
||||
{ id: "1", name: "Margherita Classic", price: "$14.99", imageSrc: "http://img.b2bpic.net/free-photo/high-angle-delicious-pizza-table_23-2148305632.jpg", imageAlt: "Margherita Pizza" },
|
||||
{ id: "2", name: "Pepperoni Perfection", price: "$16.99", imageSrc: "http://img.b2bpic.net/free-photo/pizza-word-written-flour-wooden-board_23-2148753794.jpg", imageAlt: "Pepperoni Pizza" },
|
||||
{ id: "3", name: "House Special", price: "$18.99", imageSrc: "http://img.b2bpic.net/free-photo/high-angle-baking-delicious-pizza_23-2150235780.jpg", imageAlt: "House Special Pizza" }
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -1,51 +1,29 @@
|
||||
"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;
|
||||
}
|
||||
|
||||
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 = '' }) => {
|
||||
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 300 100"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className={`w-auto h-8 ${className}`}
|
||||
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="150"
|
||||
y="50"
|
||||
textAnchor="middle"
|
||||
dominantBaseline="central"
|
||||
className="text-2xl font-bold fill-current"
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
};
|
||||
|
||||
export default SvgTextLogo;
|
||||
|
||||
Reference in New Issue
Block a user