@robinmordasiewicz/f5xc-docs-theme 1.9.0 → 1.10.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/astro.config.mjs CHANGED
@@ -17,6 +17,11 @@ export default defineConfig({
17
17
  logo: {
18
18
  src: 'f5xc-docs-theme/assets/f5-logo.svg',
19
19
  },
20
+ ...(process.env.GITHUB_REPOSITORY ? {
21
+ editLink: {
22
+ baseUrl: `https://github.com/${process.env.GITHUB_REPOSITORY}/edit/main/`,
23
+ },
24
+ } : {}),
20
25
  social: [
21
26
  {
22
27
  label: 'GitHub',
@@ -2,7 +2,7 @@
2
2
  import Default from '@astrojs/starlight/components/PageTitle.astro';
3
3
 
4
4
  const docsHome = process.env.DOCS_HOME || 'https://robinmordasiewicz.github.io/f5xc-docs/';
5
- const { sidebar, entry, siteTitle } = Astro.locals.starlightRoute;
5
+ const { sidebar, entry, siteTitle, editUrl } = Astro.locals.starlightRoute;
6
6
 
7
7
  function findTrail(entries: typeof sidebar, trail: { label: string }[] = []): { label: string }[] | null {
8
8
  for (const item of entries) {
@@ -18,6 +18,9 @@ function findTrail(entries: typeof sidebar, trail: { label: string }[] = []): {
18
18
  }
19
19
 
20
20
  const trail = findTrail(sidebar) || [];
21
+ const fixedEditUrl = editUrl
22
+ ? editUrl.href.replace('/src/content/docs/', '/docs/')
23
+ : undefined;
21
24
  ---
22
25
 
23
26
  <nav class="breadcrumbs" aria-label="Breadcrumb">
@@ -29,5 +32,16 @@ const trail = findTrail(sidebar) || [];
29
32
  ))}
30
33
  <li aria-current="page"><span>{entry.data.title}</span></li>
31
34
  </ol>
35
+ {fixedEditUrl && (
36
+ <a href={fixedEditUrl} target="_blank" rel="noopener noreferrer" class="edit-link">
37
+ <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"
38
+ fill="none" stroke="currentColor" stroke-width="2"
39
+ stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
40
+ <path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" />
41
+ <path d="m15 5 4 4" />
42
+ </svg>
43
+ <span>Edit</span>
44
+ </a>
45
+ )}
32
46
  </nav>
33
47
  <Default {...Astro.props}><slot /></Default>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinmordasiewicz/f5xc-docs-theme",
3
- "version": "1.9.0",
3
+ "version": "1.10.1",
4
4
  "description": "F5 Distributed Cloud branded Starlight documentation theme",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/styles/custom.css CHANGED
@@ -217,12 +217,26 @@ h4, h5, h6 {
217
217
  }
218
218
 
219
219
  /* Breadcrumb navigation */
220
+ .breadcrumbs {
221
+ position: sticky;
222
+ top: var(--sl-nav-height, 3.5rem);
223
+ z-index: 1;
224
+ background: var(--sl-color-black);
225
+ padding-block: 0.5rem;
226
+ margin-inline: -1rem;
227
+ padding-inline: 1rem;
228
+ display: flex;
229
+ align-items: center;
230
+ justify-content: space-between;
231
+ gap: 1rem;
232
+ }
233
+
220
234
  .breadcrumbs ol {
221
235
  display: flex;
222
236
  flex-wrap: wrap;
223
237
  list-style: none;
224
238
  padding: 0;
225
- margin: 0 0 0.5rem;
239
+ margin: 0;
226
240
  font-size: 0.85rem;
227
241
  color: var(--sl-color-gray-3);
228
242
  }
@@ -246,4 +260,79 @@ h4, h5, h6 {
246
260
  color: var(--sl-color-white);
247
261
  }
248
262
 
263
+ /* Edit on GitHub pill */
264
+ .edit-link {
265
+ display: inline-flex;
266
+ align-items: center;
267
+ gap: 0.375rem;
268
+ padding: 0.25rem 0.75rem;
269
+ border-radius: 999px;
270
+ font-size: 0.75rem;
271
+ font-weight: 500;
272
+ color: var(--sl-color-gray-3);
273
+ background: var(--sl-color-gray-6);
274
+ border: 1px solid var(--sl-color-gray-5);
275
+ text-decoration: none;
276
+ white-space: nowrap;
277
+ flex-shrink: 0;
278
+ transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
279
+ }
280
+
281
+ .edit-link:hover {
282
+ color: var(--sl-color-white);
283
+ background: var(--sl-color-gray-5);
284
+ border-color: var(--sl-color-gray-4);
285
+ text-decoration: none;
286
+ }
287
+
288
+ .edit-link svg {
289
+ flex-shrink: 0;
290
+ }
291
+
292
+ /* ===== Color Swatch Styles ===== */
293
+ .swatch-grid {
294
+ display: grid;
295
+ grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
296
+ gap: 1rem;
297
+ margin-block: 1.5rem;
298
+ }
299
+
300
+ .swatch {
301
+ border-radius: 0.75rem;
302
+ overflow: hidden;
303
+ box-shadow:
304
+ 0 2px 4px rgba(0, 0, 0, 0.04),
305
+ 0 8px 16px rgba(0, 0, 0, 0.08),
306
+ 0 24px 48px rgba(0, 0, 0, 0.12);
307
+ border: 1px solid var(--sl-color-gray-5);
308
+ }
309
+
310
+ .swatch-color {
311
+ height: 5rem;
312
+ display: flex;
313
+ align-items: flex-end;
314
+ padding: 0.5rem;
315
+ font-size: 0.75rem;
316
+ font-weight: 600;
317
+ font-family: var(--sl-font);
318
+ }
319
+
320
+ .swatch-color.text-light { color: #ffffff; }
321
+ .swatch-color.text-dark { color: #000000; }
322
+
323
+ .swatch-label {
324
+ padding: 0.5rem;
325
+ font-size: 0.7rem;
326
+ line-height: 1.4;
327
+ font-family: var(--sl-font);
328
+ background: var(--sl-color-gray-6);
329
+ color: var(--sl-color-gray-1);
330
+ }
331
+
332
+ .swatch-label code {
333
+ display: block;
334
+ font-size: 0.65rem;
335
+ color: var(--sl-color-gray-3);
336
+ }
337
+
249
338
  /* release pipeline verified */