jekyll-theme-zer0 0.22.5 → 0.22.20

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.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +196 -0
  3. data/README.md +66 -19
  4. data/_data/navigation/admin.yml +53 -0
  5. data/_data/theme_backgrounds.yml +121 -0
  6. data/_includes/components/admin-tabs.html +59 -0
  7. data/_includes/components/analytics-dashboard.html +232 -0
  8. data/_includes/components/background-customizer.html +159 -0
  9. data/_includes/components/background-settings.html +137 -0
  10. data/_includes/components/collection-manager.html +151 -0
  11. data/_includes/components/component-showcase.html +452 -0
  12. data/_includes/components/config-editor.html +207 -0
  13. data/_includes/components/config-viewer.html +479 -0
  14. data/_includes/components/cookie-consent.html +35 -100
  15. data/_includes/components/env-dashboard.html +154 -0
  16. data/_includes/components/feature-card.html +94 -0
  17. data/_includes/components/info-section.html +172 -149
  18. data/_includes/components/js-cdn.html +4 -1
  19. data/_includes/components/nanobar.html +117 -0
  20. data/_includes/components/nav-editor.html +99 -0
  21. data/_includes/components/setup-banner.html +28 -0
  22. data/_includes/components/setup-check.html +53 -0
  23. data/_includes/components/svg-background.html +42 -0
  24. data/_includes/components/theme-customizer.html +46 -0
  25. data/_includes/content/seo.html +68 -135
  26. data/_includes/core/footer.html +10 -12
  27. data/_includes/core/head.html +7 -27
  28. data/_includes/core/header.html +30 -17
  29. data/_includes/landing/landing-install-cards.html +18 -7
  30. data/_includes/navigation/admin-nav.html +95 -0
  31. data/_includes/navigation/navbar.html +45 -6
  32. data/_includes/navigation/sidebar-left.html +1 -1
  33. data/_includes/setup/wizard.html +330 -0
  34. data/_layouts/admin.html +166 -0
  35. data/_layouts/landing.html +15 -9
  36. data/_layouts/root.html +12 -6
  37. data/_layouts/setup.html +73 -0
  38. data/_plugins/preview_image_generator.rb +26 -12
  39. data/_sass/core/_navbar.scss +8 -2
  40. data/_sass/custom.scss +65 -10
  41. data/_sass/theme/_background-mixins.scss +95 -0
  42. data/_sass/theme/_backgrounds.scss +156 -0
  43. data/_sass/theme/_color-modes.scss +2 -1
  44. data/assets/backgrounds/gradients/air.svg +15 -0
  45. data/assets/backgrounds/gradients/aqua.svg +15 -0
  46. data/assets/backgrounds/gradients/contrast.svg +15 -0
  47. data/assets/backgrounds/gradients/dark.svg +15 -0
  48. data/assets/backgrounds/gradients/dirt.svg +15 -0
  49. data/assets/backgrounds/gradients/mint.svg +15 -0
  50. data/assets/backgrounds/gradients/neon.svg +15 -0
  51. data/assets/backgrounds/gradients/plum.svg +15 -0
  52. data/assets/backgrounds/gradients/sunrise.svg +15 -0
  53. data/assets/backgrounds/noise/air.svg +8 -0
  54. data/assets/backgrounds/noise/aqua.svg +8 -0
  55. data/assets/backgrounds/noise/contrast.svg +8 -0
  56. data/assets/backgrounds/noise/dark.svg +8 -0
  57. data/assets/backgrounds/noise/dirt.svg +8 -0
  58. data/assets/backgrounds/noise/mint.svg +8 -0
  59. data/assets/backgrounds/noise/neon.svg +8 -0
  60. data/assets/backgrounds/noise/plum.svg +8 -0
  61. data/assets/backgrounds/noise/sunrise.svg +8 -0
  62. data/assets/backgrounds/patterns/air.svg +7 -0
  63. data/assets/backgrounds/patterns/aqua.svg +7 -0
  64. data/assets/backgrounds/patterns/contrast.svg +4 -0
  65. data/assets/backgrounds/patterns/dark.svg +5 -0
  66. data/assets/backgrounds/patterns/dirt.svg +5 -0
  67. data/assets/backgrounds/patterns/mint.svg +6 -0
  68. data/assets/backgrounds/patterns/neon.svg +6 -0
  69. data/assets/backgrounds/patterns/plum.svg +6 -0
  70. data/assets/backgrounds/patterns/sunrise.svg +5 -0
  71. data/assets/js/background-customizer.js +73 -0
  72. data/assets/js/code-copy.js +18 -47
  73. data/assets/js/config-utility.js +307 -0
  74. data/assets/js/nanobar-init.js +63 -0
  75. data/assets/js/nav-editor.js +39 -0
  76. data/assets/js/palette-generator.js +415 -0
  77. data/assets/js/search-modal.js +31 -11
  78. data/assets/js/setup-wizard.js +306 -0
  79. data/assets/js/skin-editor.js +645 -0
  80. data/assets/js/theme-customizer.js +102 -0
  81. data/assets/js/ui-enhancements.js +2 -24
  82. data/assets/vendor/bootstrap/css/bootstrap.min.css +1 -0
  83. data/assets/vendor/bootstrap/js/bootstrap.bundle.min.js +1 -0
  84. data/scripts/README.md +45 -0
  85. data/scripts/features/generate-preview-images +297 -7
  86. data/scripts/features/install-preview-generator +51 -33
  87. data/scripts/fork-cleanup.sh +92 -19
  88. data/scripts/github-setup.sh +284 -0
  89. data/scripts/init_setup.sh +0 -1
  90. data/scripts/lib/frontmatter.sh +543 -0
  91. data/scripts/lib/migrate.sh +265 -0
  92. data/scripts/lib/preview_generator.py +607 -32
  93. data/scripts/lint-pages +508 -0
  94. data/scripts/migrate.sh +201 -0
  95. data/scripts/platform/setup-linux.sh +244 -0
  96. data/scripts/platform/setup-macos.sh +187 -0
  97. data/scripts/platform/setup-wsl.sh +196 -0
  98. metadata +73 -6
