@f5-sales-demo/docs-theme 4.11.7 → 4.12.0
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/Footer.astro +0 -12
- package/components/Head.astro +7 -1
- package/components/LinkCard.astro +0 -87
- package/components/LocalHeader.astro +57 -0
- package/components/ProviderHeader.astro +2 -119
- package/components/SharedHeader.astro +16 -147
- package/components/SiteTitle.astro +3 -27
- package/config.ts +16 -340
- package/index.ts +12 -3
- package/package.json +7 -4
- package/src/shared/baseline.json +30 -0
- package/src/shared/bootstrap.mjs +135 -0
- package/src/shared/contract.mjs +110 -0
- package/src/shared/localize.mjs +15 -0
- package/src/shared/runtime.tsx +124 -0
- package/src/shared/search-integration.mjs +16 -0
- package/src/shared/settings.mjs +19 -0
- package/src/utils/search-sites.ts +3 -32
- package/src/utils/showcase-navigation.test.ts +2 -32
- package/src/utils/statistics-navigation.test.ts +5 -29
- package/styles/shell.css +242 -0
package/components/Footer.astro
CHANGED
|
@@ -9,15 +9,3 @@ import Default from '@astrojs/starlight/components/Footer.astro';
|
|
|
9
9
|
<a href="https://github.com/f5-sales-demo">Project sources</a>
|
|
10
10
|
<a href="https://docs.cloud.f5.com/">Official F5 documentation</a>
|
|
11
11
|
</nav>}
|
|
12
|
-
|
|
13
|
-
<style>
|
|
14
|
-
.project-links {
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-wrap: wrap;
|
|
17
|
-
gap: 0.5rem 1.5rem;
|
|
18
|
-
border-top: 1px solid var(--sl-color-gray-5);
|
|
19
|
-
margin-top: 2rem;
|
|
20
|
-
padding-block: 1rem;
|
|
21
|
-
}
|
|
22
|
-
.project-links a { padding-block: 0.5rem; }
|
|
23
|
-
</style>
|
package/components/Head.astro
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
---
|
|
2
|
+
import { sharedMode, baseline } from '../src/shared/settings.mjs';
|
|
3
|
+
const shared = sharedMode() !== 'local';
|
|
4
|
+
const integrity = (receipt) => 'sha256-' + Buffer.from(receipt.sha256, 'hex').toString('base64');
|
|
2
5
|
import { pageTitle } from '../src/utils/page-title';
|
|
3
6
|
|
|
4
7
|
const route = Astro.locals.starlightRoute;
|
|
5
|
-
const head = route.head.map((entry) => entry.tag === 'title'
|
|
8
|
+
const head = route.head.filter(entry => !(shared && entry.tag === 'link' && entry.attrs?.rel === 'icon' && !process.env.DOCS_CUSTOM_FAVICON && process.env.GITHUB_REPOSITORY !== 'f5-sales-demo/canada')).map((entry) => entry.tag === 'title'
|
|
6
9
|
? { ...entry, content: pageTitle(route.entry.data.title, route.siteTitle, entry.content || '') }
|
|
7
10
|
: entry);
|
|
8
11
|
---
|
|
9
12
|
|
|
10
13
|
{head.map(({ tag: Tag, attrs, content }) => <Tag {...attrs} set:html={content} />)}
|
|
14
|
+
|
|
15
|
+
{shared && <link data-f5-baseline-css rel="stylesheet" href={baseline.assets.css.url} integrity={integrity(baseline.assets.css)} crossorigin="anonymous" />}
|
|
16
|
+
{shared && !process.env.DOCS_CUSTOM_FAVICON && process.env.GITHUB_REPOSITORY !== 'f5-sales-demo/canada' && <link data-f5-shared-favicon rel="icon" type="image/svg+xml" href={baseline.assets.favicon.url} />}
|
|
@@ -30,90 +30,3 @@ if (attributes.href && localeSlug) {
|
|
|
30
30
|
</span>
|
|
31
31
|
<span aria-hidden="true"><Icon name="right-arrow" size="1.333em" class="icon rtl:flip" /></span>
|
|
32
32
|
</div>
|
|
33
|
-
|
|
34
|
-
<style>
|
|
35
|
-
.sl-link-card {
|
|
36
|
-
display: grid;
|
|
37
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
38
|
-
gap: 0.5rem;
|
|
39
|
-
border: 1px solid var(--sl-color-gray-5);
|
|
40
|
-
border-radius: 0.5rem;
|
|
41
|
-
padding: 1rem;
|
|
42
|
-
box-shadow: var(--f5-shadow-low);
|
|
43
|
-
position: relative;
|
|
44
|
-
transition: box-shadow var(--f5-transition-base),
|
|
45
|
-
transform var(--f5-transition-base);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.sl-link-card.has-icon {
|
|
49
|
-
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
a {
|
|
53
|
-
text-decoration: none;
|
|
54
|
-
line-height: var(--sl-line-height-headings);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* a11y fix for https://github.com/withastro/starlight/issues/487 */
|
|
58
|
-
a::before {
|
|
59
|
-
content: '';
|
|
60
|
-
position: absolute;
|
|
61
|
-
inset: 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.stack {
|
|
65
|
-
min-width: 0;
|
|
66
|
-
overflow-wrap: anywhere;
|
|
67
|
-
display: grid;
|
|
68
|
-
align-content: start;
|
|
69
|
-
gap: 0.5rem;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.title {
|
|
73
|
-
color: var(--sl-color-white);
|
|
74
|
-
font-weight: 600;
|
|
75
|
-
font-size: var(--sl-text-lg);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.description {
|
|
79
|
-
color: var(--sl-color-gray-3);
|
|
80
|
-
line-height: 1.5;
|
|
81
|
-
margin: 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.icon {
|
|
85
|
-
color: var(--sl-color-gray-3);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.card-icon {
|
|
89
|
-
color: var(--sl-color-white);
|
|
90
|
-
align-self: start;
|
|
91
|
-
position: relative;
|
|
92
|
-
width: 3rem;
|
|
93
|
-
height: 3rem;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.card-icon :global(svg) {
|
|
97
|
-
position: absolute;
|
|
98
|
-
inset: 0;
|
|
99
|
-
width: 100%;
|
|
100
|
-
height: 100%;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.sl-link-card:focus-within {
|
|
104
|
-
outline: 2px solid var(--sl-color-text-accent);
|
|
105
|
-
outline-offset: 3px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/* Hover state */
|
|
109
|
-
.sl-link-card:hover {
|
|
110
|
-
background: var(--sl-color-gray-7, var(--sl-color-gray-6));
|
|
111
|
-
border-color: var(--sl-color-gray-2);
|
|
112
|
-
box-shadow: var(--f5-shadow-mid);
|
|
113
|
-
transform: translateY(-1px);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.sl-link-card:hover .icon {
|
|
117
|
-
color: var(--sl-color-white);
|
|
118
|
-
}
|
|
119
|
-
</style>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
import MegaMenu from './SharedMegaMenu.tsx';
|
|
3
|
+
import MegaMenuMobile from './SharedMegaMenuMobile.tsx';
|
|
4
|
+
import LanguageSelect from 'virtual:starlight/components/LanguageSelect';
|
|
5
|
+
import Search from 'virtual:starlight/components/Search';
|
|
6
|
+
import SiteTitle from 'virtual:starlight/components/SiteTitle';
|
|
7
|
+
import SocialIcons from 'virtual:starlight/components/SocialIcons';
|
|
8
|
+
import ThemeSelect from 'virtual:starlight/components/ThemeSelect';
|
|
9
|
+
import config from 'virtual:starlight/user-config';
|
|
10
|
+
import { sharedMode, baseline } from '../src/shared/settings.mjs';
|
|
11
|
+
import { stagedProviderSections } from '../src/utils/provider-sections.ts';
|
|
12
|
+
const mode = sharedMode();
|
|
13
|
+
const providerSections = process.env.DOCS_PROFILE === 'canonical-provider' ? stagedProviderSections() : [];
|
|
14
|
+
const base = (process.env.DOCS_BASE || '/').replace(/\/+$/, '') + '/';
|
|
15
|
+
const consumer = { contract: 'v1', repository: process.env.GITHUB_REPOSITORY, documentBase: base, locale: Astro.currentLocale || 'en', mounts: { desktop: '#f5-ecosystem-desktop', mobile: '#f5-ecosystem-mobile' } };
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Render the `Search` component if Pagefind is enabled or the default search component has been overridden.
|
|
20
|
+
*/
|
|
21
|
+
const shouldRenderSearch = config.pagefind || config.components.Search !== '@astrojs/starlight/components/Search.astro';
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<div class="header sl-mega-menu-header" data-f5-shared-consumer={mode !== 'local' ? JSON.stringify(consumer) : undefined} data-f5-shared-baseline={mode !== 'local' ? JSON.stringify(baseline.pointer) : undefined}>
|
|
25
|
+
<div class="title-wrapper sl-flex">
|
|
26
|
+
<SiteTitle />
|
|
27
|
+
</div>
|
|
28
|
+
<nav class="smm-desktop-nav" id="f5-ecosystem-desktop" aria-label="Ecosystem">
|
|
29
|
+
<MegaMenu client:only="react" />
|
|
30
|
+
</nav>
|
|
31
|
+
<div class="sl-flex print:hidden">
|
|
32
|
+
{shouldRenderSearch && <Search />}
|
|
33
|
+
</div>
|
|
34
|
+
<div class="sl-hidden md:sl-flex print:hidden right-group">
|
|
35
|
+
<div class="sl-flex social-icons">
|
|
36
|
+
<SocialIcons />
|
|
37
|
+
</div>
|
|
38
|
+
<ThemeSelect />
|
|
39
|
+
<LanguageSelect />
|
|
40
|
+
</div>
|
|
41
|
+
<div class="smm-mobile-toggle" id="f5-ecosystem-mobile">
|
|
42
|
+
<MegaMenuMobile client:only="react" />
|
|
43
|
+
</div>
|
|
44
|
+
<details class="compact-preferences">
|
|
45
|
+
<summary aria-label="Display and language">Aa</summary>
|
|
46
|
+
<div class="preferences-panel"><ThemeSelect /><LanguageSelect /></div>
|
|
47
|
+
</details>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
import { startSharedShell } from '../src/shared/bootstrap.mjs';
|
|
52
|
+
const header = document.querySelector<HTMLElement>('[data-f5-shared-consumer]');
|
|
53
|
+
if (header) startSharedShell(JSON.parse(header.dataset.f5SharedConsumer!), JSON.parse(header.dataset.f5SharedBaseline!)).catch(() => {});
|
|
54
|
+
</script>
|
|
55
|
+
{providerSections.length > 0 && <nav class="provider-local-nav" aria-label="Provider documentation">
|
|
56
|
+
{providerSections.map(section => <a href={`${base}${section.path}/`}>{section.label}</a>)}
|
|
57
|
+
</nav>}
|
|
@@ -1,121 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
3
|
-
import Search from 'virtual:starlight/components/Search';
|
|
4
|
-
import SiteTitle from 'virtual:starlight/components/SiteTitle';
|
|
5
|
-
import SocialIcons from 'virtual:starlight/components/SocialIcons';
|
|
6
|
-
import ThemeSelect from 'virtual:starlight/components/ThemeSelect';
|
|
7
|
-
import config from 'virtual:starlight/user-config';
|
|
8
|
-
import megaMenuConfig from 'virtual:starlight-mega-menu/config';
|
|
9
|
-
import MegaMenu from '@f5-sales-demo/starlight-mega-menu/components/MegaMenu.tsx';
|
|
10
|
-
import MegaMenuMobile from '@f5-sales-demo/starlight-mega-menu/components/MegaMenuMobile.tsx';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Render the `Search` component if Pagefind is enabled or the default search component has been overridden.
|
|
14
|
-
*/
|
|
15
|
-
const shouldRenderSearch = config.pagefind || config.components.Search !== '@astrojs/starlight/components/Search.astro';
|
|
2
|
+
import SharedHeader from "./SharedHeader.astro";
|
|
16
3
|
---
|
|
17
|
-
|
|
18
|
-
<div class="header sl-mega-menu-header">
|
|
19
|
-
<div class="title-wrapper sl-flex">
|
|
20
|
-
<SiteTitle />
|
|
21
|
-
</div>
|
|
22
|
-
<nav class="smm-desktop-nav">
|
|
23
|
-
<MegaMenu client:only="react" config={megaMenuConfig} />
|
|
24
|
-
</nav>
|
|
25
|
-
<div class="sl-flex print:hidden">
|
|
26
|
-
{shouldRenderSearch && <Search />}
|
|
27
|
-
</div>
|
|
28
|
-
<div class="smm-mobile-toggle">
|
|
29
|
-
<MegaMenuMobile client:only="react" config={megaMenuConfig} />
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
<style>
|
|
34
|
-
@layer starlight.core {
|
|
35
|
-
.header {
|
|
36
|
-
display: flex;
|
|
37
|
-
gap: var(--sl-nav-gap);
|
|
38
|
-
justify-content: space-between;
|
|
39
|
-
align-items: center;
|
|
40
|
-
height: 100%;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.title-wrapper {
|
|
44
|
-
/* Prevent long titles overflowing and covering the search and menu buttons on narrow viewports. */
|
|
45
|
-
overflow: clip;
|
|
46
|
-
/* Avoid clipping focus ring around link inside title wrapper. */
|
|
47
|
-
padding: 0.25rem;
|
|
48
|
-
margin: -0.25rem;
|
|
49
|
-
min-width: 0;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.right-group { display: none; }
|
|
53
|
-
@media (min-width: 90rem) {
|
|
54
|
-
.right-group { display: flex; }
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.right-group,
|
|
58
|
-
.social-icons {
|
|
59
|
-
gap: 1rem;
|
|
60
|
-
align-items: center;
|
|
61
|
-
}
|
|
62
|
-
.social-icons::after {
|
|
63
|
-
content: '';
|
|
64
|
-
height: 2rem;
|
|
65
|
-
border-inline-end: 1px solid var(--sl-color-gray-5);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* Desktop nav is hidden on small screens */
|
|
69
|
-
.smm-desktop-nav {
|
|
70
|
-
display: none;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* Mobile toggle is visible on small screens */
|
|
74
|
-
.smm-mobile-toggle {
|
|
75
|
-
display: flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@media (min-width: 90rem) {
|
|
80
|
-
:global(:root[data-has-sidebar]) {
|
|
81
|
-
--__sidebar-pad: calc(2 * var(--sl-nav-pad-x));
|
|
82
|
-
}
|
|
83
|
-
:global(:root:not([data-has-toc])) {
|
|
84
|
-
--__toc-width: 0rem;
|
|
85
|
-
}
|
|
86
|
-
.header {
|
|
87
|
-
--__sidebar-width: max(0rem, var(--sl-content-inline-start, 0rem) - var(--sl-nav-pad-x));
|
|
88
|
-
--__main-column-fr: calc(
|
|
89
|
-
(
|
|
90
|
-
100% + var(--__sidebar-pad, 0rem) - var(--__toc-width, var(--sl-sidebar-width)) -
|
|
91
|
-
(2 * var(--__toc-width, var(--sl-nav-pad-x))) - var(--sl-content-inline-start, 0rem) -
|
|
92
|
-
var(--sl-content-width)
|
|
93
|
-
) / 2
|
|
94
|
-
);
|
|
95
|
-
display: grid;
|
|
96
|
-
grid-template-columns:
|
|
97
|
-
/* 1 (site title) */
|
|
98
|
-
minmax(0, 1fr)
|
|
99
|
-
/* 2 (mega-menu nav) */
|
|
100
|
-
auto
|
|
101
|
-
/* 3 (search box) */
|
|
102
|
-
auto
|
|
103
|
-
/* 4 (right items) */
|
|
104
|
-
auto;
|
|
105
|
-
align-content: center;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/* Show desktop nav, hide mobile toggle */
|
|
109
|
-
.smm-desktop-nav {
|
|
110
|
-
display: flex;
|
|
111
|
-
align-items: center;
|
|
112
|
-
justify-content: center;
|
|
113
|
-
min-width: 0;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.smm-mobile-toggle {
|
|
117
|
-
display: none;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
</style>
|
|
4
|
+
<SharedHeader />
|
|
@@ -5,9 +5,13 @@ import SiteTitle from 'virtual:starlight/components/SiteTitle';
|
|
|
5
5
|
import SocialIcons from 'virtual:starlight/components/SocialIcons';
|
|
6
6
|
import ThemeSelect from 'virtual:starlight/components/ThemeSelect';
|
|
7
7
|
import config from 'virtual:starlight/user-config';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
8
|
+
import { sharedMode, baseline } from '../src/shared/settings.mjs';
|
|
9
|
+
import { stagedProviderSections } from '../src/utils/provider-sections.ts';
|
|
10
|
+
const mode = sharedMode();
|
|
11
|
+
const providerSections = process.env.DOCS_PROFILE === 'canonical-provider' ? stagedProviderSections() : [];
|
|
12
|
+
const base = (process.env.DOCS_BASE || '/').replace(/\/+$/, '') + '/';
|
|
13
|
+
const consumer = { contract: 'v1', repository: process.env.GITHUB_REPOSITORY, documentBase: base, locale: Astro.currentLocale || 'en', mounts: { desktop: '#f5-ecosystem-desktop', mobile: '#f5-ecosystem-mobile' } };
|
|
14
|
+
|
|
11
15
|
|
|
12
16
|
/**
|
|
13
17
|
* Render the `Search` component if Pagefind is enabled or the default search component has been overridden.
|
|
@@ -15,12 +19,13 @@ import { federatedSearchSites } from '../src/utils/search-sites';
|
|
|
15
19
|
const shouldRenderSearch = config.pagefind || config.components.Search !== '@astrojs/starlight/components/Search.astro';
|
|
16
20
|
---
|
|
17
21
|
|
|
18
|
-
<div class="header sl-mega-menu-header" data-
|
|
22
|
+
<div class="header sl-mega-menu-header" data-f5-shared-consumer={mode !== 'local' ? JSON.stringify(consumer) : undefined} data-f5-shared-baseline={mode !== 'local' ? JSON.stringify(baseline.pointer) : undefined}>
|
|
19
23
|
<div class="title-wrapper sl-flex">
|
|
20
24
|
<SiteTitle />
|
|
21
25
|
</div>
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
{providerSections.length > 0 && <details class="provider-local-nav"><summary>Provider documentation</summary><nav aria-label="Provider documentation">{providerSections.map(section => <a href={`${base}${section.path}/`}>{section.label}</a>)}</nav></details>}
|
|
27
|
+
<nav class="smm-desktop-nav" id="f5-ecosystem-desktop" aria-label="Ecosystem">
|
|
28
|
+
<a data-f5-fallback href="https://f5-sales-demo.github.io/en/ecosystem/">Ecosystem directory</a>
|
|
24
29
|
</nav>
|
|
25
30
|
<div class="sl-flex print:hidden">
|
|
26
31
|
{shouldRenderSearch && <Search />}
|
|
@@ -32,8 +37,8 @@ const shouldRenderSearch = config.pagefind || config.components.Search !== '@ast
|
|
|
32
37
|
<ThemeSelect />
|
|
33
38
|
<LanguageSelect />
|
|
34
39
|
</div>
|
|
35
|
-
<div class="smm-mobile-toggle">
|
|
36
|
-
<
|
|
40
|
+
<div class="smm-mobile-toggle" id="f5-ecosystem-mobile">
|
|
41
|
+
<a data-f5-fallback href="https://f5-sales-demo.github.io/en/ecosystem/">Ecosystem directory</a>
|
|
37
42
|
</div>
|
|
38
43
|
<details class="compact-preferences">
|
|
39
44
|
<summary aria-label="Display and language">Aa</summary>
|
|
@@ -42,143 +47,7 @@ const shouldRenderSearch = config.pagefind || config.components.Search !== '@ast
|
|
|
42
47
|
</div>
|
|
43
48
|
|
|
44
49
|
<script>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const annotateResults = () => {
|
|
49
|
-
for (const link of document.querySelectorAll<HTMLAnchorElement>('.pagefind-ui__result-link')) {
|
|
50
|
-
if (link.dataset.sourceAnnotated) continue;
|
|
51
|
-
link.dataset.sourceAnnotated = 'true';
|
|
52
|
-
const label = searchSource(link.href, sources);
|
|
53
|
-
if (!label) continue;
|
|
54
|
-
const source = document.createElement('span');
|
|
55
|
-
source.className = 'search-project-source';
|
|
56
|
-
source.textContent = label;
|
|
57
|
-
link.closest('.pagefind-ui__result-title')?.append(source);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
new MutationObserver(annotateResults).observe(document.body, { childList: true, subtree: true });
|
|
61
|
-
document.addEventListener('keydown', (event) => {
|
|
62
|
-
const preferences = document.querySelector<HTMLDetailsElement>('.compact-preferences[open]');
|
|
63
|
-
if (event.key === 'Escape' && preferences) {
|
|
64
|
-
preferences.open = false;
|
|
65
|
-
preferences.querySelector('summary')?.focus();
|
|
66
|
-
}
|
|
67
|
-
});
|
|
50
|
+
import { startSharedShell } from '../src/shared/bootstrap.mjs';
|
|
51
|
+
const header = document.querySelector<HTMLElement>('[data-f5-shared-consumer]');
|
|
52
|
+
if (header) (window as any).F5SharedReadyV1 = startSharedShell(JSON.parse(header.dataset.f5SharedConsumer!), JSON.parse(header.dataset.f5SharedBaseline!)).catch(() => {});
|
|
68
53
|
</script>
|
|
69
|
-
|
|
70
|
-
<style>
|
|
71
|
-
@layer starlight.core {
|
|
72
|
-
.header {
|
|
73
|
-
display: flex;
|
|
74
|
-
gap: var(--sl-nav-gap);
|
|
75
|
-
justify-content: space-between;
|
|
76
|
-
align-items: center;
|
|
77
|
-
height: 100%;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.title-wrapper {
|
|
81
|
-
/* Prevent long titles overflowing and covering the search and menu buttons on narrow viewports. */
|
|
82
|
-
overflow: clip;
|
|
83
|
-
/* Avoid clipping focus ring around link inside title wrapper. */
|
|
84
|
-
padding: 0.25rem;
|
|
85
|
-
margin: -0.25rem;
|
|
86
|
-
min-width: 0;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.right-group { display: none; }
|
|
90
|
-
.compact-preferences { position: relative; flex-shrink: 0; }
|
|
91
|
-
.compact-preferences summary {
|
|
92
|
-
cursor: pointer;
|
|
93
|
-
padding: 0.75rem;
|
|
94
|
-
min-height: 44px;
|
|
95
|
-
list-style: none;
|
|
96
|
-
}
|
|
97
|
-
.preferences-panel {
|
|
98
|
-
position: absolute;
|
|
99
|
-
inset-inline-end: 0;
|
|
100
|
-
top: calc(100% + 0.5rem);
|
|
101
|
-
display: grid;
|
|
102
|
-
gap: 0.5rem;
|
|
103
|
-
padding: 0.75rem;
|
|
104
|
-
background: var(--sl-color-bg-nav);
|
|
105
|
-
border: 1px solid var(--sl-color-gray-5);
|
|
106
|
-
border-radius: 0.5rem;
|
|
107
|
-
}
|
|
108
|
-
:global(.search-project-source) {
|
|
109
|
-
display: block;
|
|
110
|
-
font-size: var(--sl-text-sm);
|
|
111
|
-
font-weight: 400;
|
|
112
|
-
color: var(--sl-color-gray-2);
|
|
113
|
-
margin-top: 0.25rem;
|
|
114
|
-
}
|
|
115
|
-
@media (min-width: 90rem) {
|
|
116
|
-
.right-group { display: flex; }
|
|
117
|
-
.compact-preferences { display: none; }
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.right-group,
|
|
121
|
-
.social-icons {
|
|
122
|
-
gap: 1rem;
|
|
123
|
-
align-items: center;
|
|
124
|
-
}
|
|
125
|
-
.social-icons::after {
|
|
126
|
-
content: '';
|
|
127
|
-
height: 2rem;
|
|
128
|
-
border-inline-end: 1px solid var(--sl-color-gray-5);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/* Desktop nav is hidden on small screens */
|
|
132
|
-
.smm-desktop-nav {
|
|
133
|
-
display: none;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/* Mobile toggle is visible on small screens */
|
|
137
|
-
.smm-mobile-toggle {
|
|
138
|
-
display: flex;
|
|
139
|
-
align-items: center;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
@media (min-width: 90rem) {
|
|
143
|
-
:global(:root[data-has-sidebar]) {
|
|
144
|
-
--__sidebar-pad: calc(2 * var(--sl-nav-pad-x));
|
|
145
|
-
}
|
|
146
|
-
:global(:root:not([data-has-toc])) {
|
|
147
|
-
--__toc-width: 0rem;
|
|
148
|
-
}
|
|
149
|
-
.header {
|
|
150
|
-
--__sidebar-width: max(0rem, var(--sl-content-inline-start, 0rem) - var(--sl-nav-pad-x));
|
|
151
|
-
--__main-column-fr: calc(
|
|
152
|
-
(
|
|
153
|
-
100% + var(--__sidebar-pad, 0rem) - var(--__toc-width, var(--sl-sidebar-width)) -
|
|
154
|
-
(2 * var(--__toc-width, var(--sl-nav-pad-x))) - var(--sl-content-inline-start, 0rem) -
|
|
155
|
-
var(--sl-content-width)
|
|
156
|
-
) / 2
|
|
157
|
-
);
|
|
158
|
-
display: grid;
|
|
159
|
-
grid-template-columns:
|
|
160
|
-
/* 1 (site title) */
|
|
161
|
-
minmax(0, 1fr)
|
|
162
|
-
/* 2 (mega-menu nav) */
|
|
163
|
-
auto
|
|
164
|
-
/* 3 (search box) */
|
|
165
|
-
auto
|
|
166
|
-
/* 4 (right items) */
|
|
167
|
-
auto;
|
|
168
|
-
align-content: center;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/* Show desktop nav, hide mobile toggle */
|
|
172
|
-
.smm-desktop-nav {
|
|
173
|
-
display: flex;
|
|
174
|
-
align-items: center;
|
|
175
|
-
justify-content: center;
|
|
176
|
-
min-width: 0;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.smm-mobile-toggle {
|
|
180
|
-
display: none;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
</style>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
+
import { sharedMode, baseline } from '../src/shared/settings.mjs';
|
|
3
|
+
const shared = sharedMode() !== 'local';
|
|
2
4
|
import config from 'virtual:starlight/user-config';
|
|
3
5
|
import { logos } from 'virtual:starlight/user-images';
|
|
4
6
|
|
|
@@ -7,6 +9,7 @@ const { siteTitle } = Astro.locals.starlightRoute;
|
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
<a href={docsHome} class="site-title sl-flex">
|
|
12
|
+
{shared && !config.logo && <img data-f5-shared-brand="logo" src={baseline.assets.logo.url} alt="F5 Distributed Cloud" width="200" height="40" />}
|
|
10
13
|
{config.logo && logos.dark && (
|
|
11
14
|
<>
|
|
12
15
|
<img
|
|
@@ -31,30 +34,3 @@ const { siteTitle } = Astro.locals.starlightRoute;
|
|
|
31
34
|
{siteTitle}
|
|
32
35
|
</span>
|
|
33
36
|
</a>
|
|
34
|
-
|
|
35
|
-
<style>
|
|
36
|
-
.site-title {
|
|
37
|
-
align-items: center;
|
|
38
|
-
gap: var(--sl-nav-gap);
|
|
39
|
-
font-size: var(--sl-text-h4);
|
|
40
|
-
font-weight: 600;
|
|
41
|
-
color: var(--sl-color-text-accent);
|
|
42
|
-
text-decoration: none;
|
|
43
|
-
white-space: nowrap;
|
|
44
|
-
min-width: 0;
|
|
45
|
-
}
|
|
46
|
-
span {
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
text-overflow: ellipsis;
|
|
49
|
-
white-space: nowrap;
|
|
50
|
-
min-width: 0;
|
|
51
|
-
}
|
|
52
|
-
img {
|
|
53
|
-
height: calc(var(--sl-nav-height) - 2 * var(--sl-nav-pad-y));
|
|
54
|
-
width: auto;
|
|
55
|
-
max-width: 100%;
|
|
56
|
-
object-fit: contain;
|
|
57
|
-
object-position: 0 50%;
|
|
58
|
-
flex-shrink: 0;
|
|
59
|
-
}
|
|
60
|
-
</style>
|