Skip to content
Closed
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: 6 additions & 0 deletions docs/overviews/images/icon-page-advertisers.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/overviews/images/icon-page-dataproviders.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/overviews/images/icon-page-dsps.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/overviews/images/icon-page-publishers.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/overviews/overview-advertisers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ sidebar_position: 04
use_banner: true
banner_title: UID2 Overview for Advertisers
banner_description: Upgrade campaign activation with Unified ID 2.0.
banner_icon: 'documents'
banner_background_color: '#7085D4'
banner_background_color_dark: '#7085D4'
displayed_sidebar: sidebarAdvertisers
---

Expand Down
3 changes: 3 additions & 0 deletions docs/overviews/overview-data-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ sidebar_position: 08
use_banner: true
banner_title: UID2 Overview for Data Providers
banner_description: An identity solution for the future.
banner_icon: 'documents'
banner_background_color: '#10692E'
banner_background_color_dark: '#10692E'
displayed_sidebar: sidebarDataProviders
---

Expand Down
3 changes: 3 additions & 0 deletions docs/overviews/overview-dsps.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ sidebar_position: 06
use_banner: true
banner_title: UID2 Overview for DSPs
banner_description: Enable data strategies with a more durable identifier.
banner_icon: 'documents'
banner_background_color: '#0459FC'
banner_background_color_dark: '#0459FC'
displayed_sidebar: sidebarDSPs
---

Expand Down
4 changes: 3 additions & 1 deletion docs/overviews/overview-publishers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ sidebar_position: 02
use_banner: true
banner_title: UID2 Overview for Publishers
banner_description: Maintain audience targeting in the ever-changing advertising industry for better impression monetization and more relevance.
banner_icon: 'documents'
banner_background_color: '#035959'
banner_background_color_dark: '#035959'
displayed_sidebar: sidebarPublishers
---

import IntegratingWithSSO from '/docs/snippets/_integrating-with-sso.mdx';

import Link from '@docusaurus/Link';

As a publisher, you can benefit from the cross-device presence of Unified ID 2.0 (UID2) and take advantage of a consistent identity fabric on all your inventory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ sidebar_position: 04
use_banner: true
banner_title: 広告主向け UID2 の概要
banner_description: Unified ID 2.0 でキャンペーンのアクティベーションをアップグレードしましょう。
banner_icon: 'documents'
banner_background_color: '#7085D4'
banner_background_color_dark: '#7085D4'
displayed_sidebar: sidebarAdvertisers
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ sidebar_position: 08
use_banner: true
banner_title: データプロバイダー向け UID2 の概要
banner_description: 未来のためのIDソリューション。
banner_icon: 'documents'
banner_background_color: '#10692E'
banner_background_color_dark: '#10692E'
displayed_sidebar: sidebarDataProviders
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ sidebar_position: 06
use_banner: true
banner_title: UID2 Overview for DSPs
banner_description: より耐久性のある識別子でデータ戦略を可能に。
banner_icon: 'documents'
banner_background_color: '#0459FC'
banner_background_color_dark: '#0459FC'
displayed_sidebar: sidebarDSPs
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ sidebar_position: 02
use_banner: true
banner_title: パブリッシャー向け UID2 概要
banner_description: 変化し続ける広告業界においてオーディエンスターゲティングを維持し、より良いインプレッション収益化と関連性の向上を実現。
banner_icon: 'documents'
banner_background_color: '#035959'
banner_background_color_dark: '#035959'
displayed_sidebar: sidebarPublishers
---

Expand Down
34 changes: 28 additions & 6 deletions src/components/DocsBanner/index.tsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,54 @@
import React from "react";
import React, { CSSProperties, ComponentType, SVGProps } from "react";
import clsx from "clsx";
import styles from "./styles.module.scss";
import DocumentsSvg from "@site/static/img/documents-icon.svg";

const icons: Record<string, ComponentType<SVGProps<SVGSVGElement>>> = {
documents: DocumentsSvg,
};

type DocsBannerProps = {
title: string;
description: string;
icon?: string;
backgroundColor?: string;
backgroundColorDark?: string;
};

export default function DocsBanner({
title,
description,
icon,
backgroundColor,
backgroundColorDark,
}: DocsBannerProps): JSX.Element {
const Icon = (icon && icons[icon]) || icons.documents;

backgroundColor ||= "var(--c-dirty-socks)"; // default banner bg color
backgroundColorDark ||= "var(--c-primary-gray)"; // default banner bg color dark theme

//remove the dulpicate html <header> + h1 tags within the .markdown
React.useEffect(() => {
const header = document.querySelector(".markdown > header");
if (header) {
header.remove();
}
if (header) header.remove();
}, []);

return (
<header className={clsx(styles.docsBanner)}>
<header
className={clsx(styles.docsBanner)}
style={
{
"--bg-docs-banner": backgroundColor,
"--bg-docs-banner-dark": backgroundColorDark,
} as CSSProperties
}
>
<div className={styles.docsBannerLeft}>
<h1 className="type-gamma">{title}</h1>
<p className="type-paragraph">{description}</p>
</div>
<DocumentsSvg className={styles.icon} />

<Icon className={styles.icon} />
</header>
);
}
2 changes: 1 addition & 1 deletion src/components/DocsBanner/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
padding: 1.25rem;
display: flex;
flex-direction: column;
background-color: var(--c-dirty-socks);
background-color: var(--bg-docs-banner); // var is set in html styles
margin-bottom: 1.875rem;
align-items: center;

Expand Down
15 changes: 13 additions & 2 deletions src/theme/DocItem/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ type CustomDocFrontMatter = DocFrontMatter & {
use_banner?: boolean;
banner_title?: string;
banner_description?: string;
banner_icon?: string;
banner_background_color?: string;
banner_background_color_dark?: string;
};

/**
Expand Down Expand Up @@ -83,7 +86,15 @@ export default function DocItemLayout({ children }: Props): JSX.Element {
{docTOC.mobile}
<DocBreadcrumbs />
{useBanner && (
<DocsBanner title={bannerTitle} description={bannerDescription} />
<DocsBanner
title={bannerTitle}
description={bannerDescription}
icon={customFrontMatter.banner_icon}
backgroundColor={customFrontMatter.banner_background_color}
backgroundColorDark={
customFrontMatter.banner_background_color_dark
}
/>
)}
<DocVersionBadge />
<DocItemContent>{children}</DocItemContent>
Expand All @@ -95,4 +106,4 @@ export default function DocItemLayout({ children }: Props): JSX.Element {
{docTOC.desktop && <div className="col col--3">{docTOC.desktop}</div>}
</div>
);
}
}