@@ -0,0 +1,479 @@
1
+ <!--
2
+ ===================================================================
3
+ CONFIG VIEWER — Accordion-based live configuration browser
4
+ ===================================================================
5
+
6
+ File: config-viewer.html
7
+ Path: _includes/components/config-viewer.html
8
+ Purpose: Renders the current _config.yml values in organised,
9
+ browsable accordion sections with copy-per-value buttons,
10
+ search/filter, and section-copy support.
11
+
12
+ Dependencies: Bootstrap 5.3, assets/js/config-utility.js
13
+ Data source: site.* variables (Liquid at build time)
14
+ ===================================================================
15
+ -->
16
+
17
+ <!-- ── Search bar ─────────────────────────────────────────────────── -->
18
+ <div class="input-group mb-3">
19
+ <span class="input-group-text"><i class="bi bi-search"></i></span>
20
+ <input type="text" class="form-control" id="cfg-search"
21
+ placeholder="Search config keys or values…" aria-label="Search configuration">
22
+ <button class="btn btn-outline-secondary" type="button" id="cfg-search-clear" title="Clear search">
23
+ <i class="bi bi-x-lg"></i>
24
+ </button>
25
+ </div>
26
+
27
+ <!-- ── Toolbar ─────────────────────────────────────────────────────── -->
28
+ <div class="d-flex justify-content-between align-items-center mb-3">
29
+ <div class="btn-group btn-group-sm" role="group">
30
+ <button class="btn btn-outline-secondary" id="cfg-expand-all" title="Expand all sections">
31
+ <i class="bi bi-arrows-expand"></i> Expand All
32
+ </button>
33
+ <button class="btn btn-outline-secondary" id="cfg-collapse-all" title="Collapse all sections">
34
+ <i class="bi bi-arrows-collapse"></i> Collapse All
35
+ </button>
36
+ </div>
37
+ <button class="btn btn-sm btn-outline-primary" id="cfg-copy-full" title="Copy full config">
38
+ <i class="bi bi-clipboard"></i> Copy Full Config
39
+ </button>
40
+ </div>
41
+
42
+ <!-- ── Accordion ───────────────────────────────────────────────────── -->
43
+ <div class="accordion" id="configAccordion">
44
+
45
+ {% comment %} ──────────── Section: Site Identity ──────────── {% endcomment %}
46
+ <div class="accordion-item cfg-section">
47
+ <h2 class="accordion-header">
48
+ <button class="accordion-button" type="button"
49
+ data-bs-toggle="collapse" data-bs-target="#cfgSiteIdentity"
50
+ aria-expanded="true">
51
+ <i class="bi bi-person-badge me-2"></i> Site Identity
52
+ </button>
53
+ </h2>
54
+ <div id="cfgSiteIdentity" class="accordion-collapse collapse show" data-bs-parent="#configAccordion">
55
+ <div class="accordion-body p-0">
56
+ <div class="d-flex justify-content-end p-2 border-bottom">
57
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-section" data-section="cfgSiteIdentity" title="Copy section">
58
+ <i class="bi bi-clipboard"></i> Copy Section
59
+ </button>
60
+ </div>
61
+ <table class="table table-hover table-sm mb-0 align-middle">
62
+ <tbody>
63
+ {% assign identity_keys = "title,founder,email,description,name,level,locale" | split: "," %}
64
+ {% for k in identity_keys %}
65
+ {% assign v = site[k] %}
66
+ {% if v %}
67
+ <tr class="cfg-row" data-key="{{ k }}" data-value="{{ v | escape }}">
68
+ <td class="ps-3 text-nowrap fw-semibold" style="width:30%"><code>{{ k }}</code></td>
69
+ <td class="text-break small">{{ v | escape }}</td>
70
+ <td style="width:50px" class="text-end pe-3">
71
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-val py-0 px-1" data-value="{{ v | escape }}" title="Copy value">
72
+ <i class="bi bi-clipboard"></i>
73
+ </button>
74
+ </td>
75
+ </tr>
76
+ {% endif %}
77
+ {% endfor %}
78
+ </tbody>
79
+ </table>
80
+ </div>
81
+ </div>
82
+ </div>
83
+
84
+ {% comment %} ──────────── Section: GitHub ──────────── {% endcomment %}
85
+ <div class="accordion-item cfg-section">
86
+ <h2 class="accordion-header">
87
+ <button class="accordion-button collapsed" type="button"
88
+ data-bs-toggle="collapse" data-bs-target="#cfgGitHub">
89
+ <i class="bi bi-github me-2"></i> GitHub
90
+ </button>
91
+ </h2>
92
+ <div id="cfgGitHub" class="accordion-collapse collapse" data-bs-parent="#configAccordion">
93
+ <div class="accordion-body p-0">
94
+ <div class="d-flex justify-content-end p-2 border-bottom">
95
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-section" data-section="cfgGitHub" title="Copy section">
96
+ <i class="bi bi-clipboard"></i> Copy Section
97
+ </button>
98
+ </div>
99
+ <table class="table table-hover table-sm mb-0 align-middle">
100
+ <tbody>
101
+ {% assign gh_keys = "github_user,repository_name,branch,local_repo,repo_map" | split: "," %}
102
+ {% for k in gh_keys %}
103
+ {% assign v = site[k] %}
104
+ {% if v %}
105
+ <tr class="cfg-row" data-key="{{ k }}" data-value="{{ v | escape }}">
106
+ <td class="ps-3 text-nowrap fw-semibold" style="width:30%"><code>{{ k }}</code></td>
107
+ <td class="text-break small">{{ v | escape }}</td>
108
+ <td style="width:50px" class="text-end pe-3">
109
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-val py-0 px-1" data-value="{{ v | escape }}" title="Copy value">
110
+ <i class="bi bi-clipboard"></i>
111
+ </button>
112
+ </td>
113
+ </tr>
114
+ {% endif %}
115
+ {% endfor %}
116
+ </tbody>
117
+ </table>
118
+ </div>
119
+ </div>
120
+ </div>
121
+
122
+ {% comment %} ──────────── Section: URLs & Deployment ──────────── {% endcomment %}
123
+ <div class="accordion-item cfg-section">
124
+ <h2 class="accordion-header">
125
+ <button class="accordion-button collapsed" type="button"
126
+ data-bs-toggle="collapse" data-bs-target="#cfgURLs">
127
+ <i class="bi bi-link-45deg me-2"></i> URLs &amp; Deployment
128
+ </button>
129
+ </h2>
130
+ <div id="cfgURLs" class="accordion-collapse collapse" data-bs-parent="#configAccordion">
131
+ <div class="accordion-body p-0">
132
+ <div class="d-flex justify-content-end p-2 border-bottom">
133
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-section" data-section="cfgURLs" title="Copy section">
134
+ <i class="bi bi-clipboard"></i> Copy Section
135
+ </button>
136
+ </div>
137
+ <table class="table table-hover table-sm mb-0 align-middle">
138
+ <tbody>
139
+ {% assign url_keys = "url,baseurl,remote_theme,port,permalink,public_folder" | split: "," %}
140
+ {% for k in url_keys %}
141
+ {% assign v = site[k] %}
142
+ {% unless v == nil %}
143
+ <tr class="cfg-row" data-key="{{ k }}" data-value="{{ v | escape }}">
144
+ <td class="ps-3 text-nowrap fw-semibold" style="width:30%"><code>{{ k }}</code></td>
145
+ <td class="text-break small">{{ v | escape }}</td>
146
+ <td style="width:50px" class="text-end pe-3">
147
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-val py-0 px-1" data-value="{{ v | escape }}" title="Copy value">
148
+ <i class="bi bi-clipboard"></i>
149
+ </button>
150
+ </td>
151
+ </tr>
152
+ {% endunless %}
153
+ {% endfor %}
154
+ </tbody>
155
+ </table>
156
+ </div>
157
+ </div>
158
+ </div>
159
+
160
+ {% comment %} ──────────── Section: Personalization ──────────── {% endcomment %}
161
+ <div class="accordion-item cfg-section">
162
+ <h2 class="accordion-header">
163
+ <button class="accordion-button collapsed" type="button"
164
+ data-bs-toggle="collapse" data-bs-target="#cfgPersonal">
165
+ <i class="bi bi-palette me-2"></i> Personalization
166
+ </button>
167
+ </h2>
168
+ <div id="cfgPersonal" class="accordion-collapse collapse" data-bs-parent="#configAccordion">
169
+ <div class="accordion-body p-0">
170
+ <div class="d-flex justify-content-end p-2 border-bottom">
171
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-section" data-section="cfgPersonal" title="Copy section">
172
+ <i class="bi bi-clipboard"></i> Copy Section
173
+ </button>
174
+ </div>
175
+ <table class="table table-hover table-sm mb-0 align-middle">
176
+ <tbody>
177
+ {% assign personal_keys = "locale,logo,teaser,og_image,theme_skin,breadcrumbs,words_per_minute" | split: "," %}
178
+ {% for k in personal_keys %}
179
+ {% assign v = site[k] %}
180
+ {% if v %}
181
+ <tr class="cfg-row" data-key="{{ k }}" data-value="{{ v | escape }}">
182
+ <td class="ps-3 text-nowrap fw-semibold" style="width:30%"><code>{{ k }}</code></td>
183
+ <td class="text-break small">{{ v | escape }}</td>
184
+ <td style="width:50px" class="text-end pe-3">
185
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-val py-0 px-1" data-value="{{ v | escape }}" title="Copy value">
186
+ <i class="bi bi-clipboard"></i>
187
+ </button>
188
+ </td>
189
+ </tr>
190
+ {% endif %}
191
+ {% endfor %}
192
+ </tbody>
193
+ </table>
194
+ </div>
195
+ </div>
196
+ </div>
197
+
198
+ {% comment %} ──────────── Section: Analytics ──────────── {% endcomment %}
199
+ <div class="accordion-item cfg-section">
200
+ <h2 class="accordion-header">
201
+ <button class="accordion-button collapsed" type="button"
202
+ data-bs-toggle="collapse" data-bs-target="#cfgAnalytics">
203
+ <i class="bi bi-graph-up me-2"></i> Analytics
204
+ </button>
205
+ </h2>
206
+ <div id="cfgAnalytics" class="accordion-collapse collapse" data-bs-parent="#configAccordion">
207
+ <div class="accordion-body p-0">
208
+ <div class="d-flex justify-content-end p-2 border-bottom">
209
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-section" data-section="cfgAnalytics" title="Copy section">
210
+ <i class="bi bi-clipboard"></i> Copy Section
211
+ </button>
212
+ </div>
213
+ <table class="table table-hover table-sm mb-0 align-middle">
214
+ <tbody>
215
+ <tr class="cfg-row" data-key="google_analytics" data-value="{{ site.google_analytics }}">
216
+ <td class="ps-3 text-nowrap fw-semibold" style="width:30%"><code>google_analytics</code></td>
217
+ <td class="text-break small">{{ site.google_analytics | escape }}</td>
218
+ <td style="width:50px" class="text-end pe-3">
219
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-val py-0 px-1" data-value="{{ site.google_analytics | escape }}" title="Copy value">
220
+ <i class="bi bi-clipboard"></i>
221
+ </button>
222
+ </td>
223
+ </tr>
224
+ {% if site.posthog %}
225
+ <tr class="cfg-row" data-key="posthog.enabled" data-value="{{ site.posthog.enabled }}">
226
+ <td class="ps-3 text-nowrap fw-semibold"><code>posthog.enabled</code></td>
227
+ <td class="small">
228
+ {% if site.posthog.enabled %}
229
+ <span class="badge bg-success">true</span>
230
+ {% else %}
231
+ <span class="badge bg-secondary">false</span>
232
+ {% endif %}
233
+ </td>
234
+ <td style="width:50px" class="text-end pe-3">
235
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-val py-0 px-1" data-value="{{ site.posthog.enabled }}" title="Copy value">
236
+ <i class="bi bi-clipboard"></i>
237
+ </button>
238
+ </td>
239
+ </tr>
240
+ <tr class="cfg-row" data-key="posthog.api_host" data-value="{{ site.posthog.api_host }}">
241
+ <td class="ps-3 text-nowrap fw-semibold"><code>posthog.api_host</code></td>
242
+ <td class="text-break small">{{ site.posthog.api_host | escape }}</td>
243
+ <td style="width:50px" class="text-end pe-3">
244
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-val py-0 px-1" data-value="{{ site.posthog.api_host | escape }}" title="Copy value">
245
+ <i class="bi bi-clipboard"></i>
246
+ </button>
247
+ </td>
248
+ </tr>
249
+ <tr class="cfg-row" data-key="posthog.respect_dnt" data-value="{{ site.posthog.respect_dnt }}">
250
+ <td class="ps-3 text-nowrap fw-semibold"><code>posthog.respect_dnt</code></td>
251
+ <td class="small">
252
+ {% if site.posthog.respect_dnt %}
253
+ <span class="badge bg-success">true</span>
254
+ {% else %}
255
+ <span class="badge bg-secondary">false</span>
256
+ {% endif %}
257
+ </td>
258
+ <td style="width:50px" class="text-end pe-3">
259
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-val py-0 px-1" data-value="{{ site.posthog.respect_dnt }}" title="Copy value">
260
+ <i class="bi bi-clipboard"></i>
261
+ </button>
262
+ </td>
263
+ </tr>
264
+ <tr class="cfg-row" data-key="posthog.session_recording" data-value="{{ site.posthog.session_recording }}">
265
+ <td class="ps-3 text-nowrap fw-semibold"><code>posthog.session_recording</code></td>
266
+ <td class="small">
267
+ {% if site.posthog.session_recording %}
268
+ <span class="badge bg-success">true</span>
269
+ {% else %}
270
+ <span class="badge bg-secondary">false</span>
271
+ {% endif %}
272
+ </td>
273
+ <td style="width:50px" class="text-end pe-3">
274
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-val py-0 px-1" data-value="{{ site.posthog.session_recording }}" title="Copy value">
275
+ <i class="bi bi-clipboard"></i>
276
+ </button>
277
+ </td>
278
+ </tr>
279
+ {% endif %}
280
+ </tbody>
281
+ </table>
282
+ </div>
283
+ </div>
284
+ </div>
285
+
286
+ {% comment %} ──────────── Section: Collections ──────────── {% endcomment %}
287
+ <div class="accordion-item cfg-section">
288
+ <h2 class="accordion-header">
289
+ <button class="accordion-button collapsed" type="button"
290
+ data-bs-toggle="collapse" data-bs-target="#cfgCollections">
291
+ <i class="bi bi-collection me-2"></i> Collections
292
+ </button>
293
+ </h2>
294
+ <div id="cfgCollections" class="accordion-collapse collapse" data-bs-parent="#configAccordion">
295
+ <div class="accordion-body p-0">
296
+ <table class="table table-hover table-sm mb-0 align-middle">
297
+ <thead class="table-light">
298
+ <tr>
299
+ <th class="ps-3">Collection</th>
300
+ <th>Output</th>
301
+ <th>Items</th>
302
+ </tr>
303
+ </thead>
304
+ <tbody>
305
+ {% for collection in site.collections %}
306
+ <tr class="cfg-row" data-key="collections.{{ collection.label }}" data-value="{{ collection.label }}">
307
+ <td class="ps-3 fw-semibold"><code>{{ collection.label }}</code></td>
308
+ <td>
309
+ {% if collection.output %}
310
+ <span class="badge bg-success">yes</span>
311
+ {% else %}
312
+ <span class="badge bg-secondary">no</span>
313
+ {% endif %}
314
+ </td>
315
+ <td><span class="badge bg-primary">{{ collection.docs.size }}</span></td>
316
+ </tr>
317
+ {% endfor %}
318
+ </tbody>
319
+ </table>
320
+ </div>
321
+ </div>
322
+ </div>
323
+
324
+ {% comment %} ──────────── Section: Plugins ──────────── {% endcomment %}
325
+ <div class="accordion-item cfg-section">
326
+ <h2 class="accordion-header">
327
+ <button class="accordion-button collapsed" type="button"
328
+ data-bs-toggle="collapse" data-bs-target="#cfgPlugins">
329
+ <i class="bi bi-plug me-2"></i> Plugins
330
+ </button>
331
+ </h2>
332
+ <div id="cfgPlugins" class="accordion-collapse collapse" data-bs-parent="#configAccordion">
333
+ <div class="accordion-body p-0">
334
+ <div class="d-flex justify-content-end p-2 border-bottom">
335
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-section" data-section="cfgPlugins" title="Copy section">
336
+ <i class="bi bi-clipboard"></i> Copy Section
337
+ </button>
338
+ </div>
339
+ <ul class="list-group list-group-flush">
340
+ {% for plugin in site.plugins %}
341
+ <li class="list-group-item cfg-row d-flex justify-content-between align-items-center" data-key="plugins" data-value="{{ plugin }}">
342
+ <code>{{ plugin }}</code>
343
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-val py-0 px-1" data-value="{{ plugin }}" title="Copy plugin name">
344
+ <i class="bi bi-clipboard"></i>
345
+ </button>
346
+ </li>
347
+ {% endfor %}
348
+ </ul>
349
+ </div>
350
+ </div>
351
+ </div>
352
+
353
+ {% comment %} ──────────── Section: Build & Markdown ──────────── {% endcomment %}
354
+ <div class="accordion-item cfg-section">
355
+ <h2 class="accordion-header">
356
+ <button class="accordion-button collapsed" type="button"
357
+ data-bs-toggle="collapse" data-bs-target="#cfgBuild">
358
+ <i class="bi bi-hammer me-2"></i> Build &amp; Markdown
359
+ </button>
360
+ </h2>
361
+ <div id="cfgBuild" class="accordion-collapse collapse" data-bs-parent="#configAccordion">
362
+ <div class="accordion-body p-0">
363
+ <div class="d-flex justify-content-end p-2 border-bottom">
364
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-section" data-section="cfgBuild" title="Copy section">
365
+ <i class="bi bi-clipboard"></i> Copy Section
366
+ </button>
367
+ </div>
368
+ <table class="table table-hover table-sm mb-0 align-middle">
369
+ <tbody>
370
+ {% assign build_keys = "markdown,collections_dir,paginate,paginate_path" | split: "," %}
371
+ {% for k in build_keys %}
372
+ {% assign v = site[k] %}
373
+ {% unless v == nil %}
374
+ <tr class="cfg-row" data-key="{{ k }}" data-value="{{ v | escape }}">
375
+ <td class="ps-3 text-nowrap fw-semibold" style="width:30%"><code>{{ k }}</code></td>
376
+ <td class="text-break small">{{ v | escape }}</td>
377
+ <td style="width:50px" class="text-end pe-3">
378
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-val py-0 px-1" data-value="{{ v | escape }}" title="Copy value">
379
+ <i class="bi bi-clipboard"></i>
380
+ </button>
381
+ </td>
382
+ </tr>
383
+ {% endunless %}
384
+ {% endfor %}
385
+ {% if site.kramdown %}
386
+ <tr class="cfg-row" data-key="kramdown.input" data-value="{{ site.kramdown.input }}">
387
+ <td class="ps-3 text-nowrap fw-semibold"><code>kramdown.input</code></td>
388
+ <td class="text-break small">{{ site.kramdown.input | escape }}</td>
389
+ <td style="width:50px" class="text-end pe-3">
390
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-val py-0 px-1" data-value="{{ site.kramdown.input | escape }}" title="Copy value">
391
+ <i class="bi bi-clipboard"></i>
392
+ </button>
393
+ </td>
394
+ </tr>
395
+ <tr class="cfg-row" data-key="kramdown.toc_levels" data-value="{{ site.kramdown.toc_levels }}">
396
+ <td class="ps-3 text-nowrap fw-semibold"><code>kramdown.toc_levels</code></td>
397
+ <td class="text-break small">{{ site.kramdown.toc_levels | escape }}</td>
398
+ <td style="width:50px" class="text-end pe-3">
399
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-val py-0 px-1" data-value="{{ site.kramdown.toc_levels | escape }}" title="Copy value">
400
+ <i class="bi bi-clipboard"></i>
401
+ </button>
402
+ </td>
403
+ </tr>
404
+ {% endif %}
405
+ </tbody>
406
+ </table>
407
+ </div>
408
+ </div>
409
+ </div>
410
+
411
+ {% comment %} ──────────── Section: Theme Colors ──────────── {% endcomment %}
412
+ {% if site.theme_color %}
413
+ <div class="accordion-item cfg-section">
414
+ <h2 class="accordion-header">
415
+ <button class="accordion-button collapsed" type="button"
416
+ data-bs-toggle="collapse" data-bs-target="#cfgColors">
417
+ <i class="bi bi-paint-bucket me-2"></i> Theme Colors
418
+ </button>
419
+ </h2>
420
+ <div id="cfgColors" class="accordion-collapse collapse" data-bs-parent="#configAccordion">
421
+ <div class="accordion-body p-0">
422
+ <div class="d-flex justify-content-end p-2 border-bottom">
423
+ <button class="btn btn-sm btn-outline-secondary cfg-copy-section" data-section="cfgColors" title="Copy section">
424
+ <i class="bi bi-clipboard"></i> Copy Section
425
+ </button>
426
+ </div>
427
+ <div class="row g-2 p-3">
428
+ {% for color in site.theme_color %}
429
+ <div class="col-6 col-md-4 col-lg-3 cfg-row" data-key="theme_color.{{ color[0] }}" data-value="{{ color[1] }}">
430
+ <div class="d-flex align-items-center p-2 border rounded">
431
+ <span class="d-inline-block rounded me-2" style="width:24px;height:24px;background:{{ color[1] }};border:1px solid rgba(0,0,0,.15)"></span>
432
+ <div class="small">
433
+ <div class="fw-semibold">{{ color[0] }}</div>
434
+ <code class="text-muted" style="font-size:.75rem">{{ color[1] }}</code>
435
+ </div>
436
+ </div>
437
+ </div>
438
+ {% endfor %}
439
+ </div>
440
+ </div>
441
+ </div>
442
+ </div>
443
+ {% endif %}
444
+
445
+ {% comment %} ──────────── Section: Powered By ──────────── {% endcomment %}
446
+ {% if site.powered_by %}
447
+ <div class="accordion-item cfg-section">
448
+ <h2 class="accordion-header">
449
+ <button class="accordion-button collapsed" type="button"
450
+ data-bs-toggle="collapse" data-bs-target="#cfgPoweredBy">
451
+ <i class="bi bi-lightning-charge me-2"></i> Powered By
452
+ </button>
453
+ </h2>
454
+ <div id="cfgPoweredBy" class="accordion-collapse collapse" data-bs-parent="#configAccordion">
455
+ <div class="accordion-body p-0">
456
+ <div class="row g-2 p-3">
457
+ {% for tech in site.powered_by %}
458
+ <div class="col-6 col-md-4 cfg-row" data-key="powered_by" data-value="{{ tech.name }}">
459
+ <div class="d-flex align-items-center p-2 border rounded">
460
+ <i class="{{ site.default_icon | default: 'bi' }} {{ tech.icon | default: 'bi-box' }} me-2 fs-5"></i>
461
+ <div class="small">
462
+ <a href="{{ tech.url }}" target="_blank" rel="noopener" class="fw-semibold text-decoration-none">
463
+ {{ tech.name }}
464
+ </a>
465
+ {% if tech.version %}<span class="text-muted ms-1">v{{ tech.version }}</span>{% endif %}
466
+ </div>
467
+ </div>
468
+ </div>
469
+ {% endfor %}
470
+ </div>
471
+ </div>
472
+ </div>
473
+ </div>
474
+ {% endif %}
475
+
476
+ </div><!-- /configAccordion -->
477
+
478
+ <!-- ── Hidden full YAML for copy-all (populated by parent page) ──── -->
479
+ <!-- The parent page must render: <pre id="cfg-full-yaml" class="d-none">…</pre> -->
@@ -49,7 +49,7 @@ Usage: Include in root.html layout
49
49
  Configuration: Uses site.posthog settings from _config.yml
