24 Commits

Author SHA1 Message Date
2df05dccb0 Merge version_2 into main
Merge version_2 into main
2026-03-09 18:25:21 +00:00
2d30ec65eb Update theme colors 2026-03-09 18:25:15 +00:00
70686fc7b8 Merge version_2 into main
Merge version_2 into main
2026-03-09 18:12:02 +00:00
c4866df45f Update theme colors 2026-03-09 18:11:54 +00:00
e707af6287 Merge version_2 into main
Merge version_2 into main
2026-03-09 18:11:40 +00:00
98c648548d Update theme fonts 2026-03-09 18:11:35 +00:00
90af74ee47 Update theme fonts 2026-03-09 18:11:35 +00:00
66e31b0634 Merge version_2 into main
Merge version_2 into main
2026-03-09 18:11:24 +00:00
0b8f90c1b5 Update theme fonts 2026-03-09 18:11:20 +00:00
8dd127aa5e Update theme fonts 2026-03-09 18:11:19 +00:00
726aa56f50 Merge version_2 into main
Merge version_2 into main
2026-03-09 18:11:16 +00:00
2f5b54e05b Update theme fonts 2026-03-09 18:11:12 +00:00
229a03f3de Update theme fonts 2026-03-09 18:11:11 +00:00
d45f186faf Merge version_2 into main
Merge version_2 into main
2026-03-09 17:56:28 +00:00
59488b1bee Update theme colors 2026-03-09 17:56:22 +00:00
ec3319ac89 Merge version_2 into main
Merge version_2 into main
2026-03-09 17:53:56 +00:00
01b51e7f7f Update theme colors 2026-03-09 17:53:50 +00:00
916aa8fd79 Merge version_2 into main
Merge version_2 into main
2026-03-09 16:23:55 +00:00
78388ce1f2 Update theme colors 2026-03-09 16:23:49 +00:00
245e152c81 Merge version_2 into main
Merge version_2 into main
2026-03-09 16:23:47 +00:00
5648f0e60b Update theme colors 2026-03-09 16:23:41 +00:00
80d48a6355 Merge version_2 into main
Merge version_2 into main
2026-03-09 12:47:37 +00:00
c5f3ba8ba3 Update src/app/styles/variables.css 2026-03-09 12:47:33 +00:00
7e60e6cbb2 Merge version_1 into main
Merge version_1 into main
2026-03-08 14:09:17 +00:00
3 changed files with 50 additions and 76 deletions

View File

