@robinmordasiewicz/f5xc-docs-theme 1.8.1 → 1.10.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/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) {
@@ -29,5 +29,16 @@ const trail = findTrail(sidebar) || [];
29
29
  ))}
30
30
  <li aria-current="page"><span>{entry.data.title}</span></li>
31
31
  </ol>
32
+ {editUrl && (
33
+ <a href={editUrl.href} target="_blank" rel="noopener noreferrer" class="edit-link">
34
+ <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24"
35
+ fill="none" stroke="currentColor" stroke-width="2"
36
+ stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
37
+ <path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" />
38
+ <path d="m15 5 4 4" />
39
+ </svg>
40
+ <span>Edit</span>
41
+ </a>
42
+ )}
32
43
  </nav>
33
44
  <Default {...Astro.props}><slot /></Default>
@@ -30,6 +30,22 @@
30
30
  src: url("./neusaNextProWide-700.woff2") format("woff2");
31
31
  }
32
32
 
33
+ @font-face {
34
+ font-family: "neusaNextProWide";
35
+ font-weight: 400;
36
+ font-style: italic;
37
+ font-display: swap;
38
+ src: url("./neusaNextProWide-400i.woff2") format("woff2");
39
+ }
40
+
41
+ @font-face {
42
+ font-family: "neusaNextProWide";
43
+ font-weight: 700;
44
+ font-style: italic;
45
+ font-display: swap;
46
+ src: url("./neusaNextProWide-700i.woff2") format("woff2");
47
+ }
48
+
33
49
  @font-face {
34
50
  font-family: "proximaNova";
35
51
  font-weight: 400;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinmordasiewicz/f5xc-docs-theme",
3
- "version": "1.8.1",
3
+ "version": "1.10.0",
4
4
  "description": "F5 Distributed Cloud branded Starlight documentation theme",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/styles/custom.css CHANGED
@@ -95,12 +95,36 @@
95
95
  /* ===== Fonts & Layout ===== */
96
96
  :root {
97
97
  --sl-font: "proximaNova", system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
98
+ --sl-font-heading: "neusaNextProWide", system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
98
99
  --sl-content-width: 60rem;
99
100
  --sl-sidebar-width: 15rem;
101
+
102
+ /* Typography scale mapped to F5 hierarchy */
103
+ --sl-line-height-headings: 1.1;
104
+ --sl-text-h1: var(--sl-text-5xl);
105
+ --sl-text-h2: var(--sl-text-3xl);
106
+ --sl-text-h3: var(--sl-text-2xl);
107
+ --sl-text-h4: var(--sl-text-lg);
100
108
  }
101
109
 
102
110
  h1, h2, h3, h4, h5, h6 {
103
- font-family: "neusaNextProWide", system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
111
+ font-family: var(--sl-font-heading);
112
+ }
113
+
114
+ /* F5 type hierarchy weights */
115
+ h1, h2 {
116
+ font-weight: 700;
117
+ }
118
+
119
+ h3 {
120
+ font-weight: 500;
121
+ }
122
+
123
+ h4, h5, h6 {
124
+ font-family: var(--sl-font);
125
+ font-weight: 700;
126
+ text-transform: uppercase;
127
+ letter-spacing: 0.05em;
104
128
  }
105
129
 
106
130
  @media (min-width: 72rem) {
@@ -193,12 +217,26 @@ h1, h2, h3, h4, h5, h6 {
193
217
  }
194
218
 
195
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
+
196
234
  .breadcrumbs ol {
197
235
  display: flex;
198
236
  flex-wrap: wrap;
199
237
  list-style: none;
200
238
  padding: 0;
201
- margin: 0 0 0.5rem;
239
+ margin: 0;
202
240
  font-size: 0.85rem;
203
241
  color: var(--sl-color-gray-3);
204
242
  }
@@ -222,4 +260,79 @@ h1, h2, h3, h4, h5, h6 {
222
260
  color: var(--sl-color-white);
223
261
  }
224
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
+
225
338
  /* release pipeline verified */