File tree Expand file tree Collapse file tree 7 files changed +25
-4
lines changed
Expand file tree Collapse file tree 7 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ use_banner: true
77banner_title : UID2 Overview for Advertisers
88banner_description : Upgrade campaign activation with Unified ID 2.0.
99banner_icon : ' advertisers'
10+ banner_text_color : ' '
11+ banner_text_color_dark : ' '
1012banner_background_color : ' '
1113banner_background_color_dark : ' '
1214displayed_sidebar : sidebarAdvertisers
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ use_banner: true
77banner_title : UID2 Overview for Data Providers
88banner_description : An identity solution for the future.
99banner_icon : ' dataProviders'
10+ banner_text_color : ' '
11+ banner_text_color_dark : ' '
1012banner_background_color : ' '
1113banner_background_color_dark : ' '
1214displayed_sidebar : sidebarDataProviders
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ use_banner: true
77banner_title : UID2 Overview for DSPs
88banner_description : Enable data strategies with a more durable identifier.
99banner_icon : ' dsps'
10+ banner_text_color : ' '
11+ banner_text_color_dark : ' '
1012banner_background_color : ' '
1113banner_background_color_dark : ' '
1214displayed_sidebar : sidebarDSPs
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ use_banner: true
77banner_title : UID2 Overview for Publishers
88banner_description : Maintain audience targeting in the ever-changing advertising industry for better impression monetization and more relevance.
99banner_icon : ' publishers'
10+ banner_text_color : ' '
11+ banner_text_color_dark : ' '
1012banner_background_color : ' '
1113banner_background_color_dark : ' '
1214displayed_sidebar : sidebarPublishers
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ type DocsBannerProps = {
1919 title : string ;
2020 description : string ;
2121 icon ?: string ;
22+ textColor ?: string ;
23+ textColorDark ?: string ;
2224 backgroundColor ?: string ;
2325 backgroundColorDark ?: string ;
2426} ;
@@ -27,11 +29,16 @@ export default function DocsBanner({
2729 title,
2830 description,
2931 icon,
32+ textColor,
33+ textColorDark,
3034 backgroundColor,
3135 backgroundColorDark,
3236} : DocsBannerProps ) : JSX . Element {
3337 const Icon = ( icon && icons [ icon ] ) || icons . documents ;
3438
39+ textColor ||= "var(--c-eleven-o-clock)" ; // default banner text color
40+ textColorDark ||= "var(--c-off-white)" ; // default banner text color dark theme
41+
3542 backgroundColor ||= "var(--c-dirty-socks)" ; // default banner bg color
3643 backgroundColorDark ||= "var(--c-primary-gray)" ; // default banner bg color dark theme
3744
@@ -46,6 +53,8 @@ export default function DocsBanner({
4653 className = { clsx ( styles . docsBanner ) }
4754 style = {
4855 {
56+ "--text-docs-banner" : textColor ,
57+ "--text-docs-banner-dark" : textColorDark ,
4958 "--bg-docs-banner" : backgroundColor ,
5059 "--bg-docs-banner-dark" : backgroundColorDark ,
5160 } as CSSProperties
Original file line number Diff line number Diff line change 99
1010 h1 ,
1111 p {
12- color : var (--c-eleven-o-clock );
12+ color : var (--text-docs-banner ); // var is set in html styles
1313 text-align : center ;
1414
1515 @media only screen and (min-width : 996px ) {
3838
3939 h1 ,
4040 p {
41- color : var (--c-off-white );
41+ color : var (--text-docs-banner-dark ); // var is set in html styles
4242 }
4343 }
4444}
5555.icon {
5656 order : 1 ;
5757 margin-bottom : 1.3125rem ;
58- color : var (--c-eleven-o-clock );
58+ color : var (--text-docs-banner ); // var is set in html styles
5959
6060 html [data-theme = " dark" ] & {
61- color : var (--c-off-white );
61+ color : var (--text-docs-banner-dark ); // var is set in html styles
6262 }
6363
6464 @media only screen and (min-width : 996px ) {
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ type CustomDocFrontMatter = DocFrontMatter & {
2222 banner_title ?: string ;
2323 banner_description ?: string ;
2424 banner_icon ?: string ;
25+ banner_text_color ?: string ;
26+ banner_text_color_dark ?: string ;
2527 banner_background_color ?: string ;
2628 banner_background_color_dark ?: string ;
2729} ;
@@ -90,6 +92,8 @@ export default function DocItemLayout({ children }: Props): JSX.Element {
9092 title = { bannerTitle }
9193 description = { bannerDescription }
9294 icon = { customFrontMatter . banner_icon }
95+ textColor = { customFrontMatter . banner_text_color }
96+ textColorDark = { customFrontMatter . banner_text_color_dark }
9397 backgroundColor = { customFrontMatter . banner_background_color }
9498 backgroundColorDark = {
9599 customFrontMatter . banner_background_color_dark
You can’t perform that action at this time.
0 commit comments