50
50
  {% endcomment %}
51
51
 
52
- <div id="cookieConsent" class="cookie-consent-banner position-fixed bottom-0 start-0 end-0 bg-dark text-light py-3 px-3 shadow-lg">
52
+ <div id="cookieConsent" class="cookie-consent-banner position-fixed bottom-0 start-0 end-0 bg-dark text-light py-3 px-3 shadow-lg" hidden>
53
53
  <div class="container-xl px-3 px-md-4">
54
54
  <div class="row align-items-center g-2">
55
55
  <div class="col-12 col-lg-8">
@@ -249,42 +249,41 @@ Configuration: Uses site.posthog settings from _config.yml
249
249
  function showConsentBanner() {
250
250
  const banner = document.getElementById('cookieConsent');
251
251
  if (!banner) return;
252
-
253
- // Ensure banner starts completely hidden - remove all classes and inline styles
254
- banner.classList.remove('cookie-banner-showing', 'cookie-banner-visible');
255
- banner.removeAttribute('style'); // Remove all inline styles to let CSS take over
256
-
257
- // Wait for the delay, then show and animate in one smooth motion
252
+
253
+ // Reveal the element (CSS keeps it translated off-screen + opacity:0).
254
+ banner.hidden = false;
255
+ banner.classList.remove('cookie-banner-visible');
256
+
258
257
  setTimeout(() => {
259
- // First, make it visible but still off-screen (using class for CSS control)
260
- banner.classList.add('cookie-banner-showing');
261
-
262
- // Force a reflow to ensure the display change is applied
258
+ // Force reflow so the next class change actually animates.
263
259
  void banner.offsetHeight;
264
-
265
- // On the next frame, animate it in smoothly
266
- requestAnimationFrame(() => {
267
- requestAnimationFrame(() => {
268
- banner.classList.add('cookie-banner-visible');
269
- });
270
- });
271
- }, 1000); // Show after 1 second
260
+ banner.classList.add('cookie-banner-visible');
261
+ }, 1000);
272
262
  }
