11 Commits

Author SHA1 Message Date
46dc205b4a Update theme fonts 2026-02-21 19:53:27 +00:00
0dbaaf75ca Update theme fonts 2026-02-21 19:53:27 +00:00
a055d019fb Update src/app/shop/page.tsx 2026-02-21 19:50:12 +00:00
358ca0906c Update src/app/shop/[id]/page.tsx 2026-02-21 19:50:11 +00:00
642f4d5519 Update src/app/blog/page.tsx 2026-02-21 19:50:10 +00:00
d3e8b6d58e Update src/app/styles/variables.css 2026-02-21 19:47:54 +00:00
78a0ea14c9 Update src/app/shop/page.tsx 2026-02-21 19:47:53 +00:00
2f30a4302b Update src/app/shop/[id]/page.tsx 2026-02-21 19:47:53 +00:00
2df604fca4 Merge version_1 into main
Merge version_1 into main
2026-02-21 19:12:58 +00:00
f15a672534 Merge version_1 into main
Merge version_1 into main
2026-02-21 19:12:13 +00:00
1ed742c319 Merge version_1 into main
Merge version_1 into main
2026-02-21 19:10:17 +00:00
6 changed files with 84 additions and 107 deletions

View File

@@ -22,20 +22,22 @@ export default function BlogPage() {
secondaryButtonStyle="radial-glow" secondaryButtonStyle="radial-glow"
headingFontWeight="bold" headingFontWeight="bold"
> >
<NavbarLayoutFloatingOverlay <div id="nav" data-section="nav">
brandName="Ristorante Milanese" <NavbarLayoutFloatingOverlay
navItems={[ brandName="Ristorante Milanese"
{ name: "Home", id: "/" }, navItems={[
{ name: "Menu", id: "/#features" }, { name: "Home", id: "/" },
{ name: "About", id: "/#about" }, { name: "Menu", id: "/#features" },
{ name: "Reservations", id: "/#contact" }, { name: "About", id: "/#about" },
{ name: "Testimonials", id: "/#testimonials" }, { name: "Reservations", id: "/#contact" },
]} { name: "Testimonials", id: "/#testimonials" },
button={{ text: "Book a Table", href: "/#contact" }} ]}
className="py-4 px-6 lg:px-12" button={{ text: "Book a Table", href: "/#contact" }}
buttonClassName="px-5 py-2" className="py-4 px-6 lg:px-12"
buttonTextClassName="text-sm font-semibold" buttonClassName="px-5 py-2"
/> buttonTextClassName="text-sm font-semibold"
/>
</div>
<main> <main>
{isLoading ? ( {isLoading ? (
@@ -55,11 +57,13 @@ export default function BlogPage() {
)} )}
</main> </main>
<FooterCard <div id="footer" data-section="footer">
logoText="Ristorante Milanese" <FooterCard
copyrightText="© 2024 Ristorante Milanese. All rights reserved." logoText="Ristorante Milanese"
socialLinks={[]} copyrightText="© 2024 Ristorante Milanese. All rights reserved."
/> socialLinks={[]}
/>
</div>
</ThemeProvider> </ThemeProvider>
); );
} }

View File

