@f5-sales-demo/docs-theme 4.13.21 → 4.13.23
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/components/Banner.astro
CHANGED
|
@@ -55,7 +55,10 @@ const fixedEditUrl = editUrl ? editUrl.href.replace('/src/content/docs/', '/docs
|
|
|
55
55
|
|
|
56
56
|
<script>
|
|
57
57
|
import { installCertificateBreadcrumbOffset } from "../src/utils/breadcrumb-offset.ts";
|
|
58
|
+
import { installCertificateSidebarOrientation } from "../src/utils/certificate-sidebar.ts";
|
|
58
59
|
installCertificateBreadcrumbOffset();
|
|
60
|
+
installCertificateSidebarOrientation();
|
|
61
|
+
document.addEventListener("astro:page-load", installCertificateSidebarOrientation);
|
|
59
62
|
document.addEventListener("astro:page-load", installCertificateBreadcrumbOffset);
|
|
60
63
|
</script>
|
|
61
64
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
let menuObserver: MutationObserver | undefined;
|
|
2
|
+
|
|
3
|
+
/** Keep the current page visible after sidebar restoration or mobile menu opening. */
|
|
4
|
+
export function revealCertificateSidebar(root: Document = document): void {
|
|
5
|
+
if (!root.querySelector('.breadcrumbs[data-certificate-management]')) return;
|
|
6
|
+
const sidebar = root.getElementById('starlight__sidebar');
|
|
7
|
+
const current = sidebar?.querySelector<HTMLElement>('a[aria-current=page]');
|
|
8
|
+
if (!sidebar || !current) return;
|
|
9
|
+
let group = current.closest<HTMLDetailsElement>('details');
|
|
10
|
+
while (group) {
|
|
11
|
+
group.open = true;
|
|
12
|
+
group = group.parentElement?.closest<HTMLDetailsElement>('details') ?? null;
|
|
13
|
+
}
|
|
14
|
+
const bounds = sidebar.getBoundingClientRect();
|
|
15
|
+
if (bounds.height === 0) return;
|
|
16
|
+
const target = current.getBoundingClientRect();
|
|
17
|
+
if (target.top < bounds.top) sidebar.scrollTop += target.top - bounds.top - 8;
|
|
18
|
+
else if (target.bottom > bounds.bottom) sidebar.scrollTop += target.bottom - bounds.bottom + 8;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function installCertificateSidebarOrientation(): void {
|
|
22
|
+
menuObserver?.disconnect();
|
|
23
|
+
if (!document.querySelector('.breadcrumbs[data-certificate-management]')) return;
|
|
24
|
+
revealCertificateSidebar();
|
|
25
|
+
menuObserver = new MutationObserver(() => revealCertificateSidebar());
|
|
26
|
+
menuObserver.observe(document.body, { attributes: true, attributeFilter: ['data-mobile-menu-expanded'] });
|
|
27
|
+
}
|
|
@@ -18,7 +18,7 @@ export const publicationProfiles: Record<string, PublicationProfile> = {
|
|
|
18
18
|
{ label: 'Overview', slug: 'index' },
|
|
19
19
|
{
|
|
20
20
|
label: 'xcsh',
|
|
21
|
-
collapsed:
|
|
21
|
+
collapsed: true,
|
|
22
22
|
items: [
|
|
23
23
|
{ label: 'Overview', slug: 'xcsh' },
|
|
24
24
|
{ label: 'Prerequisites', slug: 'xcsh/prerequisites' },
|
|
@@ -33,7 +33,7 @@ export const publicationProfiles: Record<string, PublicationProfile> = {
|
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
label: 'Terraform',
|
|
36
|
-
collapsed:
|
|
36
|
+
collapsed: true,
|
|
37
37
|
items: [
|
|
38
38
|
{ label: 'Overview', slug: 'terraform' },
|
|
39
39
|
{ label: 'Prerequisites', slug: 'terraform/prerequisites' },
|
|
@@ -70,7 +70,7 @@ export const publicationProfiles: Record<string, PublicationProfile> = {
|
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
label: 'Client mTLS',
|
|
73
|
-
collapsed:
|
|
73
|
+
collapsed: true,
|
|
74
74
|
items: [
|
|
75
75
|
{ label: 'Overview', slug: 'client-mtls' },
|
|
76
76
|
{ label: 'Prerequisites', slug: 'client-mtls/prerequisites' },
|
|
@@ -83,7 +83,7 @@ export const publicationProfiles: Record<string, PublicationProfile> = {
|
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
label: 'Wingman',
|
|
86
|
-
collapsed:
|
|
86
|
+
collapsed: true,
|
|
87
87
|
items: [
|
|
88
88
|
{ label: 'Overview', slug: 'wingman' },
|
|
89
89
|
{ label: 'Prerequisites', slug: 'wingman/prerequisites' },
|