@vantagecompute/docusaurus-theme 0.2.3 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/css/custom.css +17 -0
- package/src/theme/Navbar/Logo/index.jsx +19 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vantagecompute/docusaurus-theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Shared Vantage Compute Docusaurus theme — design system, brand assets, and common theme overrides for all vantagecompute documentation sites.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.cjs",
|
package/src/css/custom.css
CHANGED
|
@@ -1881,6 +1881,23 @@ article {
|
|
|
1881
1881
|
}
|
|
1882
1882
|
|
|
1883
1883
|
|
|
1884
|
+
/* ── Navbar version badge ──────────────────────────────────────────── */
|
|
1885
|
+
.navbar__brand-with-version {
|
|
1886
|
+
display: flex;
|
|
1887
|
+
align-items: center;
|
|
1888
|
+
gap: 0;
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
.navbar__version-badge {
|
|
1892
|
+
font-size: 0.7rem;
|
|
1893
|
+
font-weight: 500;
|
|
1894
|
+
opacity: 0.55;
|
|
1895
|
+
color: var(--vantage-navbar-text);
|
|
1896
|
+
white-space: nowrap;
|
|
1897
|
+
letter-spacing: 0.01em;
|
|
1898
|
+
padding-left: 6px;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1884
1901
|
/* Chat sidebar - push layout (navbar excluded) */
|
|
1885
1902
|
.main-wrapper {
|
|
1886
1903
|
transition: margin-right 0.3s ease-in-out;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Logo from '@theme-original/Navbar/Logo';
|
|
3
|
+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
4
|
+
|
|
5
|
+
export default function LogoWrapper(props) {
|
|
6
|
+
const {siteConfig} = useDocusaurusContext();
|
|
7
|
+
const version = siteConfig.customFields?.projectVersion;
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<div className="navbar__brand-with-version">
|
|
11
|
+
<Logo {...props} />
|
|
12
|
+
{version && (
|
|
13
|
+
<span className="navbar__version-badge">
|
|
14
|
+
{String(version).startsWith('v') ? version : `v${version}`}
|
|
15
|
+
</span>
|
|
16
|
+
)}
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
}
|