273
263
 
274
264
  // Hide consent banner
275
265
  function hideConsentBanner() {
276
266
  const banner = document.getElementById('cookieConsent');
277
- if (banner) {
278
- // Remove visible class to trigger transition out
279
- banner.classList.remove('cookie-banner-visible');
280
-
281
- // Hide after transition completes
282
- banner.addEventListener('transitionend', function hideAfterTransition() {
283
- banner.classList.remove('cookie-banner-showing');
284
- banner.removeAttribute('style'); // Clean up inline styles
285
- banner.removeEventListener('transitionend', hideAfterTransition);
286
- }, { once: true });
287
- }
267
+ if (!banner) return;
268
+
269
+ banner.classList.remove('cookie-banner-visible');
270
+
271
+ let done = false;
272
+ const finish = () => {
273
+ if (done) return;
274
+ done = true;
275
+ banner.hidden = true;
276
+ banner.removeEventListener('transitionend', onEnd);
277
+ };
278
+ const onEnd = (e) => {
279
+ if (e.target !== banner) return;
280
+ if (e.propertyName !== 'transform' && e.propertyName !== 'opacity') return;
281
+ finish();
282
+ };
283
+ banner.addEventListener('transitionend', onEnd);
284
+ // Fallback in case transitionend never fires (reduced-motion, interrupted transition,
285
+ // background tab, etc.). Slightly longer than the longest CSS transition (0.4s).
286
+ setTimeout(finish, 500);
288
287
  }
