Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 88b36f4f31 | |||
| 8c08fbd3db | |||
| 1328b40bfb | |||
| 8dbda844cb | |||
| 0704f001ac | |||
| 2647d4ad84 | |||
| 5051b1e376 |
@@ -3,10 +3,9 @@ import { Mulish } 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 { Roboto } from "next/font/google";
|
||||||
|
import { Archivo } from "next/font/google";
|
||||||
|
|
||||||
const mulish = Mulish({
|
|
||||||
variable: "--font-mulish", subsets: ["latin"],
|
|
||||||
});
|
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "Marketing Agency | AgencyPro - Brand Strategy & Digital Growth", description: "Transform your brand with AgencyPro. Strategic marketing, creative design, and digital growth solutions for ambitious companies.", keywords: ["marketing agency", "brand strategy", "digital marketing", "creative design", "branding", "growth marketing", "social media marketing"],
|
title: "Marketing Agency | AgencyPro - Brand Strategy & Digital Growth", description: "Transform your brand with AgencyPro. Strategic marketing, creative design, and digital growth solutions for ambitious companies.", keywords: ["marketing agency", "brand strategy", "digital marketing", "creative design", "branding", "growth marketing", "social media marketing"],
|
||||||
@@ -28,6 +27,12 @@ export const metadata: Metadata = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const archivo = Archivo({
|
||||||
|
variable: "--font-archivo",
|
||||||
|
subsets: ["latin"],
|
||||||
|
});
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
children,
|
children,
|
||||||
}: Readonly<{
|
}: Readonly<{
|
||||||
@@ -36,9 +41,7 @@ export default function RootLayout({
|
|||||||
return (
|
return (
|
||||||
<html lang="en" suppressHydrationWarning>
|
<html lang="en" suppressHydrationWarning>
|
||||||
<ServiceWrapper>
|
<ServiceWrapper>
|
||||||
<body
|
<body className={`${archivo.variable} antialiased`}>
|
||||||
className={`${mulish.variable} antialiased`}
|
|
||||||
>
|
|
||||||
<Tag />
|
<Tag />
|
||||||
{children}
|
{children}
|
||||||
|
|
||||||
@@ -283,8 +286,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 {
|
||||||
@@ -313,7 +314,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,
|
||||||
@@ -325,7 +325,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,
|
||||||
@@ -339,7 +338,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,
|
||||||
@@ -352,7 +350,6 @@ export default function RootLayout({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const elementType = getElementType(element);
|
|
||||||
info.elementType = elementType;
|
info.elementType = elementType;
|
||||||
|
|
||||||
if (elementType === 'Button') {
|
if (elementType === 'Button') {
|
||||||
@@ -446,12 +443,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';
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -527,7 +522,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
|
||||||
@@ -641,7 +635,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
|
||||||
@@ -771,7 +764,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;
|
||||||
@@ -803,7 +796,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({
|
||||||
@@ -846,7 +838,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) {
|
||||||
@@ -891,7 +883,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);
|
||||||
|
|
||||||
@@ -975,7 +966,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;
|
||||||
|
|
||||||
@@ -990,7 +980,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({
|
||||||
@@ -1014,7 +1003,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 => {
|
||||||
@@ -1035,7 +1023,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',
|
||||||
@@ -1085,7 +1072,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);
|
||||||
@@ -1108,7 +1094,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') {
|
||||||
@@ -1157,7 +1142,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;
|
||||||
}
|
}
|
||||||
@@ -1249,9 +1233,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 {
|
||||||
@@ -1260,10 +1242,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 {
|
||||||
@@ -1286,7 +1266,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(')) {
|
||||||
@@ -1358,12 +1337,6 @@ export default function RootLayout({
|
|||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
const urlCheckInterval = setInterval(() => {
|
|
||||||
if (lastPathname !== window.location.pathname) {
|
|
||||||
lastPathname = window.location.pathname;
|
|
||||||
notifyPageChange();
|
|
||||||
}
|
|
||||||
}, 500);
|
|
||||||
|
|
||||||
notifyPageChange();
|
notifyPageChange();
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ export default function LandingPage() {
|
|||||||
{ imageSrc: "http://img.b2bpic.net/free-photo/people-stand-high-five-office_482257-119247.jpg", imageAlt: "Marketing strategy session" },
|
{ imageSrc: "http://img.b2bpic.net/free-photo/people-stand-high-five-office_482257-119247.jpg", imageAlt: "Marketing strategy session" },
|
||||||
{ imageSrc: "http://img.b2bpic.net/free-photo/designer-desk-architectural-tools-notebook-working-place-concept_53876-123770.jpg", imageAlt: "Creative design workspace" },
|
{ imageSrc: "http://img.b2bpic.net/free-photo/designer-desk-architectural-tools-notebook-working-place-concept_53876-123770.jpg", imageAlt: "Creative design workspace" },
|
||||||
{ imageSrc: "http://img.b2bpic.net/free-photo/empty-startup-office-displays-statistics_482257-119484.jpg", imageAlt: "Digital marketing analytics" },
|
{ imageSrc: "http://img.b2bpic.net/free-photo/empty-startup-office-displays-statistics_482257-119484.jpg", imageAlt: "Digital marketing analytics" },
|
||||||
{ imageSrc: "http://img.b2bpic.net/free-photo/business-associates-reviewing-key-performance-indicators-within-enterprise_482257-122792.jpg", imageAlt: "Team collaboration meeting" }
|
{ imageSrc: "http://img.b2bpic.net/free-photo/business-associates-reviewing-key-performance-indicators-within-enterprise_482257-122792.jpg", imageAlt: "Team collaboration meeting" },
|
||||||
|
{ imageSrc: "http://img.b2bpic.net/free-photo/close-up-accounting-sales-statistics-computer-display_482257-122982.jpg?_wi=1", imageAlt: "Analytics dashboard overview" }
|
||||||
]}
|
]}
|
||||||
mediaAnimation="slide-up"
|
mediaAnimation="slide-up"
|
||||||
ariaLabel="Marketing agency hero section"
|
ariaLabel="Marketing agency hero section"
|
||||||
@@ -193,7 +194,7 @@ export default function LandingPage() {
|
|||||||
tagAnimation="slide-up"
|
tagAnimation="slide-up"
|
||||||
metrics={[
|
metrics={[
|
||||||
{
|
{
|
||||||
id: "1", value: "3.5x", title: "Average ROI Growth", description: "Across all client campaigns in 2024", imageSrc: "http://img.b2bpic.net/free-photo/close-up-accounting-sales-statistics-computer-display_482257-122982.jpg", imageAlt: "Analytics dashboard showing growth"
|
id: "1", value: "3.5x", title: "Average ROI Growth", description: "Across all client campaigns in 2024", imageSrc: "http://img.b2bpic.net/free-photo/close-up-accounting-sales-statistics-computer-display_482257-122982.jpg?_wi=2", imageAlt: "Analytics dashboard showing growth"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "2", value: "87%", title: "Conversion Rate Improvement", description: "Through optimized marketing funnels", imageSrc: "http://img.b2bpic.net/free-photo/analyzing-business-chart_1098-19461.jpg", imageAlt: "Success metrics visualization"
|
id: "2", value: "87%", title: "Conversion Rate Improvement", description: "Through optimized marketing funnels", imageSrc: "http://img.b2bpic.net/free-photo/analyzing-business-chart_1098-19461.jpg", imageAlt: "Success metrics visualization"
|
||||||
|
|||||||
@@ -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-mulish), sans-serif;
|
font-family: var(--font-archivo), 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-mulish), sans-serif;
|
font-family: var(--font-archivo), sans-serif;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user