diff --git a/website/docs/community/office-hours.mdx b/website/docs/community/office-hours.mdx index d7edb21dc6..8d15c819c5 100644 --- a/website/docs/community/office-hours.mdx +++ b/website/docs/community/office-hours.mdx @@ -1,19 +1,11 @@ --- title: Office Hours +hide_title: true sidebar_position: 3 sidebar_label: Office Hours description: Office Hours with Cloud Posse id: office-hours --- -import HubspotForm from 'react-hubspot-form' +import CloudPosseOfficeHoursEmbed from '@site/src/components/CloudPosseOfficeHoursEmbed'; -# Office Hours Registration - - console.log('Submit!')} - onReady={(form) => console.log('Form ready!')} - loading={
Loading...
} -/> + diff --git a/website/docs/community/slack.mdx b/website/docs/community/slack.mdx index 01252fa053..2e49a80650 100644 --- a/website/docs/community/slack.mdx +++ b/website/docs/community/slack.mdx @@ -5,20 +5,10 @@ sidebar_label: Slack description: Cloud Posse's SweetOps Slack Community id: slack --- +import CloudPosseSlackEmbed from '@site/src/components/CloudPosseSlackEmbed'; ## Join our Slack Community! Atmos has a great community of active users who are all more than willing to help each other out. So, join us! - + diff --git a/website/src/components/CloudPosseOfficeHoursEmbed/index.tsx b/website/src/components/CloudPosseOfficeHoursEmbed/index.tsx new file mode 100644 index 0000000000..ba733bdb20 --- /dev/null +++ b/website/src/components/CloudPosseOfficeHoursEmbed/index.tsx @@ -0,0 +1,40 @@ +import React, { useEffect, useState } from 'react'; + +export default function CloudPosseOfficeHoursEmbed(): JSX.Element { + const [theme, setTheme] = useState<'light' | 'dark'>('dark'); + + useEffect(() => { + const checkTheme = () => { + const currentTheme = document.documentElement.getAttribute('data-theme'); + setTheme(currentTheme === 'dark' ? 'dark' : 'light'); + }; + + checkTheme(); + + // Watch for theme changes + const observer = new MutationObserver(checkTheme); + observer.observe(document.documentElement, { + attributes: true, + attributeFilter: ['data-theme'], + }); + + return () => observer.disconnect(); + }, []); + + const src = `https://cloudposse.com/embed/office-hours?theme=${theme}&bg=transparent&utm_source=atmos-docs&utm_medium=embed&utm_campaign=office-hours&utm_content=community-page`; + + return ( +