289
288
 
290
289
  // Update modal UI with current preferences
@@ -306,26 +305,13 @@ Configuration: Uses site.posthog settings from _config.yml
306
305
  // Initialize on DOM content loaded
307
306
  document.addEventListener('DOMContentLoaded', function() {
308
307
  const banner = document.getElementById('cookieConsent');
309
-
310
- // Ensure banner starts completely hidden BEFORE any checks
311
- // Remove all classes and inline styles - let CSS handle hiding
312
- if (banner) {
313
- banner.classList.remove('cookie-banner-showing', 'cookie-banner-visible');
314
- banner.removeAttribute('style');
315
- }
316
-
317
308
  const existingConsent = getConsentState();
318
-
309
+
319
310
  if (existingConsent) {
320
- // Apply existing consent and ensure banner stays hidden
321
311
  applyConsent(existingConsent);
322
312
  updateModalUI(existingConsent);
323
- if (banner) {
324
- banner.classList.remove('cookie-banner-showing', 'cookie-banner-visible');
325
- banner.removeAttribute('style');
326
- }
327
- } else {
328
- // Show consent banner for new visitors (with delay)
313
+ // Banner already starts hidden via the `hidden` attribute — nothing to do.
314
+ } else if (banner) {
329
315
  showConsentBanner();
330
316
  }
331
317
 
@@ -385,70 +371,19 @@ Configuration: Uses site.posthog settings from _config.yml
385
371
  </script>
386
372
 
387
373
  <style>
388
- /* Banner base styles */
389
- #cookieConsent {
390
- z-index: 9999;
391
- transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
392
- }
393
-
394
- /* Banner starts completely hidden - CSS enforces this */
395
- #cookieConsent:not(.cookie-banner-showing) {
396
- display: none !important;
397
- visibility: hidden !important;
398
- opacity: 0 !important;
399
- transform: translateY(100%) !important;
400
- }
401
-
402
- .cookie-consent-banner {
403
- background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
404
- backdrop-filter: blur(10px);
405
- border-top: 1px solid rgba(255, 255, 255, 0.1);
406
- }
407
-
408
- /* Only show banner when explicitly enabled via JavaScript class */
409
- #cookieConsent.cookie-banner-showing {
410
- display: block !important;
411
- visibility: visible !important;
412
- opacity: 0;
413
- transform: translateY(100%);
414
- }
415
-
416
- /* Animate in when visible class is added */
417
- #cookieConsent.cookie-banner-showing.cookie-banner-visible {
418
- opacity: 1 !important;
419
- transform: translateY(0) !important;
420
- }
421
-
374
+ /* Modal-only helpers; banner styling lives in _sass/custom.scss */
422
375
  .cursor-pointer {
423
376
  cursor: pointer;
424
377
  }
425
-
378
+
426
379
  .cookie-category {
427
380
  border: 1px solid #dee2e6;
428
381
  border-radius: 8px;
429
382
  padding: 1rem;
430
383
  }
431
-
384
+
432
385
  .form-check-input:checked {
433
386
  background-color: var(--bs-success);
434
387
  border-color: var(--bs-success);
435
388
  }
436
-
437
- @media (max-width: 768px) {
438
- .cookie-consent-banner .btn {
439
- width: 100%;
440
- margin-bottom: 0.5rem;
441
- }
442
-
443
- .cookie-consent-banner .btn:last-child {
444
- margin-bottom: 0;
445
- }
446
- }
447
-
448
- /* Respect reduced motion preferences */
449
- @media (prefers-reduced-motion: reduce) {
450
- .cookie-consent-banner {
451
- transition: none !important;
452
- }
453
- }
454
389
  </style>