Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/components/carbon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useLocation } from "@docusaurus/router";
import React, { useEffect } from "react";

export function Carbon() {
export function Carbon({ sidebar = false }: { sidebar?: boolean } = {}) {
const ref = React.useRef<HTMLDivElement>(null!);
const location = useLocation();
if (process.env.NODE_ENV === "development") {
Expand Down Expand Up @@ -85,7 +85,9 @@ export function Carbon() {
data-visual-test="blackout"
id="carbonads"
data-selector="carbonads"
className="bg-background flex flex-col m-4 space-y-2 carbonads argos-ignore"
className={`bg-background flex flex-col carbonads argos-ignore ${
sidebar ? "mt-6 mb-4 mx-0" : "m-4 space-y-2"
}`}
/>
</>
);
Expand Down
4 changes: 0 additions & 4 deletions src/theme/DocPaginator/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { WrapperProps } from "@docusaurus/types";
import { Carbon } from "@site/src/components/carbon";
import DocPaginator from "@theme-original/DocPaginator";
import type DocPaginatorType from "@theme/DocPaginator";
import { type ReactNode } from "react";
Expand All @@ -10,9 +9,6 @@ export default function DocPaginatorWrapper(props: Props): ReactNode {
return (
<>
<DocPaginator {...props} />
<div className="max-w-80">
<Carbon />
</div>
</>
);
}
2 changes: 1 addition & 1 deletion src/theme/TOCItems/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function TOCItemsWrapper(props: Props): ReactNode {
return (
<>
<TOCItems {...props} />
<Carbon />
<Carbon sidebar={true} />
</>
);
}
Loading