@robinmordasiewicz/f5xc-docs-theme 1.5.0 → 1.6.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.
@@ -0,0 +1,32 @@
1
+ ---
2
+ import Default from '@astrojs/starlight/components/PageTitle.astro';
3
+
4
+ const docsHome = process.env.DOCS_HOME || 'https://robinmordasiewicz.github.io/f5xc-docs/';
5
+ const { sidebar, entry } = Astro.locals.starlightRoute;
6
+
7
+ function findTrail(entries: typeof sidebar, trail: { label: string }[] = []): { label: string }[] | null {
8
+ for (const item of entries) {
9
+ if (item.type === 'link' && item.isCurrent) {
10
+ return trail;
11
+ }
12
+ if (item.type === 'group') {
13
+ const result = findTrail(item.entries, [...trail, { label: item.label }]);
14
+ if (result) return result;
15
+ }
16
+ }
17
+ return null;
18
+ }
19
+
20
+ const trail = findTrail(sidebar) || [];
21
+ ---
22
+
23
+ <nav class="breadcrumbs" aria-label="Breadcrumb">
24
+ <ol>
25
+ <li><a href={docsHome}>Home</a></li>
26
+ {trail.map((crumb) => (
27
+ <li><span>{crumb.label}</span></li>
28
+ ))}
29
+ <li aria-current="page"><span>{entry.data.title}</span></li>
30
+ </ol>
31
+ </nav>
32
+ <Default {...Astro.props}><slot /></Default>
package/index.ts CHANGED
@@ -15,6 +15,7 @@ export default function f5xcDocsTheme(): StarlightPlugin {
15
15
  ...config.components,
16
16
  Footer: 'f5xc-docs-theme/components/Footer.astro',
17
17
  SiteTitle: 'f5xc-docs-theme/components/SiteTitle.astro',
18
+ PageTitle: 'f5xc-docs-theme/components/PageTitle.astro',
18
19
  },
19
20
  });
20
21
  logger.info('F5 XC docs theme loaded');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinmordasiewicz/f5xc-docs-theme",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "F5 Distributed Cloud branded Starlight documentation theme",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -18,6 +18,7 @@
18
18
  "./styles/custom.css": "./styles/custom.css",
19
19
  "./components/Footer.astro": "./components/Footer.astro",
20
20
  "./components/SiteTitle.astro": "./components/SiteTitle.astro",
21
+ "./components/PageTitle.astro": "./components/PageTitle.astro",
21
22
  "./assets/f5-logo.svg": "./assets/f5-logo.svg"
22
23
  },
23
24
  "files": [
package/styles/custom.css CHANGED
@@ -95,3 +95,35 @@ h1, h2, h3, h4, h5, h6 {
95
95
  :root:not([data-theme="light"]) .expressive-code .frame.is-terminal pre {
96
96
  background: #1a1b26 !important;
97
97
  }
98
+
99
+ /* Breadcrumb navigation */
100
+ .breadcrumbs ol {
101
+ display: flex;
102
+ flex-wrap: wrap;
103
+ list-style: none;
104
+ padding: 0;
105
+ margin: 0 0 0.5rem;
106
+ font-size: 0.85rem;
107
+ color: var(--sl-color-gray-3);
108
+ }
109
+
110
+ .breadcrumbs li + li::before {
111
+ content: '/';
112
+ padding-inline: 0.375rem;
113
+ color: var(--sl-color-gray-5);
114
+ }
115
+
116
+ .breadcrumbs a {
117
+ color: var(--sl-color-text-accent);
118
+ text-decoration: none;
119
+ }
120
+
121
+ .breadcrumbs a:hover {
122
+ text-decoration: underline;
123
+ }
124
+
125
+ .breadcrumbs [aria-current="page"] {
126
+ color: var(--sl-color-white);
127
+ }
128
+
129
+ /* release pipeline verified */