Skip to content

Commit afdc723

Browse files
docs: restyle the site according to new brand DOC-1587 (#5772) (#5814)
* docs: change logos and theme colors DOC-1587 * docs: further styling * docs: style packs component * docs: style cve table * docs: style getting started cards * docs: change font * docs: adjust size of logo and points of interest * ci: auto-formatting prettier issues * Optimised images with calibre/image-actions * docs: style tooltips * docs: change color of privacy link * docs: update background color * docs: update styles * docs: remove tags from underlines * docs: fix navbar color and add 10% opacity to admonitions * docs: style packs * docs: fix underlines for admonition hyperlinks --------- Co-authored-by: vault-token-factory-spectrocloud[bot] <133815545+vault-token-factory-spectrocloud[bot]@users.noreply.github.com> Co-authored-by: Ben Radstone <[email protected]> Co-authored-by: Ben Radstone <[email protected]> (cherry picked from commit 0d6a273) Co-authored-by: Adelina Simion <[email protected]>
1 parent a480608 commit afdc723

35 files changed

+289
-197
lines changed

docusaurus.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,14 @@ const config = {
294294
maxHeadingLevel: 3,
295295
},
296296
// Replace with your project's social card
297-
image: "img/spectro-cloud-social-card.png",
297+
image: "img/spectrocloud-social-card.png",
298298
navbar: {
299299
title: "",
300300
logo: {
301301
href: "/",
302302
target: "self",
303-
width: 144,
304-
height: 36,
303+
width: 105,
304+
height: 48,
305305
alt: "Spectro cloud logo",
306306
src: "img/spectrocloud-logo-light.svg",
307307
srcDark: "img/spectrocloud-logo-dark.svg",

sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
const privacyIconSVG = `
1515
<svg style="margin-right: 20px;" role="img" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 576 512">
16-
<path fill="#aeb1be" d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"/>
16+
<path fill="#1f7a78" d="M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"/>
1717
</svg>
1818
`;
1919

src/components/CustomTable/CustomTable.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
border-radius: 50%;
2020
border: 8px solid;
2121
border-color: #e8ebee;
22-
border-right-color: #528cdd;
22+
border-right-color: var(--ifm-color-primary);
2323
animation: spin 1s infinite linear;
2424
}
2525

src/components/CveReportsTable/CveReportsTable.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@ export default function CveReportsTable() {
109109
const [activeTabKey, setActiveTabKey] = useState("palette");
110110
const { colorMode } = useColorMode();
111111
const { defaultAlgorithm, darkAlgorithm } = theme;
112+
const isDark = colorMode === "dark";
113+
const customTheme = {
114+
algorithm: isDark ? darkAlgorithm : defaultAlgorithm, // Start with the default dark theme
115+
token: {
116+
colorBgContainer: isDark ? "#012121" : "#F3F0EE",
117+
colorPrimary: isDark ? "#44B2AF" : "#1F7A78",
118+
},
119+
};
112120

113121
useEffect(() => {
114122
if (isBrowser) {
@@ -172,11 +180,7 @@ export default function CveReportsTable() {
172180
key: "cve",
173181
sorter: (a, b) => a.metadata.cve.localeCompare(b.metadata.cve),
174182
render: (cve: string, record) => {
175-
return (
176-
<Link to={`/security-bulletins/reports/${record.metadata.uid.toLowerCase()}`} style={{ color: "#1890ff" }}>
177-
{cve}
178-
</Link>
179-
);
183+
return <Link to={`/security-bulletins/reports/${record.metadata.uid.toLowerCase()}`}>{cve}</Link>;
180184
},
181185
},
182186
{
@@ -281,7 +285,7 @@ export default function CveReportsTable() {
281285

282286
return (
283287
<div className={styles.tabPane}>
284-
<ConfigProvider theme={{ algorithm: colorMode === "dark" ? darkAlgorithm : defaultAlgorithm }}>
288+
<ConfigProvider theme={customTheme}>
285289
<div className={styles.unsupportedMessage}>
286290
<Admonition type="warning" title="Unsupported Display Size">
287291
The current screen size is not supported. Use a larger display to access the CVE table.

src/components/PacksReadme/PacksReadme.antd.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ p {
77
font-size: 16px;
88
}
99
[data-theme="dark"] .ant-select-tree-list-holder-inner {
10-
background-color: #1f1f1f;
11-
color: whitesmoke;
10+
background-color: #012121;
11+
color: var(--ifm-font-color-base);
1212
}

src/components/PacksReadme/PacksReadme.module.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,29 +133,29 @@
133133
}
134134
}
135135
[data-theme="dark"] .description {
136-
background-color: #1c202b;
136+
background-color: #012121;
137137
}
138138
[data-theme="light"] .description {
139-
background-color: #edeef4;
139+
background-color: #bfe3e2;
140140
}
141141
[data-theme="dark"] .packDescSecondCol {
142-
background-color: black;
143-
border: 1px solid #1f263c;
142+
background-color: #161514;
143+
border: 1px solid var(--ifm-primary-color);
144144
}
145145
[data-theme="light"] .packDescSecondCol {
146-
background-color: white;
146+
background-color: #f3f0ee;
147147
border: 1px solid #dee1ea;
148148
}
149149
[data-theme="light"] .emptyContentDescription {
150150
color: #545f7e;
151151
}
152152
[data-theme="dark"] .emptyContentDescription {
153153
color: #b5bdd4;
154-
background-color: #111726;
154+
background-color: var(--ifm-background-color);
155155
}
156156
[data-theme="dark"] .emptyContentTitle {
157157
color: #b5bdd4;
158-
background-color: #111726;
158+
background-color: var(--ifm-background-color);
159159
}
160160
[data-theme="light"] .emptyContentTitle {
161161
color: #545f7e;

src/components/PointOfInterest/PointOfInterest.module.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
width: 24px;
1515
height: 24px;
1616
border-radius: 50%;
17-
background: #2682fa;
17+
background: var(--ifm-color-primary);
1818
box-shadow:
1919
0 0 10px rgba(0, 0, 0, 0.3),
2020
inset 0 1px 0 rgba(255, 255, 255, 0.3);
@@ -35,7 +35,7 @@
3535
animation: pulse 1s infinite;
3636
}
3737
&.isVisited {
38-
background: #475f74;
38+
background: var(--ifm-color-primary-darker);
3939
&::after {
4040
animation: none;
4141
}
@@ -49,15 +49,15 @@
4949
@keyframes pulse {
5050
0% {
5151
transform: scale(1);
52-
box-shadow: inset 0 0 1px 1px rgba(38, 130, 250, 0.8);
52+
box-shadow: inset 0 0 1px 1px var(--ifm-color-primary-dark);
5353
}
5454

5555
50% {
56-
box-shadow: inset 0 0 1px 1px rgba(38, 130, 250, 0.8);
56+
box-shadow: inset 0 0 1px 1px var(--ifm-color-primary-dark);
5757
}
5858

5959
100% {
6060
transform: scale(1.6);
61-
box-shadow: inset 0 0 1px 1px rgba(38, 130, 250, 0);
61+
box-shadow: inset 0 0 1px 1px var(--ifm-color-primary-dark);
6262
}
6363
}

src/components/PointOfInterest/PointOfInterest.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function Point({ description, tooltipPlacement = "right", x, y, label, wrapRef }
2121
getPopupContainer={(triggerNode) => wrapRef.current || triggerNode}
2222
trigger={["click"]}
2323
title={description}
24-
color="#091e3b"
24+
color="#012121"
2525
placement={tooltipPlacement as TooltipPlacement}
2626
>
2727
<div

src/components/SimpleCardGrid/SimpleCardGrid.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
grid-gap: 32px;
44
grid-template-columns: 1fr 1fr;
55
grid-template-rows: 2fr;
6+
7+
a {
8+
text-decoration: none;
9+
}
610
}
711

812
.simpleCard {

src/components/Technologies/CategorySelector/CustomLabel.module.scss

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@
55
padding-top: 5px;
66
padding-left: 5px;
77
padding-right: 5px;
8-
}
9-
[data-theme="dark"] .customLabel {
10-
color: white;
11-
background-color: #1c202b;
12-
}
13-
14-
[data-theme="light"] .customLabel {
15-
color: black;
16-
background-color: #dee1ea;
8+
color: var(--ifm-font-color-base);
9+
background-color: var(--ifm-dropdown-background-color);
1710
}

0 commit comments

Comments
 (0)