Merge version_1 into main #2
@@ -57,13 +57,12 @@ export default function LandingPage() {
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/top-view-cherry-pie-piece-with-fresh-sour-cherries-dark-blue-desk-cake-pie-fruit-sweet-sugar_140725-33856.jpg", imageAlt: "Fresh croissants and cappuccino on wooden table"
|
||||
},
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/croissant-coffee-food-photography_53876-104492.jpg?_wi=1", imageAlt: "Parisian breakfast spread with pastries and coffee"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/croissant-coffee-food-photography_53876-104492.jpg", imageAlt: "Parisian breakfast spread with pastries and coffee"
|
||||
}
|
||||
]}
|
||||
mediaAnimation="slide-up"
|
||||
rating={5}
|
||||
ratingText="Loved by Neighbors & Commuters"
|
||||
useInvertedBackground={false}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -76,15 +75,15 @@ export default function LandingPage() {
|
||||
features={[
|
||||
{
|
||||
id: "1", title: "Croissants Pur Beurre", author: "Signature Item", description: "Buttery, flaky, melt-in-your-mouth croissants that people come back for. Made fresh every morning with premium French butter.", tags: ["Fresh Daily", "Bestseller"],
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/top-view-fresh-croissants_23-2148628324.jpg?_wi=1", imageAlt: "Golden, flaky butter croissant"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/top-view-fresh-croissants_23-2148628324.jpg", imageAlt: "Golden, flaky butter croissant"
|
||||
},
|
||||
{
|
||||
id: "2", title: "Pain au Chocolat", author: "Customer Favorite", description: "Warm, chocolatey pastries that deliver the perfect balance of crispy exterior and soft, indulgent center. A breakfast must-have.", tags: ["Warm", "Chocolate"],
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/tasty-homemade-biscuits-beige-background-high-quality-photo_114579-68811.jpg?_wi=1", imageAlt: "Fresh pain au chocolat with chocolate filling"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/tasty-homemade-biscuits-beige-background-high-quality-photo_114579-68811.jpg", imageAlt: "Fresh pain au chocolat with chocolate filling"
|
||||
},
|
||||
{
|
||||
id: "3", title: "Perfect Cappuccino", author: "Barista Craft", description: "Expertly pulled espresso with silky microfoam. Our cappuccinos pair perfectly with any pastry and keep customers coming back.", tags: ["Artisan", "Coffee"],
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/top-view-female-barista-pouring-frothed-milk-cup_23-2148824452.jpg?_wi=1", imageAlt: "Professional cappuccino with latte art"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/top-view-female-barista-pouring-frothed-milk-cup_23-2148824452.jpg", imageAlt: "Professional cappuccino with latte art"
|
||||
}
|
||||
]}
|
||||
animationType="slide-up"
|
||||
@@ -102,19 +101,19 @@ export default function LandingPage() {
|
||||
products={[
|
||||
{
|
||||
id: "1", brand: "Viennoiseries", name: "Croissant Pur Beurre", price: "€4.50", rating: 5,
|
||||
reviewCount: "120+", imageSrc: "http://img.b2bpic.net/free-photo/top-view-fresh-croissants_23-2148628324.jpg?_wi=2", imageAlt: "Premium butter croissant"
|
||||
reviewCount: "120+", imageSrc: "http://img.b2bpic.net/free-photo/top-view-fresh-croissants_23-2148628324.jpg", imageAlt: "Premium butter croissant"
|
||||
},
|
||||
{
|
||||
id: "2", brand: "Viennoiseries", name: "Pain au Chocolat", price: "€4.00", rating: 5,
|
||||
reviewCount: "98+", imageSrc: "http://img.b2bpic.net/free-photo/tasty-homemade-biscuits-beige-background-high-quality-photo_114579-68811.jpg?_wi=2", imageAlt: "Warm chocolate pastry"
|
||||
reviewCount: "98+", imageSrc: "http://img.b2bpic.net/free-photo/tasty-homemade-biscuits-beige-background-high-quality-photo_114579-68811.jpg", imageAlt: "Warm chocolate pastry"
|
||||
},
|
||||
{
|
||||
id: "3", brand: "Coffee Drinks", name: "Cappuccino", price: "€3.50", rating: 5,
|
||||
reviewCount: "150+", imageSrc: "http://img.b2bpic.net/free-photo/top-view-female-barista-pouring-frothed-milk-cup_23-2148824452.jpg?_wi=2", imageAlt: "Artisan cappuccino with microfoam"
|
||||
reviewCount: "150+", imageSrc: "http://img.b2bpic.net/free-photo/top-view-female-barista-pouring-frothed-milk-cup_23-2148824452.jpg", imageAlt: "Artisan cappuccino with microfoam"
|
||||
},
|
||||
{
|
||||
id: "4", brand: "Breakfast Sets", name: "Breakfast Combo", price: "€7.50", rating: 5,
|
||||
reviewCount: "85+", imageSrc: "http://img.b2bpic.net/free-photo/croissant-coffee-food-photography_53876-104492.jpg?_wi=2", imageAlt: "Breakfast pastries and coffee pairing"
|
||||
reviewCount: "85+", imageSrc: "http://img.b2bpic.net/free-photo/croissant-coffee-food-photography_53876-104492.jpg", imageAlt: "Breakfast pastries and coffee pairing"
|
||||
}
|
||||
]}
|
||||
gridVariant="four-items-2x2-equal-grid"
|
||||
|
||||
@@ -1,51 +1,33 @@
|
||||
"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;
|
||||
dominantBaseline?: 'auto' | 'middle' | 'central' | 'hanging' | 'mathematical';
|
||||
}
|
||||
|
||||
const SvgTextLogo = memo<SvgTextLogoProps>(function SvgTextLogo({
|
||||
logoText,
|
||||
adjustHeightFactor,
|
||||
verticalAlign = "top",
|
||||
className = "",
|
||||
}) {
|
||||
const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor);
|
||||
|
||||
export const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
|
||||
text,
|
||||
className = '',
|
||||
dominantBaseline = 'middle',
|
||||
}) => {
|
||||
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 200 200"
|
||||
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="100"
|
||||
y="100"
|
||||
textAnchor="middle"
|
||||
dominantBaseline={dominantBaseline}
|
||||
className="text-xl font-bold"
|
||||
fill="currentColor"
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
|
||||
export default SvgTextLogo;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user