Skip to content

Commit 5d1bd3f

Browse files
authored
Revert "ibg-TTD-786-banner-tables"
1 parent 8e1aa1d commit 5d1bd3f

File tree

7 files changed

+20
-67
lines changed

7 files changed

+20
-67
lines changed

docs/overviews/overview-publishers.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ sidebar_position: 02
66
use_banner: true
77
banner_title: UID2 Overview for Publishers
88
banner_description: Maintain audience targeting in the ever-changing advertising industry for better impression monetization and more relevance.
9-
banner_icon: 'documents'
10-
banner_background_color: ''
11-
banner_background_color_dark: ''
129
displayed_sidebar: sidebarPublishers
1310
---
1411

package-lock.json

Lines changed: 10 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
},
5252
"overrides": {
5353
"body-parser@1": "1.20.3",
54-
"path-to-regexp@0": "0.1.12",
54+
"path-to-regexp@0": "0.1.10",
5555
"path-to-regexp@1": "1.9.0",
5656
"path-to-regexp@2": "8.0.0"
5757
},
Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,32 @@
1-
import React, { CSSProperties, ComponentType, SVGProps } from "react";
1+
import React from "react";
22
import clsx from "clsx";
33
import styles from "./styles.module.scss";
44
import DocumentsSvg from "@site/static/img/documents-icon.svg";
55

6-
const icons: Record<string, ComponentType<SVGProps<SVGSVGElement>>> = {
7-
documents: DocumentsSvg,
8-
};
9-
106
type DocsBannerProps = {
117
title: string;
128
description: string;
13-
icon?: string;
14-
backgroundColor?: string;
15-
backgroundColorDark?: string;
169
};
1710

1811
export default function DocsBanner({
1912
title,
2013
description,
21-
icon,
22-
backgroundColor,
23-
backgroundColorDark,
2414
}: DocsBannerProps): JSX.Element {
25-
const Icon = (icon && icons[icon]) || icons.documents;
26-
27-
backgroundColor ||= "var(--c-dirty-socks)"; // default banner bg color
28-
backgroundColorDark ||= "var(--c-primary-gray)"; // default banner bg color dark theme
29-
3015
//remove the dulpicate html <header> + h1 tags within the .markdown
3116
React.useEffect(() => {
3217
const header = document.querySelector(".markdown > header");
33-
if (header) header.remove();
18+
if (header) {
19+
header.remove();
20+
}
3421
}, []);
3522

3623
return (
37-
<header
38-
className={clsx(styles.docsBanner)}
39-
style={
40-
{
41-
"--bg-docs-banner": backgroundColor,
42-
"--bg-docs-banner-dark": backgroundColorDark,
43-
} as CSSProperties
44-
}
45-
>
24+
<header className={clsx(styles.docsBanner)}>
4625
<div className={styles.docsBannerLeft}>
4726
<h1 className="type-gamma">{title}</h1>
4827
<p className="type-paragraph">{description}</p>
4928
</div>
50-
51-
<Icon className={styles.icon} />
29+
<DocumentsSvg className={styles.icon} />
5230
</header>
5331
);
5432
}

src/components/DocsBanner/styles.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
padding: 1.25rem;
44
display: flex;
55
flex-direction: column;
6-
background-color: var(--bg-docs-banner); // var is set in html styles
6+
background-color: var(--c-dirty-socks);
77
margin-bottom: 1.875rem;
88
align-items: center;
99

@@ -34,7 +34,7 @@
3434
}
3535

3636
html[data-theme="dark"] & {
37-
background-color: var(--bg-docs-banner-dark); // var is set in html styles
37+
background-color: var(--c-primary-gray);
3838

3939
h1,
4040
p {

src/css/markdown.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
vertical-align: top;
2424
}
2525

26-
table th {
27-
text-align: left;
28-
}
29-
3026
thead {
3127
@extend .type-eta;
3228
}

src/theme/DocItem/Layout/index.tsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ type CustomDocFrontMatter = DocFrontMatter & {
2121
use_banner?: boolean;
2222
banner_title?: string;
2323
banner_description?: string;
24-
banner_icon?: string;
25-
banner_background_color?: string;
26-
banner_background_color_dark?: string;
2724
};
2825

2926
/**
@@ -86,15 +83,7 @@ export default function DocItemLayout({ children }: Props): JSX.Element {
8683
{docTOC.mobile}
8784
<DocBreadcrumbs />
8885
{useBanner && (
89-
<DocsBanner
90-
title={bannerTitle}
91-
description={bannerDescription}
92-
icon={customFrontMatter.banner_icon}
93-
backgroundColor={customFrontMatter.banner_background_color}
94-
backgroundColorDark={
95-
customFrontMatter.banner_background_color_dark
96-
}
97-
/>
86+
<DocsBanner title={bannerTitle} description={bannerDescription} />
9887
)}
9988
<DocVersionBadge />
10089
<DocItemContent>{children}</DocItemContent>

0 commit comments

Comments
 (0)