From bdef7129a0a13f14bee0c9cc5955edcf3db43319 Mon Sep 17 00:00:00 2001 From: Leonardo Rossi Date: Thu, 17 Jul 2025 12:34:15 +0200 Subject: [PATCH 1/5] Remove Stackables Meraki and AIWarp pages Signed-off-by: Leonardo Rossi --- src/pages/AIwarp/index.js | 175 ------------------------------ src/pages/Meraki/index.js | 121 --------------------- src/pages/Stackables/index.js | 193 ---------------------------------- 3 files changed, 489 deletions(-) delete mode 100644 src/pages/AIwarp/index.js delete mode 100644 src/pages/Meraki/index.js delete mode 100644 src/pages/Stackables/index.js diff --git a/src/pages/AIwarp/index.js b/src/pages/AIwarp/index.js deleted file mode 100644 index 50731d0d2d..0000000000 --- a/src/pages/AIwarp/index.js +++ /dev/null @@ -1,175 +0,0 @@ -/* global MutationObserver */ - -import React, { useEffect } from 'react' -import { - useStoryblok, - storyblokInit, - apiPlugin -} from '@storyblok/react' -import Layout from '@theme/Layout' - -import Page from '../../components/sbComponents/Page' -import { render } from 'storyblok-rich-text-react-renderer' -import Feature from '../../components/aiwarp/Feature' -import LearnPlatformatic from '../../components/aiwarp/Learnplatformatic' - -storyblokInit({ - accessToken: process.env.STORYBLOK_ACCESS_TOKEN, - use: [apiPlugin], - components: { - page: Page - }, - apiOptions: { - region: 'eu' - } -}) - -function PageHeader ({ blok }) { - return ( -
-
-
-
-
-
- gradient -
- - - - - {render(blok.hero[0].hero_title)} - - - {render(blok.hero[0].hero_subtitle)} - - - {render(blok.hero[0].hero_subtitle2)} - -
- {blok.hero[0].cta_buttons.map((cta) => ( - - - - ))} -
-
-
-
- hero_image -
-
-
- ) -} - -export default function AIwarp () { - let slug = 'aiwarp' - const story = useStoryblok(slug, { version: 'draft' }) - - useEffect(() => { - const script = document.createElement('script') - script.src = 'https://js.hsforms.net/forms/v2.js' - document.body.appendChild(script) - - script.addEventListener('load', () => { - if (window.hbspt) { - window.hbspt.forms.create({ - portalId: '22380288', - formId: '0f01c143-e40c-46cf-ad6b-2d8b33d9a1ea', - target: '#aiwarp', - region: 'na1', - cssClass: 'light-mode', - onFormReady: function ($form) { - const iframe = document.querySelector('iframe') - if (iframe) { - const observer = new MutationObserver((mutationsList, observer) => { - for (const mutation of mutationsList) { - if (mutation.type === 'childList' && iframe.contentDocument) { - const doc = - iframe.contentDocument || iframe.contentWindow?.document - if (doc) { - // Set the background color of the iframe's body - doc.body.style.backgroundColor = '#040607' - // doc.body.style.backgroundColor = darkMode - // ? '#00050b' - // : '#FAFAFA' - - const labels = doc.querySelectorAll('label') - labels.forEach((label) => { - // label.style.color = darkMode ? 'white' : '#00050b' - label.style.color = '#ffffff' - }) - observer.disconnect() // Stop observing after labels and background are adjusted - } - } - } - }) - - observer.observe(iframe.contentDocument, { - childList: true, - subtree: true - }) - } else { - console.error('Iframe not found.') - } - } - }) - } else { - console.error('hbspt not available.') - } - }) - - script.addEventListener('error', () => { - console.error('Failed to load the script.') - }) - }, [story]) - - if (globalThis.window && globalThis.window.location.pathname !== '/') { - slug = globalThis.window.location.pathname.replace('/', '') - } - if (!story || !story.content) { - return
Loading...
- } - - return ( - - - - -
- - ) -} diff --git a/src/pages/Meraki/index.js b/src/pages/Meraki/index.js deleted file mode 100644 index 3de42e8edb..0000000000 --- a/src/pages/Meraki/index.js +++ /dev/null @@ -1,121 +0,0 @@ -import React from 'react' -import { - useStoryblok, - storyblokInit, - apiPlugin -} from '@storyblok/react' -import Layout from '@theme/Layout' - -import Page from '../../components/sbComponents/Page' -import { render } from 'storyblok-rich-text-react-renderer' -import Feature from '../../components/meraki/Feature' -import LearnPlatformatic from '../../components/aiwarp/Learnplatformatic' -import HubSpotForm from '../../components/HubSpotForm' - -storyblokInit({ - accessToken: process.env.STORYBLOK_ACCESS_TOKEN, - use: [apiPlugin], - components: { - page: Page - }, - apiOptions: { - region: 'eu' - } -}) - -function PageHeader ({ blok }) { - return ( -
-
-
-
-
-
- gradient -
- - - - - {render(blok.hero[0].hero_title)} - - - {render(blok.hero[0].hero_subtitle)} - - - {render(blok.hero[0].hero_subtitle2)} - -
- {blok.hero[0].cta_buttons.map((cta) => ( - - - - ))} -
-
-
-
- hero_image -
-
-
- ) -} - -export default function AIwarp () { - let slug = 'meraki' - if (globalThis.window && globalThis.window.location.pathname !== '/') { - slug = globalThis.window.location.pathname.replace('/', '') - } - const story = useStoryblok(slug, { version: 'draft' }) - if (!story || !story.content) { - return
Loading...
- } - - return ( - - - - -
- - - ) -} diff --git a/src/pages/Stackables/index.js b/src/pages/Stackables/index.js deleted file mode 100644 index 2d54a2fc74..0000000000 --- a/src/pages/Stackables/index.js +++ /dev/null @@ -1,193 +0,0 @@ -/* global MutationObserver */ - -import React, { useEffect } from 'react' -import { - useStoryblok, - storyblokInit, - apiPlugin -} from '@storyblok/react' -import Layout from '@theme/Layout' - -import Page from '../../components/sbComponents/Page' -import { render } from 'storyblok-rich-text-react-renderer' -import Architecture from '../../components/composer/Architecture' -import Feature from '../../components/stackables/Feature' -import TemplateMarketPlace from '../../components/stackables/TemplateMarketPlace' -import LearnPlatformatic from '../../components/stackables/Learnplatformatic' - -storyblokInit({ - accessToken: process.env.STORYBLOK_ACCESS_TOKEN, - use: [apiPlugin], - components: { - page: Page - }, - apiOptions: { - region: 'eu' - } -}) - -function PageHeader ({ blok }) { - return ( -
-
-
-
-
-
- gradient -
- - - - - {render(blok.hero[0].hero_title)} - - - {render(blok.hero[0].hero_subtitle)} - - - {render(blok.hero[0].hero_subtitle2)} - -
- {blok.hero[0].cta_buttons.map((cta) => ( - - - - ))} -
-
-
-
-