@robinmordasiewicz/f5xc-docs-theme 1.6.0 → 1.7.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.
@@ -1,41 +1,56 @@
1
1
  ---
2
- import Default from '@astrojs/starlight/components/SiteTitle.astro';
2
+ import { logos } from 'virtual:starlight/user-images';
3
+ import config from 'virtual:starlight/user-config';
3
4
 
4
5
  const docsHome = process.env.DOCS_HOME || 'https://robinmordasiewicz.github.io/f5xc-docs/';
6
+ const { siteTitle } = Astro.locals.starlightRoute;
5
7
  ---
6
8
 
7
- <div class="home-title-group">
8
- <a href={docsHome} class="home-link" aria-label="Documentation home">
9
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
10
- <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
11
- <polyline points="9 22 9 12 15 12 15 22"/>
12
- </svg>
13
- </a>
14
- <span class="home-separator" aria-hidden="true"></span>
15
- <Default {...Astro.props}><slot /></Default>
16
- </div>
9
+ <a href={docsHome} class="site-title sl-flex">
10
+ {config.logo && logos.dark && (
11
+ <>
12
+ <img
13
+ class:list={{ 'light:sl-hidden print:hidden': !('src' in config.logo) }}
14
+ alt={config.logo.alt}
15
+ src={logos.dark.src}
16
+ width={logos.dark.width}
17
+ height={logos.dark.height}
18
+ />
19
+ {!('src' in config.logo) && (
20
+ <img
21
+ class="dark:sl-hidden print:block"
22
+ alt={config.logo.alt}
23
+ src={logos.light?.src}
24
+ width={logos.light?.width}
25
+ height={logos.light?.height}
26
+ />
27
+ )}
28
+ </>
29
+ )}
30
+ <span class:list={{ 'sr-only': config.logo?.replacesTitle }} translate="no">
31
+ {siteTitle}
32
+ </span>
33
+ </a>
17
34
 
18
35
  <style>
19
- .home-title-group {
20
- display: flex;
21
- align-items: center;
22
- gap: 0.5rem;
23
- }
24
-
25
- .home-link {
26
- display: inline-flex;
36
+ .site-title {
27
37
  align-items: center;
38
+ gap: var(--sl-nav-gap);
39
+ font-size: var(--sl-text-h4);
40
+ font-weight: 600;
28
41
  color: var(--sl-color-text-accent);
29
- transition: opacity 0.2s ease;
42
+ text-decoration: none;
43
+ white-space: nowrap;
44
+ min-width: 0;
30
45
  }
31
-
32
- .home-link:hover {
33
- opacity: 0.7;
46
+ span {
47
+ overflow: hidden;
34
48
  }
35
-
36
- .home-separator {
37
- width: 1px;
38
- height: 1.25rem;
39
- background-color: var(--sl-color-gray-5);
49
+ img {
50
+ height: calc(var(--sl-nav-height) - 2 * var(--sl-nav-pad-y));
51
+ width: auto;
52
+ max-width: 100%;
53
+ object-fit: contain;
54
+ object-position: 0 50%;
40
55
  }
41
56
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinmordasiewicz/f5xc-docs-theme",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "F5 Distributed Cloud branded Starlight documentation theme",
5
5
  "type": "module",
6
6
  "license": "MIT",