Merge version_1 into main #2
@@ -55,16 +55,16 @@ export default function LandingPage() {
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/view-delicious-food-sold-streets-city_23-2151516932.jpg", imageAlt: "Restoran Saben Ayu dengan pemandangan sawah"
|
||||
},
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/medium-shot-couple-with-pina-colada_23-2150184033.jpg?_wi=1", imageAlt: "Pemandangan sawah dari restoran"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/medium-shot-couple-with-pina-colada_23-2150184033.jpg", imageAlt: "Pemandangan sawah dari restoran"
|
||||
},
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/lunch-setup-restaurant-near-window-floor-stand-lamp_140725-1572.jpg?_wi=1", imageAlt: "Interior restoran Saben Ayu"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/lunch-setup-restaurant-near-window-floor-stand-lamp_140725-1572.jpg", imageAlt: "Interior restoran Saben Ayu"
|
||||
},
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/table-set-dinning-table_1339-6425.jpg?_wi=1", imageAlt: "Area tempat duduk restoran"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/table-set-dinning-table_1339-6425.jpg", imageAlt: "Area tempat duduk restoran"
|
||||
},
|
||||
{
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/fried-chicken-thinly-sliced-onions-sauce-red-pepper_140725-2959.jpg?_wi=1", imageAlt: "Makanan tradisional yang lezat"
|
||||
imageSrc: "http://img.b2bpic.net/free-photo/fried-chicken-thinly-sliced-onions-sauce-red-pepper_140725-2959.jpg", imageAlt: "Makanan tradisional yang lezat"
|
||||
}
|
||||
]}
|
||||
buttons={[
|
||||
@@ -132,16 +132,16 @@ export default function LandingPage() {
|
||||
useInvertedBackground={false}
|
||||
features={[
|
||||
{
|
||||
id: "01", title: "Pemandangan Sawah", description: "Nikmati pemandangan sawah yang hijau dan menenangkan dari area makan kami.", imageSrc: "http://img.b2bpic.net/free-photo/medium-shot-couple-with-pina-colada_23-2150184033.jpg?_wi=2", imageAlt: "Pemandangan Sawah"
|
||||
id: "01", title: "Pemandangan Sawah", description: "Nikmati pemandangan sawah yang hijau dan menenangkan dari area makan kami.", imageSrc: "http://img.b2bpic.net/free-photo/medium-shot-couple-with-pina-colada_23-2150184033.jpg", imageAlt: "Pemandangan Sawah"
|
||||
},
|
||||
{
|
||||
id: "02", title: "Interior Restoran", description: "Desain interior yang nyaman dengan sentuhan tradisional dan modern.", imageSrc: "http://img.b2bpic.net/free-photo/lunch-setup-restaurant-near-window-floor-stand-lamp_140725-1572.jpg?_wi=2", imageAlt: "Interior Restoran"
|
||||
id: "02", title: "Interior Restoran", description: "Desain interior yang nyaman dengan sentuhan tradisional dan modern.", imageSrc: "http://img.b2bpic.net/free-photo/lunch-setup-restaurant-near-window-floor-stand-lamp_140725-1572.jpg", imageAlt: "Interior Restoran"
|
||||
},
|
||||
{
|
||||
id: "03", title: "Area Tempat Duduk", description: "Ruang makan yang luas dan nyaman untuk keluarga besar atau rombongan.", imageSrc: "http://img.b2bpic.net/free-photo/table-set-dinning-table_1339-6425.jpg?_wi=2", imageAlt: "Area Tempat Duduk"
|
||||
id: "03", title: "Area Tempat Duduk", description: "Ruang makan yang luas dan nyaman untuk keluarga besar atau rombongan.", imageSrc: "http://img.b2bpic.net/free-photo/table-set-dinning-table_1339-6425.jpg", imageAlt: "Area Tempat Duduk"
|
||||
},
|
||||
{
|
||||
id: "04", title: "Hidangan Spesial", description: "Tampilan menggugah selera dari setiap hidangan yang kami sajikan.", imageSrc: "http://img.b2bpic.net/free-photo/fried-chicken-thinly-sliced-onions-sauce-red-pepper_140725-2959.jpg?_wi=2", imageAlt: "Hidangan Spesial"
|
||||
id: "04", title: "Hidangan Spesial", description: "Tampilan menggugah selera dari setiap hidangan yang kami sajikan.", imageSrc: "http://img.b2bpic.net/free-photo/fried-chicken-thinly-sliced-onions-sauce-red-pepper_140725-2959.jpg", imageAlt: "Hidangan Spesial"
|
||||
}
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -1,51 +1,41 @@
|
||||
"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;
|
||||
}
|
||||
|
||||
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',
|
||||
}) => {
|
||||
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 ${text.length * fontSize * 0.6} ${fontSize * 1.5}`}
|
||||
className={`inline-block ${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"
|
||||
}}
|
||||
y={fontSize}
|
||||
fontSize={fontSize}
|
||||
fontWeight={fontWeight}
|
||||
fill={fill}
|
||||
letterSpacing={letterSpacing}
|
||||
dominantBaseline="auto"
|
||||
>
|
||||
{logoText}
|
||||
{text}
|
||||
</text>
|
||||
</svg>
|
||||
);
|
||||
});
|
||||
|
||||
SvgTextLogo.displayName = "SvgTextLogo";
|
||||
};
|
||||
|
||||
export default SvgTextLogo;
|
||||
|
||||
Reference in New Issue
Block a user