@vantagecompute/docusaurus-theme 0.5.0 → 0.5.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vantagecompute/docusaurus-theme",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.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
|
@@ -2015,15 +2015,6 @@ article {
|
|
|
2015
2015
|
}
|
|
2016
2016
|
}
|
|
2017
2017
|
|
|
2018
|
-
/* A site with no navbar.title still gets the version badge, alone in the
|
|
2019
|
-
centre. Between 997 and 1024 that is a bare git hash beside the logo on a
|
|
2020
|
-
tablet; hide it there. On wider screens the lone centred badge stays. */
|
|
2021
|
-
@media (max-width: 1024px) {
|
|
2022
|
-
.navbar__center-title:not(:has(.navbar__center-title-text)) {
|
|
2023
|
-
display: none;
|
|
2024
|
-
}
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
2018
|
/* ── Tablet landscape (997 to 1199) ────────────────────────────────── */
|
|
2028
2019
|
/* Docusaurus treats this band as desktop: a 300px sidebar, a right-hand TOC
|
|
2029
2020
|
column and the article between them. At 1024 the article is 505px and the
|
|
@@ -11,7 +11,12 @@ export function useVantageNavbar() {
|
|
|
11
11
|
const {siteConfig} = useDocusaurusContext();
|
|
12
12
|
const {variant, logoHref, navbarLinks} = usePluginData('@vantagecompute/docusaurus-theme');
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// The developer navbar names the project beside its version, which is how
|
|
15
|
+
// a reader confirms they are on the version they think they are. The public
|
|
16
|
+
// navbar is logo-only: no title and no version badge, even when the site
|
|
17
|
+
// sets customFields.projectVersion.
|
|
18
|
+
const developer = variant === 'developer';
|
|
19
|
+
const raw = developer ? siteConfig.customFields?.projectVersion : null;
|
|
15
20
|
const version = raw
|
|
16
21
|
? String(raw).startsWith('v')
|
|
17
22
|
? String(raw)
|
|
@@ -22,10 +27,7 @@ export function useVantageNavbar() {
|
|
|
22
27
|
variant,
|
|
23
28
|
logoHref,
|
|
24
29
|
links: navbarLinks,
|
|
25
|
-
|
|
26
|
-
// how a reader confirms they are on the version they think they are.
|
|
27
|
-
// The public navbar is logo-only.
|
|
28
|
-
title: variant === 'developer' ? siteConfig.title : null,
|
|
30
|
+
title: developer ? siteConfig.title : null,
|
|
29
31
|
version,
|
|
30
32
|
};
|
|
31
33
|
}
|