7 Commits

Author SHA1 Message Date
59bad181cd Update theme fonts 2026-02-23 20:41:57 +00:00
7a4ab233ca Update theme fonts 2026-02-23 20:41:56 +00:00
b77ea5300e Update theme colors 2026-02-23 20:41:22 +00:00
43c3276388 Update src/app/page.tsx 2026-02-23 20:40:46 +00:00
de398b9a9c Update src/app/page.tsx 2026-02-23 20:40:22 +00:00
84878ee028 Bob AI: Move productcatalog section to /for page 2026-02-23 20:29:21 +00:00
5eadec6f09 Bob AI: Can you add a section where I sell products of ten... 2026-02-23 20:24:58 +00:00
5 changed files with 139 additions and 80 deletions

81
src/app/for/page.tsx Normal file
View File

@@ -0,0 +1,81 @@
"use client";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import ProductCatalog from "@/components/ecommerce/productCatalog/ProductCatalog";
export default function ForPage() {
return (
<ThemeProvider defaultButtonVariant="directional-hover"
defaultTextAnimation="background-highlight"
borderRadius="pill"
contentWidth="medium"
sizing="mediumLarge"
background="aurora"
cardStyle="gradient-bordered"
primaryButtonStyle="inset-glow"
secondaryButtonStyle="layered"
headingFontWeight="semibold">
<main>
<div id="productcatalog" data-section="productcatalog">
<ProductCatalog
layout="section"
products={[
{
id: "1",
name: "Pro Tennis Racket",
price: 299.99,
imageSrc: "https://img.b2bpic.net/free-photo/abstract-luxury-gradient-blue-background_53876-120942.jpg",
imageAlt: "Pro Tennis Racket",
rating: 4.8,
reviewCount: 124,
category: "Rackets",
onProductClick: () => {}
},
{
id: "2",
name: "Custom Tennis Shoes",
price: 189.99,
imageSrc: "https://img.b2bpic.net/free-photo/futuristic-moon-background_23-2150930890.jpg",
imageAlt: "Custom Tennis Shoes",
rating: 4.9,
reviewCount: 89,
category: "Footwear",
onProductClick: () => {}
},
{
id: "3",
name: "Performance Tennis Apparel",
price: 129.99,
imageSrc: "https://img.b2bpic.net/free-photo/futuristic-city-architecture_23-2151918947.jpg",
imageAlt: "Performance Tennis Apparel",
rating: 4.7,
reviewCount: 156,
category: "Apparel",
onProductClick: () => {}
},
{
id: "4",
name: "Professional Tennis Bag",
price: 159.99,
imageSrc: "https://img.b2bpic.net/free-photo/futuristic-moon-background_23-2150930734.jpg",
imageAlt: "Professional Tennis Bag",
rating: 4.6,
reviewCount: 72,
category: "Accessories",
onProductClick: () => {}
}
]}
searchPlaceholder="Search custom tennis gear..."
emptyMessage="No tennis products available"
className="w-full"
gridClassName="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6"
cardClassName="bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow"
imageClassName="w-full h-64 object-cover rounded-t-lg"
searchClassName="mb-8"
toolbarClassName="flex flex-col gap-4 mb-8"
/>
</div>
</main>
</ThemeProvider>
);
}

View File