@@ -4,14 +4,10 @@ import { Source_Sans_3 } from "next/font/google";
import "./globals.css"; import "./globals.css";
import { ServiceWrapper } from "@/components/ServiceWrapper"; import { ServiceWrapper } from "@/components/ServiceWrapper";
import Tag from "@/tag/Tag"; import Tag from "@/tag/Tag";
import { Inter } from "next/font/google";
import { Open_Sans } from "next/font/google";
const workSans = Work_Sans({
variable: "--font-work-sans", subsets: ["latin"],
});
const sourceSans3 = Source_Sans_3({
variable: "--font-source-sans-3", subsets: ["latin"],
});
export const metadata: Metadata = { export const metadata: Metadata = {
title: "Ristorante Milanese | Authentic Italian Dining in Milan", description: "Experience authentic Milanese cuisine at Ristorante Milanese. Savor traditional Italian dishes in an elegant setting in the heart of Milan.", keywords: ["milan restaurant", "italian restaurant", "fine dining milan", "milanese cuisine", "italian food", "restaurant milan", "authentic italian"], title: "Ristorante Milanese | Authentic Italian Dining in Milan", description: "Experience authentic Milanese cuisine at Ristorante Milanese. Savor traditional Italian dishes in an elegant setting in the heart of Milan.", keywords: ["milan restaurant", "italian restaurant", "fine dining milan", "milanese cuisine", "italian food", "restaurant milan", "authentic italian"],
@@ -30,6 +26,15 @@ export const metadata: Metadata = {
}, },
}; };
const inter = Inter({
variable: "--font-inter",
subsets: ["latin"],
});
const openSans = Open_Sans({
variable: "--font-open-sans",
subsets: ["latin"],
});
export default function RootLayout({ export default function RootLayout({
children, children,
}: Readonly<{ }: Readonly<{
@@ -38,9 +43,7 @@ export default function RootLayout({
return ( return (
<html lang="en" suppressHydrationWarning> <html lang="en" suppressHydrationWarning>
<ServiceWrapper> <ServiceWrapper>
<body <body className={`${inter.variable} ${openSans.variable} antialiased`}>
className={`${workSans.variable} ${sourceSans3.variable} antialiased`}
>
<Tag /> <Tag />
{children} {children}
@@ -285,9 +288,7 @@ export default function RootLayout({
const getElementInfo = (element, assignId = false) => { const getElementInfo = (element, assignId = false) => {
const rect = element.getBoundingClientRect(); const rect = element.getBoundingClientRect();
const tagName = element.tagName.toLowerCase(); const tagName = element.tagName.toLowerCase();
const selector = getUniqueSelector(element, assignId);
const sectionId = getSectionId(element);
let className = undefined; let className = undefined;
try { try {
if (element.className) { if (element.className) {
@@ -315,8 +316,7 @@ export default function RootLayout({
}; };
if (tagName === 'img') { if (tagName === 'img') {
const originalSrc = extractOriginalUrl(element.src); info.imageData = {
info.imageData = {
src: originalSrc, src: originalSrc,
alt: element.alt || undefined, alt: element.alt || undefined,
naturalWidth: element.naturalWidth, naturalWidth: element.naturalWidth,
@@ -327,8 +327,7 @@ export default function RootLayout({
if (tagName === 'video') { if (tagName === 'video') {
const rawSrc = element.src || element.currentSrc || (element.querySelector('source') && element.querySelector('source').src) || ''; const rawSrc = element.src || element.currentSrc || (element.querySelector('source') && element.querySelector('source').src) || '';
const resolvedSrc = extractOriginalUrl(rawSrc); info.imageData = {
info.imageData = {
src: resolvedSrc, src: resolvedSrc,
alt: element.getAttribute('aria-label') || undefined, alt: element.getAttribute('aria-label') || undefined,
isBackground: false, isBackground: false,
@@ -341,8 +340,7 @@ export default function RootLayout({
if (backgroundImage && backgroundImage !== 'none') { if (backgroundImage && backgroundImage !== 'none') {
const urlMatch = backgroundImage.match(/url(['"]?([^'")]+)['"]?)/); const urlMatch = backgroundImage.match(/url(['"]?([^'")]+)['"]?)/);
if (urlMatch) { if (urlMatch) {
const originalBgSrc = extractOriginalUrl(urlMatch[1]); if (tagName !== 'img') {
if (tagName !== 'img') {
info.imageData = { info.imageData = {
src: originalBgSrc, src: originalBgSrc,
isBackground: true isBackground: true
@@ -354,8 +352,7 @@ export default function RootLayout({
} }
} }
const elementType = getElementType(element); info.elementType = elementType;
info.elementType = elementType;
if (elementType === 'Button') { if (elementType === 'Button') {
const buttonText = element.textContent?.trim() || element.value || element.getAttribute('aria-label') || ''; const buttonText = element.textContent?.trim() || element.value || element.getAttribute('aria-label') || '';
@@ -448,13 +445,11 @@ export default function RootLayout({
}; };
const isTextElement = (element) => { const isTextElement = (element) => {
const elementType = getElementType(element); return elementType === 'Text';
return elementType === 'Text';
}; };
const isButtonElement = (element) => { const isButtonElement = (element) => {
const elementType = getElementType(element); return elementType === 'Button';
return elementType === 'Button';
}; };
const updateButtonText = (element, newText) => { const updateButtonText = (element, newText) => {
@@ -529,8 +524,7 @@ export default function RootLayout({
}; };
const handleInput = () => { const handleInput = () => {
const elementInfo = getElementInfo(element); let currentText = element.textContent;
let currentText = element.textContent;
// Ensure there's always at least a space to keep the element editable // Ensure there's always at least a space to keep the element editable
if (currentText === '' || currentText === null || currentText.length === 0) { if (currentText === '' || currentText === null || currentText.length === 0) {
@@ -643,8 +637,7 @@ export default function RootLayout({
}, '*'); }, '*');
if (save && originalContent !== element.textContent) { if (save && originalContent !== element.textContent) {
const elementInfo = getElementInfo(element); let finalText = element.textContent;
let finalText = element.textContent;
// Trim the final text and convert space-only to empty string for saving // Trim the final text and convert space-only to empty string for saving
if (finalText === ' ' || finalText.trim() === '') { if (finalText === ' ' || finalText.trim() === '') {
@@ -773,7 +766,7 @@ export default function RootLayout({
lastMouseX = e.clientX; lastMouseX = e.clientX;
lastMouseY = e.clientY; lastMouseY = e.clientY;
const target = getMostSpecificElement(e.clientX, e.clientY) || e.target; || e.target;
if (!isValidElement(target) || target === hoveredElement || target === selectedElement) { if (!isValidElement(target) || target === hoveredElement || target === selectedElement) {
return; return;
@@ -805,8 +798,7 @@ export default function RootLayout({
hoverOverlay = createHoverOverlay(target); hoverOverlay = createHoverOverlay(target);
} }
const elementType = getElementType(target); showElementTypeLabel(target, elementType);
showElementTypeLabel(target, elementType);
window.parent.postMessage({ window.parent.postMessage({
type: 'webild-element-hover', type: 'webild-element-hover',
@@ -848,7 +840,7 @@ export default function RootLayout({
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
const target = getMostSpecificElement(e.clientX, e.clientY) || e.target; || e.target;
if (!isValidElement(target)) return; if (!isValidElement(target)) return;
if (selectedElement && selectedElement !== target) { if (selectedElement && selectedElement !== target) {
@@ -893,8 +885,7 @@ export default function RootLayout({
hoveredElement = null; hoveredElement = null;
} }
const elementInfo = getElementInfo(target, true); selectedElement.dataset.webildSelector = elementInfo.selector;
selectedElement.dataset.webildSelector = elementInfo.selector;
showElementTypeLabel(target, elementInfo.elementType); showElementTypeLabel(target, elementInfo.elementType);
window.parent.postMessage({ window.parent.postMessage({
@@ -977,8 +968,7 @@ export default function RootLayout({
isScrolling = false; isScrolling = false;
if (lastMouseX > 0 && lastMouseY > 0) { if (lastMouseX > 0 && lastMouseY > 0) {
const target = getMostSpecificElement(lastMouseX, lastMouseY); if (target && isValidElement(target) && target !== selectedElement) {
if (target && isValidElement(target) && target !== selectedElement) {
hoveredElement = target; hoveredElement = target;
const computedStyle = window.getComputedStyle(target); const computedStyle = window.getComputedStyle(target);
@@ -992,8 +982,7 @@ export default function RootLayout({
hoveredElement.classList.add(hoverClass); hoveredElement.classList.add(hoverClass);
hoverOverlay = createHoverOverlay(target); hoverOverlay = createHoverOverlay(target);
const elementType = getElementType(target); showElementTypeLabel(target, elementType);
showElementTypeLabel(target, elementType);
window.parent.postMessage({ window.parent.postMessage({
type: 'webild-element-hover', type: 'webild-element-hover',
@@ -1016,8 +1005,7 @@ export default function RootLayout({
const saveChangeToStorage = (change) => { const saveChangeToStorage = (change) => {
try { try {
const storageKey = getStorageKey(); const existingChanges = JSON.parse(localStorage.getItem(storageKey) || '[]');
const existingChanges = JSON.parse(localStorage.getItem(storageKey) || '[]');
const filteredChanges = existingChanges.filter(c => { const filteredChanges = existingChanges.filter(c => {
return !(c.oldValue === change.oldValue && c.sectionId === change.sectionId); return !(c.oldValue === change.oldValue && c.sectionId === change.sectionId);
@@ -1037,8 +1025,7 @@ export default function RootLayout({
const clearLocalChanges = () => { const clearLocalChanges = () => {
try { try {
const storageKey = getStorageKey(); localStorage.removeItem(storageKey);
localStorage.removeItem(storageKey);
window.parent.postMessage({ window.parent.postMessage({
type: 'webild-local-changes-cleared', type: 'webild-local-changes-cleared',
data: {} data: {}
@@ -1087,8 +1074,7 @@ export default function RootLayout({
if (e.data.type === 'webild-cancel-changes') { if (e.data.type === 'webild-cancel-changes') {
try { try {
const storageKey = getStorageKey(); const savedChanges = localStorage.getItem(storageKey);
const savedChanges = localStorage.getItem(storageKey);
if (savedChanges) { if (savedChanges) {
const changes = JSON.parse(savedChanges); const changes = JSON.parse(savedChanges);
changes.forEach(change => { changes.forEach(change => {
@@ -1110,8 +1096,7 @@ export default function RootLayout({
if (isBackground) { if (isBackground) {
element.style.backgroundImage = change.oldValue ? 'url(' + change.oldValue + ')' : ''; element.style.backgroundImage = change.oldValue ? 'url(' + change.oldValue + ')' : '';
} else { } else {
const oldMediaType = getMediaTypeFromUrl(change.oldValue); if (revertTag === 'video' && oldMediaType === 'image') {
if (revertTag === 'video' && oldMediaType === 'image') {
swapMediaElement(element, 'img', change.oldValue); swapMediaElement(element, 'img', change.oldValue);
} else if (revertTag === 'img' && oldMediaType === 'video') { } else if (revertTag === 'img' && oldMediaType === 'video') {
swapMediaElement(element, 'video', change.oldValue); swapMediaElement(element, 'video', change.oldValue);
@@ -1159,8 +1144,7 @@ export default function RootLayout({
const el = textElements[i]; const el = textElements[i];
if (isTextElement(el) && el.textContent.trim() === (oldValue || '').trim()) { if (isTextElement(el) && el.textContent.trim() === (oldValue || '').trim()) {
element = el; element = el;
const newSelector = getUniqueSelector(element, true); if (newSelector) {
if (newSelector) {
element.dataset.webildSelector = newSelector; element.dataset.webildSelector = newSelector;
} }
break; break;
@@ -1251,10 +1235,8 @@ export default function RootLayout({
replaced = true; replaced = true;
} else if (element.tagName.toLowerCase() === 'img') { } else if (element.tagName.toLowerCase() === 'img') {
oldValue = element.src; oldValue = element.src;
const newMediaType = getMediaTypeFromUrl(newSrc); if (newMediaType === 'video' && allowMediaTypeSwap) {
if (newMediaType === 'video' && allowMediaTypeSwap) { if (selectedElement === element) selectedElement = swapped;
const swapped = swapMediaElement(element, 'video', newSrc);
if (selectedElement === element) selectedElement = swapped;
element = swapped; element = swapped;
} else { } else {
element.src = newSrc; element.src = newSrc;
@@ -1262,11 +1244,9 @@ export default function RootLayout({
replaced = true; replaced = true;
} else if (element.tagName.toLowerCase() === 'video') { } else if (element.tagName.toLowerCase() === 'video') {
oldValue = element.src || element.currentSrc || ''; oldValue = element.src || element.currentSrc || '';
const newMediaType = getMediaTypeFromUrl(newSrc); const sources = element.querySelectorAll('source');
const sources = element.querySelectorAll('source');
if (newMediaType === 'image' && allowMediaTypeSwap) { if (newMediaType === 'image' && allowMediaTypeSwap) {
const swapped = swapMediaElement(element, 'img', newSrc); if (selectedElement === element) selectedElement = swapped;
if (selectedElement === element) selectedElement = swapped;
element = swapped; element = swapped;
} else { } else {
if (sources.length > 0) { if (sources.length > 0) {
@@ -1288,8 +1268,7 @@ export default function RootLayout({
} }
if (replaced) { if (replaced) {
const elementInfo = getElementInfo(element);
let cleanOldValue = oldValue; let cleanOldValue = oldValue;
if (oldValue.includes('url(')) { if (oldValue.includes('url(')) {
const urlMatch = oldValue.match(/url(['"]?([^'")]+)['"]?)/); const urlMatch = oldValue.match(/url(['"]?([^'")]+)['"]?)/);
@@ -1360,13 +1339,7 @@ export default function RootLayout({
} }
}, true); }, true);
const urlCheckInterval = setInterval(() => {
if (lastPathname !== window.location.pathname) {
lastPathname = window.location.pathname;
notifyPageChange();
}
}, 500);
notifyPageChange(); notifyPageChange();
window.webildCleanup = () => { window.webildCleanup = () => {

View File

@@ -91,7 +91,7 @@ function ProductPageContent({ params }: ProductPageProps) {
headingFontWeight="bold" headingFontWeight="bold"
> >
<ReactLenis root> <ReactLenis root>
<div id="navbar" data-section="navbar"> <div id="nav" data-section="nav">
<NavbarLayoutFloatingOverlay <NavbarLayoutFloatingOverlay
brandName="Ristorante Milanese" brandName="Ristorante Milanese"
navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]} navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]}
@@ -133,7 +133,7 @@ function ProductPageContent({ params }: ProductPageProps) {
headingFontWeight="bold" headingFontWeight="bold"
> >
<ReactLenis root> <ReactLenis root>
<div id="navbar" data-section="navbar"> <div id="nav" data-section="nav">
<NavbarLayoutFloatingOverlay <NavbarLayoutFloatingOverlay
brandName="Ristorante Milanese" brandName="Ristorante Milanese"
navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]} navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]}
@@ -182,7 +182,7 @@ function ProductPageContent({ params }: ProductPageProps) {
headingFontWeight="bold" headingFontWeight="bold"
> >
<ReactLenis root> <ReactLenis root>
<div id="navbar" data-section="navbar"> <div id="nav" data-section="nav">
<NavbarLayoutFloatingOverlay <NavbarLayoutFloatingOverlay
brandName="Ristorante Milanese" brandName="Ristorante Milanese"
navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]} navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]}

View File

@@ -59,7 +59,7 @@ function ShopPageContent() {
headingFontWeight="bold" headingFontWeight="bold"
> >
<ReactLenis root> <ReactLenis root>
<div id="navbar" data-section="navbar"> <div id="nav" data-section="nav">
<NavbarLayoutFloatingOverlay <NavbarLayoutFloatingOverlay
brandName="Ristorante Milanese" brandName="Ristorante Milanese"
navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]} navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]}
@@ -100,7 +100,7 @@ function ShopPageContent() {
headingFontWeight="bold" headingFontWeight="bold"
> >
<ReactLenis root> <ReactLenis root>
<div id="navbar" data-section="navbar"> <div id="nav" data-section="nav">
<NavbarLayoutFloatingOverlay <NavbarLayoutFloatingOverlay
brandName="Ristorante Milanese" brandName="Ristorante Milanese"
navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]} navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]}

View File

@@ -11,7 +11,7 @@ html {
body { body {
background-color: var(--background); background-color: var(--background);
color: var(--foreground); color: var(--foreground);
font-family: var(--font-source-sans-3), sans-serif; font-family: var(--font-open-sans), sans-serif;
position: relative; position: relative;
min-height: 100vh; min-height: 100vh;
overscroll-behavior: none; overscroll-behavior: none;
@@ -24,5 +24,5 @@ h3,
h4, h4,
h5, h5,
h6 { h6 {
font-family: var(--font-work-sans), sans-serif; font-family: var(--font-inter), sans-serif;
} }

View File

@@ -2,23 +2,23 @@
/* Base units */ /* Base units */
/* --vw is set by ThemeProvider */ /* --vw is set by ThemeProvider */
/* --background: #f7f6f7;; /* --background: #f5f4ef;;
--card: #ffffff;; --card: #dad6cd;;
--foreground: #0c1325;; --foreground: #2a2928;;
--primary-cta: #0b07ff;; --primary-cta: #2a2928;;
--secondary-cta: #ffffff;; --secondary-cta: #ecebea;;
--accent: #93b7ff;; --accent: #ffffff;;
--background-accent: #a8bae8;; */ --background-accent: #c6b180;; */
--background: #f7f6f7;; --background: #f5f4ef;;
--card: #ffffff;; --card: #dad6cd;;
--foreground: #0c1325;; --foreground: #2a2928;;
--primary-cta: #0b07ff;; --primary-cta: #2a2928;;
--primary-cta-text: #f7f6f7;; --primary-cta-text: #f5f4ef;;
--secondary-cta: #ffffff;; --secondary-cta: #ecebea;;
--secondary-cta-text: #0c1325;; --secondary-cta-text: #2a2928;;
--accent: #93b7ff;; --accent: #ffffff;;
--background-accent: #a8bae8;; --background-accent: #c6b180;;
/* text sizing - set by ThemeProvider */ /* text sizing - set by ThemeProvider */
/* --text-2xs: clamp(0.465rem, 0.62vw, 0.62rem); /* --text-2xs: clamp(0.465rem, 0.62vw, 0.62rem);