Skip to content
Open
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
2 changes: 2 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ module.exports = {
'important',
'caution',
'impact',
'deprecated'
],
},
},
Expand All @@ -114,6 +115,7 @@ module.exports = {
'important',
'caution',
'impact',
'deprecated'
],
},
},
Expand Down
33 changes: 33 additions & 0 deletions website/src/theme/Admonition/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,28 @@ function ImpactIcon() {
</svg>
)
}

function DeprecatedIcon() {
return (
<svg
width="800px"
height="800px"
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<path
fill="#444"
d="M4 2c0-1.1-0.9-2-2-2s-2 0.9-2 2c0 0.7 0.4 1.4 1 1.7v12.3h2v-12.3c0.6-0.3 1-1 1-1.7z"
/>
<path
fill="#444"
d="M4 4c0 0 1-3 3.6-3 2.7 0 2.3 1 4.4 1 2.4 0 4-1 4-1v8c0 0-0.7 2-4 2-2.2 0-2.3-1-5-1-2.3 0-3 2-3 2v-8z"
/>
</svg>
)
}

// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
const AdmonitionConfigs = {
note: {
Expand Down Expand Up @@ -129,6 +151,17 @@ const AdmonitionConfigs = {
</Translate>
),
},
deprecated: {
infimaClassName: 'deprecated',
iconComponent: DeprecatedIcon,
label: (
<Translate
id="theme.admonition.impact"
description="The default label used for the Deprecated admonition (:::deprecated)">
Deprecated
</Translate>
),
},
};
// Legacy aliases, undocumented but kept for retro-compatibility
const aliases = {
Expand Down
6 changes: 6 additions & 0 deletions website/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ body {
--ifm-alert-foreground-color: rgb(66,69,73);
--ifm-alert-border-color: #FF6121;
}
.alert--deprecated {
--ifm-alert-background-color: var(--ifm-color-danger-contrast-background);
--ifm-alert-background-color-highlight: rgba(250, 56, 62, 0.15);
--ifm-alert-foreground-color: var(--ifm-color-danger-contrast-foreground);
--ifm-alert-border-color: var(--ifm-color-danger-dark);
}
.button.button--secondary {
color: var(--wm-secondary-text-color);
background-color:var(--wm-secondary-bg-color);
Expand Down