diff --git a/.changeset/smart-lilies-invent.md b/.changeset/smart-lilies-invent.md new file mode 100644 index 0000000000000..df5a9032cd185 --- /dev/null +++ b/.changeset/smart-lilies-invent.md @@ -0,0 +1,5 @@ +--- +'@node-core/ui-components': minor +--- + +Adds a footer slot to the metabar diff --git a/apps/site/components/CarbonAds/Sidebar.tsx b/apps/site/components/CarbonAds/Sidebar.tsx new file mode 100644 index 0000000000000..30f05292e629c --- /dev/null +++ b/apps/site/components/CarbonAds/Sidebar.tsx @@ -0,0 +1,59 @@ +'use client'; + +import classNames from 'classnames'; + +import useCarbonAd, { adColors } from '#site/hooks/useCarbonAd'; +import useClientContext from '#site/hooks/useClientContext'; + +import type { FC } from 'react'; + +import styles from './index.module.css'; + +const CarbonSidebar: FC = () => { + const { frontmatter } = useClientContext(); + + // Must match where each layout's grid gives the MetaBar a right-hand column + const media = + frontmatter.layout === 'blog-post' + ? '(min-width: 896px)' + : '(min-width: 1280px)'; + + const { ad, ref } = useCarbonAd('CWBI6KJU', media); + + if (!ad) { + return null; + } + + return ( + + ); +}; + +export default CarbonSidebar; diff --git a/apps/site/components/CarbonAds/TopBar.tsx b/apps/site/components/CarbonAds/TopBar.tsx new file mode 100644 index 0000000000000..b6d06d65b4dc5 --- /dev/null +++ b/apps/site/components/CarbonAds/TopBar.tsx @@ -0,0 +1,44 @@ +'use client'; + +import useCarbonAd, { adColors } from '#site/hooks/useCarbonAd'; + +import type { FC } from 'react'; + +import styles from './index.module.css'; + +const CarbonTopBar: FC = () => { + const { ad, loading, ref } = useCarbonAd('CWBI6KJY'); + + if (!ad) { + return loading ? ( + ); };