11 Commits

Author SHA1 Message Date
bec97df7b5 Merge version_2 into main
Merge version_2 into main
2026-02-27 12:20:55 +00:00
b596c9213f Update theme fonts 2026-02-27 12:20:51 +00:00
88569594f3 Update theme fonts 2026-02-27 12:20:50 +00:00
69a1286ef7 Merge version_2 into main
Merge version_2 into main
2026-02-27 12:16:26 +00:00
bbd54de8b6 Update theme fonts 2026-02-27 12:16:22 +00:00
80882a98b4 Update theme fonts 2026-02-27 12:16:21 +00:00
7c58b1745b Merge version_2 into main
Merge version_2 into main
2026-02-27 11:19:08 +00:00
09d4c25b7d Update src/app/styles/variables.css 2026-02-27 11:19:04 +00:00
93281f7f90 Update src/app/page.tsx 2026-02-27 11:19:03 +00:00
d88d326eb2 Update src/app/layout.tsx 2026-02-27 11:19:02 +00:00
0dfe88ae9e Merge version_1 into main
Merge version_1 into main
2026-02-27 11:17:01 +00:00
4 changed files with 59 additions and 81 deletions

View File

@@ -3,10 +3,10 @@ import { Source_Sans_3 } from "next/font/google";
import "./globals.css";
import { ServiceWrapper } from "@/components/ServiceWrapper";
import Tag from "@/tag/Tag";
import { Libre_Baskerville } from "next/font/google";
import { Inter } from "next/font/google";
import { DM_Sans } from "next/font/google";
const sourceSans3 = Source_Sans_3({
variable: "--font-source-sans-3", subsets: ["latin"],
});
export const metadata: Metadata = {
title: "Brew Haven - Specialty Coffee Shop | Premium Single-Origin Beans", description: "Discover Brew Haven, your destination for exceptional specialty coffee. Single-origin beans, expert baristas, and a cozy atmosphere perfect for coffee lovers.", keywords: "specialty coffee, coffee shop, single-origin beans, espresso, latte, cafe, barista", metadataBase: new URL("https://brewhaven.com"),
@@ -29,6 +29,16 @@ 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<{
@@ -37,9 +47,7 @@ export default function RootLayout({
return (
<html lang="en" suppressHydrationWarning>
<ServiceWrapper>
<body
className={`${sourceSans3.variable} antialiased`}
>
<body className={`${dmSans.variable} ${inter.variable} antialiased`}>
<Tag />
{children}
@@ -284,9 +292,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) {
@@ -314,8 +320,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,
@@ -326,8 +331,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,
@@ -340,8 +344,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
@@ -353,8 +356,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') || '';
@@ -447,13 +449,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) => {
@@ -528,8 +528,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) {
@@ -642,8 +641,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() === '') {
@@ -772,7 +770,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;
@@ -804,8 +802,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',
@@ -847,7 +844,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) {
@@ -892,8 +889,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({
@@ -976,8 +972,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);
@@ -991,8 +986,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',
@@ -1015,8 +1009,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);
@@ -1036,8 +1029,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: {}
@@ -1086,8 +1078,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 => {
@@ -1109,8 +1100,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);
@@ -1158,8 +1148,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;
@@ -1250,10 +1239,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;
@@ -1261,11 +1248,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) {
@@ -1287,8 +1272,7 @@ export default function RootLayout({
}
if (replaced) {
const elementInfo = getElementInfo(element);
let cleanOldValue = oldValue;
if (oldValue.includes('url(')) {
const urlMatch = oldValue.match(/url(['"]?([^'")]+)['"]?)/);
@@ -1359,13 +1343,7 @@ export default function RootLayout({
}
}, true);
const urlCheckInterval = setInterval(() => {
if (lastPathname !== window.location.pathname) {
lastPathname = window.location.pathname;
notifyPageChange();
}
}, 500);
notifyPageChange();
window.webildCleanup = () => {
@@ -1413,4 +1391,4 @@ export default function RootLayout({
</ServiceWrapper>
</html>
);
}
}

View File

@@ -1,4 +1,4 @@
"use client"
"use client";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple';
@@ -218,4 +218,4 @@ export default function BrewHavenPage() {
</div>
</ThemeProvider>
);
}
}

View File

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

View File

@@ -2,23 +2,23 @@
/* Base units */
/* --vw is set by ThemeProvider */
/* --background: #f5f5f5;;
--card: #ffffff;;
--foreground: #1c1c1c;;
--primary-cta: #1c1c1c;;
--secondary-cta: #ffffff;;
--accent: #e63946;;
--background-accent: #e8bea8;; */
/* --background: #080200;;
--card: #1a0d0b;;
--foreground: #ffe6d5;;
--primary-cta: #ffaa70;;
--secondary-cta: #170b07;;
--accent: #ffce93;;
--background-accent: #e8cfa8;; */
--background: #f5f5f5;;
--card: #ffffff;;
--foreground: #1c1c1c;;
--primary-cta: #1c1c1c;;
--background: #080200;;
--card: #1a0d0b;;
--foreground: #ffe6d5;;
--primary-cta: #ffaa70;;
--primary-cta-text: #f5f5f5;;
--secondary-cta: #ffffff;;
--secondary-cta: #170b07;;
--secondary-cta-text: #1c1c1c;;
--accent: #e63946;;
--background-accent: #e8bea8;;
--accent: #ffce93;;
--background-accent: #e8cfa8;;
/* text sizing - set by ThemeProvider */
/* --text-2xs: clamp(0.465rem, 0.62vw, 0.62rem);