Skip to content

Commit 396f804

Browse files
ZPain8464kenjenkins
authored andcommitted
Docs: add enterprise admonition (#1198)
* adds enterprise admonition * adds inline styling * adds styling to component * swaps material ui icon * adds enterprise admonition examples * swaps mui icon and deletes gif example * adds dark mode colors * updates dark mode palette * simplify dark mode styling * updates hex code --------- Co-authored-by: Kenneth Jenkins <[email protected]>
1 parent 7f7de70 commit 396f804

File tree

5 files changed

+66
-2
lines changed

5 files changed

+66
-2
lines changed

content/docs/capabilities/branding.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Add custom colors, logos, and error messages.
55

66
# Custom Branding / White Labeling
77

8-
:::tip
8+
:::enterprise Pomerium Enterprise
99

1010
This article describes a use case available to [Pomerium Enterprise](/docs/deploy/enterprise/install) customers.
1111

content/docs/capabilities/original-request-context.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: This article describes how the original user context is passed seco
77

88
# Original User Context
99

10-
:::tip
10+
:::enterprise Pomerium Enterprise
1111

1212
This article describes a use case available to [Pomerium Enterprise](/docs/deploy/enterprise/install) customers.
1313

docusaurus.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ const config = {
3737
routeBasePath: '/',
3838
sidebarPath: require.resolve('./sidebars.js'),
3939
editUrl: 'https://github.com/pomerium/documentation/tree/main',
40+
admonitions: {
41+
keywords: ['note', 'tip', 'info', 'caution', 'danger', 'enterprise'],
42+
extendDefaults: true,
43+
},
4044
},
4145
theme: {
4246
customCss: require.resolve('./src/css/custom.css'),

src/theme/Admonition/Types.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import DefaultAdmonitionTypes from '@theme-original/Admonition/Types';
2+
import BusinessIcon from '@mui/icons-material/Business';
3+
4+
import styles from './styles.module.css';
5+
6+
function EnterpriseAdmonition(props) {
7+
return (
8+
<div className={styles.enterprise}>
9+
<div className={styles.enterprise_header}>
10+
<BusinessIcon />
11+
<h5>{props.title}</h5>
12+
</div>
13+
{props.children}
14+
</div>
15+
);
16+
}
17+
18+
const AdmonitionTypes = {
19+
...DefaultAdmonitionTypes,
20+
'enterprise': EnterpriseAdmonition,
21+
}
22+
23+
export default AdmonitionTypes;
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.enterprise {
2+
border: #ededed 1px solid;
3+
border-left: #6F43E7 solid 4px;
4+
border-radius: 10px;
5+
margin: 0 0 16px 0;
6+
padding: 16px;
7+
background-color: #f6f3ff;
8+
}
9+
[data-theme='dark'] .enterprise {
10+
border-color: #612fea;
11+
border-left-color: #ece5ff;
12+
background-color: #4d25bb;
13+
}
14+
15+
.enterprise > :last-child {
16+
margin-bottom: 0;
17+
}
18+
19+
.enterprise_header {
20+
display: flex;
21+
align-items: center;
22+
margin-bottom: 1em;
23+
}
24+
25+
.enterprise_header h5 {
26+
margin: 0 5px;
27+
font-size: 16px;
28+
color: #6F43E7;
29+
}
30+
[data-theme='dark'] .enterprise_header h5 {
31+
color: #ECE5FF;
32+
}
33+
34+
[data-theme='dark'] .enterprise a {
35+
color: #f1e8f9;
36+
font-weight: bold;
37+
}

0 commit comments

Comments
 (0)