@@ -3,15 +3,24 @@ import { Plus_Jakarta_Sans } 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 { Libre_Baskerville } from "next/font/google";
import { Inter } from "next/font/google";
const plusJakartaSans = Plus_Jakarta_Sans({
variable: "--font-plus-jakarta-sans", subsets: ["latin"],
});
export const metadata: Metadata = { export const metadata: Metadata = {
title: "Champion's Journey | Professional Tennis Player", description: "Witness the inspiring career of a professional tennis player. Explore training excellence, career highlights, and upcoming tournaments with exclusive insights into grand slam glory.", keywords: ["professional tennis", "tennis player", "grand slam", "training regimen", "sports career"] title: "Champion's Journey | Professional Tennis Player", description: "Witness the inspiring career of a professional tennis player. Explore training excellence, career highlights, and upcoming tournaments with exclusive insights into grand slam glory.", keywords: ["professional tennis", "tennis player", "grand slam", "training regimen", "sports career"]
}; };
const libreBaskerville = Libre_Baskerville({
variable: "--font-libre-baskerville",
subsets: ["latin"],
weight: ["400", "700"],
});
const inter = Inter({
variable: "--font-inter",
subsets: ["latin"],
});
export default function RootLayout({ export default function RootLayout({
children, children,
}: Readonly<{ }: Readonly<{
@@ -20,9 +29,7 @@ export default function RootLayout({
return ( return (
<html lang="en" suppressHydrationWarning> <html lang="en" suppressHydrationWarning>
<ServiceWrapper> <ServiceWrapper>
<body <body className={`${libreBaskerville.variable} ${inter.variable} antialiased`}>
className={`${plusJakartaSans.variable} antialiased`}
>
<Tag /> <Tag />
{children} {children}
@@ -267,8 +274,6 @@ 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 {
@@ -297,7 +302,6 @@ 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,
@@ -309,7 +313,6 @@ 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,
@@ -323,7 +326,6 @@ 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,
@@ -336,7 +338,6 @@ export default function RootLayout({
} }
} }
const elementType = getElementType(element);
info.elementType = elementType; info.elementType = elementType;
if (elementType === 'Button') { if (elementType === 'Button') {
@@ -430,12 +431,10 @@ 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';
}; };
@@ -511,7 +510,6 @@ 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
@@ -625,7 +623,6 @@ 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
@@ -755,7 +752,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;
@@ -787,7 +784,6 @@ 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({
@@ -830,7 +826,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) {
@@ -875,7 +871,6 @@ 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);
@@ -959,7 +954,6 @@ 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;
@@ -974,7 +968,6 @@ 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({
@@ -998,7 +991,6 @@ 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 => {
@@ -1019,7 +1011,6 @@ 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',
@@ -1069,7 +1060,6 @@ 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);
@@ -1092,7 +1082,6 @@ 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') {
@@ -1141,7 +1130,6 @@ 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;
} }
@@ -1233,9 +1221,7 @@ 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) {
const swapped = swapMediaElement(element, 'video', newSrc);
if (selectedElement === element) selectedElement = swapped; if (selectedElement === element) selectedElement = swapped;
element = swapped; element = swapped;
} else { } else {
@@ -1244,10 +1230,8 @@ 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 {
@@ -1270,7 +1254,6 @@ 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(')) {
@@ -1342,12 +1325,6 @@ export default function RootLayout({
} }
}, true); }, true);
const urlCheckInterval = setInterval(() => {
if (lastPathname !== window.location.pathname) {
lastPathname = window.location.pathname;
notifyPageChange();
}
}, 500);
notifyPageChange(); notifyPageChange();

View File

@@ -45,7 +45,7 @@ export default function LandingPage() {
<div id="hero-section" data-section="hero-section"> <div id="hero-section" data-section="hero-section">
<HeroSplitKpi <HeroSplitKpi
title="Champion's Journey: From Court to Glory" title="Champion's Journey: From Court to Glory"
description="Witness the extraordinary rise of a professional tennis star, showcasing unparalleled dedication, strategic brilliance, and unmatched performance on the world's most prestigious courts." description=""
background={{ variant: "radial-gradient" }} background={{ variant: "radial-gradient" }}
kpis={[ kpis={[
{ value: "12", label: "Grand Slam Titles" }, { value: "12", label: "Grand Slam Titles" },
@@ -106,7 +106,7 @@ export default function LandingPage() {
features={[ features={[
{ {
id: 1, id: 1,
title: "Precision Serve Technique", description: "Master the art of the perfect serve with biomechanical analysis and real-time feedback.", imageSrc: "https://img.b2bpic.net/free-photo/full-length-portrait-fit-sportsman-stretching-hands_171337-9454.jpg", imageAlt: "Tennis player executing a precise serve" title: "Precision Serve Technique", description: "", imageSrc: "https://img.b2bpic.net/free-photo/full-length-portrait-fit-sportsman-stretching-hands_171337-9454.jpg", imageAlt: "Tennis player executing a precise serve"
}, },
{ {
id: 2, id: 2,
@@ -161,6 +161,7 @@ export default function LandingPage() {
/> />
</div> </div>
<div id="contact-section" data-section="contact-section"> <div id="contact-section" data-section="contact-section">
<ContactSplit <ContactSplit
tag="Get In Touch" tag="Get In Touch"

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-font-family: var(--font-plus-jakarta-sans), sans-serif;), sans-serif; font-family: var(--font-inter), sans-serif;), 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-font-family: var(--font-plus-jakarta-sans), sans-serif;), sans-serif; font-family: var(--font-libre-baskerville), serif;), sans-serif;
} }

View File

@@ -2,23 +2,23 @@
/* Base units */ /* Base units */
/* --vw is set by ThemeProvider */ /* --vw is set by ThemeProvider */
/* --background: #e3deea;; /* --background: #f5faff;;;
--card: #ffffff;; --card: #f1f8ff;;;
--foreground: #27231f;; --foreground: #001122;;;
--primary-cta: #27231f;; --primary-cta: #15479c;;;
--secondary-cta: #ffffff;; --secondary-cta: #ffffff;;;
--accent: #c68a62;; --accent: #a8cce8;;;
--background-accent: #c68a62;; */ --background-accent: #7ba3cf;;; */
--background: #e3deea;; --background: #f5faff;;;
--card: #ffffff;; --card: #f1f8ff;;;
--foreground: #27231f;; --foreground: #001122;;;
--primary-cta: #27231f;; --primary-cta: #15479c;;;
--primary-cta-text: #f7f6f7; --primary-cta-text: #f7f6f7;
--secondary-cta: #ffffff;; --secondary-cta: #ffffff;;;
--secondary-cta-text: #1b0c25; --secondary-cta-text: #1b0c25;
--accent: #c68a62;; --accent: #a8cce8;;;
--background-accent: #c68a62;; --background-accent: #7ba3cf;;;
/* 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);