@@ -4,15 +4,10 @@ import { Inter } from "next/font/google";
import "./globals.css";
import { ServiceWrapper } from "@/components/ServiceWrapper";
import Tag from "@/tag/Tag";
import { DM_Sans } from "next/font/google";
import { Manrope } from "next/font/google";
const halant = Halant({
variable: "--font-halant", subsets: ["latin"],
weight: ["300", "400", "500", "600", "700"],
});
const inter = Inter({
variable: "--font-inter", subsets: ["latin"],
});
export const metadata: Metadata = {
title: "Luxury 5-Star Hotel - Luxe Hotel", description: "Experience world-class hospitality at Luxe Hotel. Award-winning accommodations, premium amenities, fine dining, and exceptional service in the heart of the city.", keywords: "luxury hotel, 5-star accommodation, fine dining, spa resort, premium rooms", metadataBase: new URL("https://luxehotel.com"),
@@ -33,6 +28,17 @@ export const metadata: Metadata = {
},
};
const dmSans = DM_Sans({
variable: "--font-dm-sans",
subsets: ["latin"],
});
const inter = Inter({
variable: "--font-inter",
subsets: ["latin"],
});
export default function RootLayout({
children,
}: Readonly<{
@@ -41,9 +47,7 @@ export default function RootLayout({
return (
<html lang="en" suppressHydrationWarning>
<ServiceWrapper>
<body
className={`${halant.variable} ${inter.variable} antialiased`}
>
<body className={`${dmSans.variable} ${inter.variable} antialiased`}>
<Tag />
{children}
@@ -1655,9 +1659,7 @@ export default function RootLayout({
const getElementInfo = (element, assignId = false) => {
const rect = element.getBoundingClientRect();
const tagName = element.tagName.toLowerCase();
const selector = getUniqueSelector(element, assignId);
const sectionId = getSectionId(element);
let className = undefined;
try {
if (element.className) {
@@ -1685,8 +1687,7 @@ export default function RootLayout({
};
if (tagName === 'img') {
const originalSrc = extractOriginalUrl(element.src);
info.imageData = {
info.imageData = {
src: originalSrc,
alt: element.alt || undefined,
naturalWidth: element.naturalWidth,
@@ -1697,8 +1698,7 @@ export default function RootLayout({
if (tagName === 'video') {
const rawSrc = element.src || element.currentSrc || (element.querySelector('source') && element.querySelector('source').src) || '';
const resolvedSrc = extractOriginalUrl(rawSrc);
info.imageData = {
info.imageData = {
src: resolvedSrc,
alt: element.getAttribute('aria-label') || undefined,
isBackground: false,
@@ -1711,8 +1711,7 @@ export default function RootLayout({
if (backgroundImage && backgroundImage !== 'none') {
const urlMatch = backgroundImage.match(/url(['"]?([^'")]+)['"]?)/);
if (urlMatch) {
const originalBgSrc = extractOriginalUrl(urlMatch[1]);
if (tagName !== 'img') {
if (tagName !== 'img') {
info.imageData = {
src: originalBgSrc,
isBackground: true
@@ -1724,8 +1723,7 @@ export default function RootLayout({
}
}
const elementType = getElementType(element);
info.elementType = elementType;
info.elementType = elementType;
if (elementType === 'Button') {
const buttonText = element.textContent?.trim() || element.value || element.getAttribute('aria-label') || '';
@@ -1818,13 +1816,11 @@ export default function RootLayout({
};
const isTextElement = (element) => {
const elementType = getElementType(element);
return elementType === 'Text';
return elementType === 'Text';
};
const isButtonElement = (element) => {
const elementType = getElementType(element);
return elementType === 'Button';
return elementType === 'Button';
};
const updateButtonText = (element, newText) => {
@@ -1899,8 +1895,7 @@ export default function RootLayout({
};
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
if (currentText === '' || currentText === null || currentText.length === 0) {
@@ -2013,8 +2008,7 @@ export default function RootLayout({
}, '*');
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
if (finalText === ' ' || finalText.trim() === '') {
@@ -2143,7 +2137,7 @@ export default function RootLayout({
lastMouseX = e.clientX;
lastMouseY = e.clientY;
const target = getMostSpecificElement(e.clientX, e.clientY) || e.target;
|| e.target;
if (!isValidElement(target) || target === hoveredElement || target === selectedElement) {
return;
@@ -2175,8 +2169,7 @@ export default function RootLayout({
hoverOverlay = createHoverOverlay(target);
}
const elementType = getElementType(target);
showElementTypeLabel(target, elementType);
showElementTypeLabel(target, elementType);
window.parent.postMessage({
type: 'webild-element-hover',
@@ -2218,7 +2211,7 @@ export default function RootLayout({
e.preventDefault();
e.stopPropagation();
const target = getMostSpecificElement(e.clientX, e.clientY) || e.target;
|| e.target;
if (!isValidElement(target)) return;
if (selectedElement && selectedElement !== target) {
@@ -2263,8 +2256,7 @@ export default function RootLayout({
hoveredElement = null;
}
const elementInfo = getElementInfo(target, true);
selectedElement.dataset.webildSelector = elementInfo.selector;
selectedElement.dataset.webildSelector = elementInfo.selector;
showElementTypeLabel(target, elementInfo.elementType);
window.parent.postMessage({
@@ -2347,8 +2339,7 @@ export default function RootLayout({
isScrolling = false;
if (lastMouseX > 0 && lastMouseY > 0) {
const target = getMostSpecificElement(lastMouseX, lastMouseY);
if (target && isValidElement(target) && target !== selectedElement) {
if (target && isValidElement(target) && target !== selectedElement) {
hoveredElement = target;
const computedStyle = window.getComputedStyle(target);
@@ -2362,8 +2353,7 @@ export default function RootLayout({
hoveredElement.classList.add(hoverClass);
hoverOverlay = createHoverOverlay(target);
const elementType = getElementType(target);
showElementTypeLabel(target, elementType);
showElementTypeLabel(target, elementType);
window.parent.postMessage({
type: 'webild-element-hover',
@@ -2386,8 +2376,7 @@ export default function RootLayout({
const saveChangeToStorage = (change) => {
try {
const storageKey = getStorageKey();
const existingChanges = JSON.parse(localStorage.getItem(storageKey) || '[]');
const existingChanges = JSON.parse(localStorage.getItem(storageKey) || '[]');
const filteredChanges = existingChanges.filter(c => {
return !(c.oldValue === change.oldValue && c.sectionId === change.sectionId);
@@ -2407,8 +2396,7 @@ export default function RootLayout({
const clearLocalChanges = () => {
try {
const storageKey = getStorageKey();
localStorage.removeItem(storageKey);
localStorage.removeItem(storageKey);
window.parent.postMessage({
type: 'webild-local-changes-cleared',
data: {}
@@ -2457,8 +2445,7 @@ export default function RootLayout({
if (e.data.type === 'webild-cancel-changes') {
try {
const storageKey = getStorageKey();
const savedChanges = localStorage.getItem(storageKey);
const savedChanges = localStorage.getItem(storageKey);
if (savedChanges) {
const changes = JSON.parse(savedChanges);
changes.forEach(change => {
@@ -2480,8 +2467,7 @@ export default function RootLayout({
if (isBackground) {
element.style.backgroundImage = change.oldValue ? 'url(' + change.oldValue + ')' : '';
} else {
const oldMediaType = getMediaTypeFromUrl(change.oldValue);
if (revertTag === 'video' && oldMediaType === 'image') {
if (revertTag === 'video' && oldMediaType === 'image') {
swapMediaElement(element, 'img', change.oldValue);
} else if (revertTag === 'img' && oldMediaType === 'video') {
swapMediaElement(element, 'video', change.oldValue);
@@ -2529,8 +2515,7 @@ export default function RootLayout({
const el = textElements[i];
if (isTextElement(el) && el.textContent.trim() === (oldValue || '').trim()) {
element = el;
const newSelector = getUniqueSelector(element, true);
if (newSelector) {
if (newSelector) {
element.dataset.webildSelector = newSelector;
}
break;
@@ -2621,10 +2606,8 @@ export default function RootLayout({
replaced = true;
} else if (element.tagName.toLowerCase() === 'img') {
oldValue = element.src;
const newMediaType = getMediaTypeFromUrl(newSrc);
if (newMediaType === 'video' && allowMediaTypeSwap) {
const swapped = swapMediaElement(element, 'video', newSrc);
if (selectedElement === element) selectedElement = swapped;
if (newMediaType === 'video' && allowMediaTypeSwap) {
if (selectedElement === element) selectedElement = swapped;
element = swapped;
} else {
element.src = newSrc;
@@ -2632,11 +2615,9 @@ export default function RootLayout({
replaced = true;
} else if (element.tagName.toLowerCase() === 'video') {
oldValue = element.src || element.currentSrc || '';
const newMediaType = getMediaTypeFromUrl(newSrc);
const sources = element.querySelectorAll('source');
const sources = element.querySelectorAll('source');
if (newMediaType === 'image' && allowMediaTypeSwap) {
const swapped = swapMediaElement(element, 'img', newSrc);
if (selectedElement === element) selectedElement = swapped;
if (selectedElement === element) selectedElement = swapped;
element = swapped;
} else {
if (sources.length > 0) {
@@ -2658,8 +2639,7 @@ export default function RootLayout({
}
if (replaced) {
const elementInfo = getElementInfo(element);
let cleanOldValue = oldValue;
if (oldValue.includes('url(')) {
const urlMatch = oldValue.match(/url(['"]?([^'")]+)['"]?)/);
@@ -2730,13 +2710,7 @@ export default function RootLayout({
}
}, true);
const urlCheckInterval = setInterval(() => {
if (lastPathname !== window.location.pathname) {
lastPathname = window.location.pathname;
notifyPageChange();
}
}, 500);
notifyPageChange();
window.webildCleanup = () => {

View File

@@ -24,5 +24,5 @@ h3,
h4,
h5,
h6 {
font-family: var(--font-inter), sans-serif;
font-family: var(--font-dm-sans), sans-serif;
}

View File

@@ -10,15 +10,15 @@
--accent: #ffffff;
--background-accent: #ffffff; */
--background: #e3deea;
--card: #ffffff;
--foreground: #27231f;
--primary-cta: #27231f;
--primary-cta-text: #e3deea;
--secondary-cta: #ffffff;
--secondary-cta-text: #27231f;
--accent: #c68a62;
--background-accent: #c68a62;
--background: #f6f0e9;
--card: #efe7dd;
--foreground: #2b180a;
--primary-cta: #2b180a;
--primary-cta-text: #f6f0e9;
--secondary-cta: #efe7dd;
--secondary-cta-text: #2b180a;
--accent: #94877c;
--background-accent: #afa094;
/* text sizing - set by ThemeProvider */
/* --text-2xs: clamp(0.465rem, 0.62vw, 0.62rem);