jekyll-theme-zer0 1.24.0 → 1.25.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +94 -0
- data/README.md +3 -3
- data/_data/authors.yml +1 -0
- data/_data/features.yml +37 -2
- data/_data/navigation/README.md +15 -5
- data/_data/navigation/main.yml +0 -8
- data/_data/roadmap.yml +1 -0
- data/_includes/README.md +10 -7
- data/_includes/analytics/google-analytics.html +1 -0
- data/_includes/analytics/google-tag-manager-body.html +1 -0
- data/_includes/analytics/google-tag-manager-head.html +1 -0
- data/_includes/analytics/posthog.html +1 -0
- data/_includes/components/README.md +2 -1
- data/_includes/components/admin-links.html +63 -0
- data/_includes/components/admin-tabs.html +1 -0
- data/_includes/components/ai-chat.html +27 -5
- data/_includes/components/author-eeat.html +1 -0
- data/_includes/components/background-customizer.html +1 -0
- data/_includes/components/background-settings.html +36 -37
- data/_includes/components/component-showcase.html +1 -0
- data/_includes/components/cookie-consent.html +1 -0
- data/_includes/components/dev-shortcuts.html +1 -8
- data/_includes/components/env-switcher.html +90 -138
- data/_includes/components/feature-card.html +1 -1
- data/_includes/components/halfmoon.html +22 -41
- data/_includes/components/info-section.html +127 -130
- data/_includes/components/mermaid.html +1 -0
- data/_includes/components/nanobar.html +1 -0
- data/_includes/components/post-type-badge.html +1 -0
- data/_includes/components/preview-image.html +1 -0
- data/_includes/components/search-modal.html +1 -0
- data/_includes/components/searchbar.html +1 -0
- data/_includes/components/shortcuts-modal.html +1 -0
- data/_includes/components/theme-info.html +21 -30
- data/_includes/components/theme-preview-gallery.html +1 -0
- data/_includes/content/backlinks.html +1 -0
- data/_includes/content/giscus.html +1 -0
- data/_includes/content/jsonld-faq.html +1 -0
- data/_includes/content/seo.html +1 -0
- data/_includes/content/sitemap.html +1 -0
- data/_includes/content/toc.html +1 -0
- data/_includes/core/color-mode-init.html +1 -0
- data/_includes/core/footer.html +1 -0
- data/_includes/core/head.html +1 -0
- data/_includes/core/header.html +5 -15
- data/_includes/navigation/admin-nav.html +1 -0
- data/_includes/navigation/breadcrumbs.html +1 -0
- data/_includes/navigation/local-graph-fab.html +3 -9
- data/_includes/navigation/local-graph.html +4 -9
- data/_includes/navigation/navbar.html +1 -0
- data/_includes/navigation/sidebar-categories.html +56 -14
- data/_includes/navigation/sidebar-config.html +115 -0
- data/_includes/navigation/sidebar-folders.html +168 -62
- data/_includes/navigation/sidebar-left.html +29 -52
- data/_includes/navigation/sidebar-nav.html +30 -0
- data/_includes/navigation/sidebar-right.html +1 -0
- data/_includes/navigation/toc-fab.html +3 -9
- data/_includes/navigation/unified-drawer.html +7 -14
- data/_includes/obsidian/full-graph.html +1 -0
- data/_includes/setup/wizard.html +1 -0
- data/_includes/stats/stats-categories.html +1 -0
- data/_includes/stats/stats-header.html +1 -0
- data/_includes/stats/stats-metrics.html +1 -0
- data/_includes/stats/stats-overview.html +1 -0
- data/_includes/stats/stats-tags.html +1 -0
- data/_layouts/admin.html +1 -0
- data/_layouts/article.html +1 -0
- data/_layouts/author.html +1 -0
- data/_layouts/authors.html +1 -0
- data/_layouts/collection.html +1 -0
- data/_layouts/default.html +14 -37
- data/_layouts/home.html +1 -0
- data/_layouts/index.html +1 -0
- data/_layouts/landing.html +1 -0
- data/_layouts/news.html +1 -0
- data/_layouts/note.html +1 -0
- data/_layouts/notebook.html +1 -0
- data/_layouts/root.html +3 -2
- data/_layouts/search.html +1 -0
- data/_layouts/section.html +1 -0
- data/_layouts/setup.html +1 -0
- data/_layouts/sitemap-collection.html +1 -0
- data/_layouts/stats.html +1 -0
- data/_layouts/tag.html +1 -0
- data/_layouts/welcome.html +1 -0
- data/_plugins/author_pages_generator.rb +1 -0
- data/_plugins/obsidian_links.rb +1 -0
- data/_plugins/preview_image_generator.rb +1 -0
- data/_plugins/search_and_sitemap_generator.rb +1 -0
- data/_plugins/theme_version.rb +1 -0
- data/_sass/components/_author.scss +12 -1
- data/_sass/components/_footer.scss +22 -0
- data/_sass/components/_ui-enhancements.scss +9 -0
- data/_sass/core/_docs-layout.scss +1 -0
- data/_sass/core/_navbar.scss +10 -27
- data/_sass/core/_obsidian.scss +2 -2
- data/_sass/core/code-copy.scss +10 -0
- data/_sass/custom.scss +1 -0
- data/_sass/notebooks.scss +1 -0
- data/_sass/theme/_backgrounds.scss +7 -2
- data/_sass/utilities/_layout.scss +11 -0
- data/assets/css/main.scss +2 -1
- data/assets/js/ai-chat.js +1 -0
- data/assets/js/author-profile.js +1 -0
- data/assets/js/auto-hide-nav.js +1 -0
- data/assets/js/back-to-top.js +1 -0
- data/assets/js/background-customizer.js +1 -0
- data/assets/js/code-copy.js +1 -0
- data/assets/js/halfmoon.js +23 -22
- data/assets/js/modules/navigation/gestures.js +1 -0
- data/assets/js/modules/navigation/keyboard.js +1 -0
- data/assets/js/modules/navigation/scroll-spy.js +1 -0
- data/assets/js/modules/navigation/sidebar-state.js +1 -0
- data/assets/js/modules/navigation/sidebar-visibility.js +1 -0
- data/assets/js/modules/navigation/smooth-scroll.js +1 -0
- data/assets/js/modules/theme/appearance.js +52 -16
- data/assets/js/nanobar-init.js +1 -0
- data/assets/js/navigation.js +1 -0
- data/assets/js/obsidian-graph.js +1 -0
- data/assets/js/obsidian-wiki-links.js +1 -0
- data/assets/js/palette-generator.js +1 -0
- data/assets/js/particles-source.js +1 -0
- data/assets/js/search-modal.js +1 -0
- data/assets/js/setup-wizard.js +1 -0
- data/assets/js/share-actions.js +1 -0
- data/assets/js/skin-editor.js +1 -0
- data/assets/js/table-copy.js +1 -0
- data/assets/js/theme-customizer.js +1 -0
- data/scripts/analyze-commits.sh +1 -0
- data/scripts/bin/giscus-discussions +1 -0
- data/scripts/bin/install +1 -0
- data/scripts/bin/validate +1 -0
- data/scripts/build +1 -0
- data/scripts/content-review.rb +1 -0
- data/scripts/convert-notebooks.sh +4 -3
- data/scripts/fix-markdown-format.sh +1 -0
- data/scripts/generate-preview-images.sh +1 -0
- data/scripts/generate-roadmap.sh +1 -0
- data/scripts/install-preview-generator.sh +1 -0
- data/scripts/release +1 -0
- data/scripts/requirements.txt +11 -0
- data/scripts/setup.sh +1 -0
- data/scripts/tag-features +136 -0
- data/scripts/validate-features.rb +7 -0
- data/scripts/vendor-install.sh +1 -0
- metadata +8 -3
- data/_plugins/admin_page_urls.rb +0 -16
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
{% comment %} Feature: ZER0-077 {% endcomment %}
|
|
1
2
|
<!--
|
|
2
3
|
===================================================================
|
|
3
4
|
DEV SHORTCUTS - Source Code Quick Access Links
|
|
@@ -46,8 +47,6 @@
|
|
|
46
47
|
target="_blank"
|
|
47
48
|
rel="noopener"
|
|
48
49
|
class="btn btn-outline-secondary btn-sm d-flex align-items-center justify-content-between"
|
|
49
|
-
data-bs-toggle="tooltip"
|
|
50
|
-
data-bs-placement="left"
|
|
51
50
|
title="View source file on GitHub">
|
|
52
51
|
<span>
|
|
53
52
|
<i class="bi bi-github me-2"></i>
|
|
@@ -61,8 +60,6 @@
|
|
|
61
60
|
target="_blank"
|
|
62
61
|
rel="noopener"
|
|
63
62
|
class="btn btn-outline-secondary btn-sm d-flex align-items-center justify-content-between"
|
|
64
|
-
data-bs-toggle="tooltip"
|
|
65
|
-
data-bs-placement="left"
|
|
66
63
|
title="Open in browser-based VS Code editor">
|
|
67
64
|
<span>
|
|
68
65
|
<i class="bi bi-cloud me-2"></i>
|
|
@@ -76,8 +73,6 @@
|
|
|
76
73
|
{% if git_home != "" %}
|
|
77
74
|
<a href="vscode://file{{ vscode_full_path }}"
|
|
78
75
|
class="btn btn-outline-secondary btn-sm d-flex align-items-center justify-content-between"
|
|
79
|
-
data-bs-toggle="tooltip"
|
|
80
|
-
data-bs-placement="left"
|
|
81
76
|
title="Open in local VS Code (requires local clone at this path)">
|
|
82
77
|
<span>
|
|
83
78
|
<i class="bi bi-code-square me-2"></i>
|
|
@@ -102,8 +97,6 @@
|
|
|
102
97
|
target="_blank"
|
|
103
98
|
rel="noopener"
|
|
104
99
|
class="btn btn-outline-secondary btn-sm d-flex align-items-center justify-content-between"
|
|
105
|
-
data-bs-toggle="tooltip"
|
|
106
|
-
data-bs-placement="left"
|
|
107
100
|
title="View Jekyll site configuration">
|
|
108
101
|
<span>
|
|
109
102
|
<i class="bi bi-gear me-2"></i>
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
+
{% comment %} Feature: ZER0-077 {% endcomment %}
|
|
1
2
|
<!--
|
|
2
3
|
===================================================================
|
|
3
4
|
ENVIRONMENT SWITCHER - Dev/Prod URL Display and Toggle
|
|
4
5
|
===================================================================
|
|
5
|
-
|
|
6
|
+
|
|
6
7
|
File: env-switcher.html
|
|
7
8
|
Path: _includes/components/env-switcher.html
|
|
8
9
|
Purpose: Display current environment and provide URL switching
|
|
9
|
-
|
|
10
|
+
|
|
10
11
|
Dependencies:
|
|
11
|
-
-
|
|
12
|
+
- is_production / build_env / is_local_url: set by env-detect.html
|
|
13
|
+
in info-section.html (the parent renders the section heading)
|
|
12
14
|
- site.domain_url: Canonical production origin (YAML array joined in Liquid); not overridden by jekyll serve
|
|
13
15
|
- site.url: Overwritten during jekyll serve — do not use alone for “Prod” quick links
|
|
14
16
|
- site.port: Development port (default 4000)
|
|
17
|
+
- Copy buttons use data-zer0-copy / data-zer0-copy-target, handled by
|
|
18
|
+
the delegated listener in info-section.html (no inline handlers)
|
|
15
19
|
- Bootstrap 5 components
|
|
16
|
-
|
|
20
|
+
|
|
17
21
|
Note: Docker / JEKYLL_ENV=production on localhost would show "Production"
|
|
18
22
|
while you are clearly on a dev machine. We treat localhost / 127.0.0.1 / 0.0.0.0
|
|
19
23
|
in site.url as development context for the badge and card styling.
|
|
24
|
+
|
|
25
|
+
Build time / Jekyll version live in theme-info.html (Theme & Build
|
|
26
|
+
section) — not duplicated here.
|
|
20
27
|
===================================================================
|
|
21
28
|
-->
|
|
22
29
|
|
|
23
|
-
{% comment %}is_production / build_env / is_local_url: set by env-detect.html in info-section.html{% endcomment %}
|
|
24
30
|
{% assign dev_port = site.port | default: 4000 %}
|
|
25
31
|
{% comment %}Prod links must not use site.url during serve (Jekyll sets it to 0.0.0.0:4000 etc.){% endcomment %}
|
|
26
32
|
{% if site.domain_url %}
|
|
@@ -37,67 +43,53 @@
|
|
|
37
43
|
<div class="card mb-3 {% if is_production %}border-success{% else %}border-warning{% endif %}">
|
|
38
44
|
<div class="card-header d-flex align-items-center justify-content-between py-2 {% if is_production %}bg-success{% else %}bg-warning{% endif %} bg-opacity-10">
|
|
39
45
|
<span class="fw-semibold">
|
|
40
|
-
<i class="bi {% if is_production %}bi-cloud-check{% else %}bi-pc-display{% endif %} me-2"></i>
|
|
46
|
+
<i class="bi {% if is_production %}bi-cloud-check{% else %}bi-pc-display{% endif %} me-2" aria-hidden="true"></i>
|
|
41
47
|
Current Environment
|
|
42
48
|
</span>
|
|
43
49
|
{% if is_production %}
|
|
44
50
|
<span class="badge bg-success">
|
|
45
|
-
<i class="bi bi-globe me-1"></i>Production
|
|
51
|
+
<i class="bi bi-globe me-1" aria-hidden="true"></i>Production
|
|
46
52
|
</span>
|
|
47
53
|
{% else %}
|
|
48
54
|
<span class="badge bg-warning text-dark">
|
|
49
|
-
<i class="bi bi-code-slash me-1"></i>Dev
|
|
55
|
+
<i class="bi bi-code-slash me-1" aria-hidden="true"></i>Dev
|
|
50
56
|
</span>
|
|
51
57
|
{% endif %}
|
|
52
58
|
</div>
|
|
53
59
|
<div class="card-body">
|
|
54
60
|
<!-- Active URL Display -->
|
|
55
|
-
<
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
</div>
|
|
61
|
+
<label class="form-label small text-body-secondary mb-1" for="currentUrlInput">
|
|
62
|
+
<i class="bi bi-link-45deg me-1" aria-hidden="true"></i>Current Page URL
|
|
63
|
+
</label>
|
|
64
|
+
<div class="input-group input-group-sm">
|
|
65
|
+
<span class="input-group-text">
|
|
66
|
+
<i class="bi {% if is_production %}bi-lock{% else %}bi-unlock{% endif %}" aria-hidden="true"></i>
|
|
67
|
+
</span>
|
|
68
|
+
<input type="text"
|
|
69
|
+
class="form-control font-monospace"
|
|
70
|
+
value="{% if is_production %}{{ prod_url }}{% else %}{{ dev_url }}{% endif %}{{ page.url }}"
|
|
71
|
+
readonly
|
|
72
|
+
id="currentUrlInput">
|
|
73
|
+
<button class="btn btn-outline-secondary"
|
|
74
|
+
type="button"
|
|
75
|
+
data-zer0-copy-target="#currentUrlInput"
|
|
76
|
+
aria-label="Copy current page URL"
|
|
77
|
+
title="Copy to clipboard">
|
|
78
|
+
<i class="bi bi-clipboard" aria-hidden="true"></i>
|
|
79
|
+
</button>
|
|
75
80
|
</div>
|
|
76
81
|
|
|
77
|
-
<!-- Build
|
|
78
|
-
<
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
</
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<strong class="small">v{{ jekyll.version }}</strong>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
<div class="col-12">
|
|
92
|
-
<div class="p-2 bg-body-tertiary rounded text-start">
|
|
93
|
-
<small class="text-body-secondary d-block">Build env (JEKYLL_ENV)</small>
|
|
94
|
-
<strong class="small font-monospace text-body">{{ build_env }}</strong>
|
|
95
|
-
{% if is_local_url and build_env == "production" %}
|
|
96
|
-
<div class="small text-body-secondary mt-1">Serving on a local URL — UI shows <strong>Dev</strong> above.</div>
|
|
97
|
-
{% endif %}
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
82
|
+
<!-- Build context -->
|
|
83
|
+
<p class="small text-body-secondary mb-0 mt-3">
|
|
84
|
+
Built with <code>JEKYLL_ENV={{ build_env }}</code>.
|
|
85
|
+
{% if is_production %}
|
|
86
|
+
Changes require deployment.
|
|
87
|
+
{% elsif is_local_url and build_env == "production" %}
|
|
88
|
+
Serving on a local URL — treated as <strong>Dev</strong>.
|
|
89
|
+
{% else %}
|
|
90
|
+
Changes auto-reload under <code>jekyll serve</code>.
|
|
91
|
+
{% endif %}
|
|
92
|
+
</p>
|
|
101
93
|
</div>
|
|
102
94
|
</div>
|
|
103
95
|
|
|
@@ -105,130 +97,90 @@
|
|
|
105
97
|
<div class="card border-secondary">
|
|
106
98
|
<div class="card-header py-2 bg-body-tertiary">
|
|
107
99
|
<span class="fw-semibold small">
|
|
108
|
-
<i class="bi bi-signpost-2 me-2"></i>Quick Links
|
|
100
|
+
<i class="bi bi-signpost-2 me-2" aria-hidden="true"></i>Quick Links
|
|
109
101
|
</span>
|
|
110
102
|
</div>
|
|
111
103
|
<ul class="list-group list-group-flush">
|
|
112
104
|
<!-- Production URL -->
|
|
113
|
-
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
114
|
-
<div class="d-flex align-items-center">
|
|
105
|
+
<li class="list-group-item d-flex justify-content-between align-items-center gap-2">
|
|
106
|
+
<div class="d-flex align-items-center min-w-0">
|
|
115
107
|
<span class="badge bg-success me-2">Prod</span>
|
|
116
|
-
<a href="{{ prod_url }}{{ page.url }}"
|
|
117
|
-
target="_blank"
|
|
118
|
-
rel="noopener"
|
|
119
|
-
class="text-decoration-none font-monospace small text-truncate"
|
|
120
|
-
style="max-width: 180px;"
|
|
108
|
+
<a href="{{ prod_url }}{{ page.url }}"
|
|
109
|
+
target="_blank"
|
|
110
|
+
rel="noopener"
|
|
111
|
+
class="text-decoration-none font-monospace small text-truncate min-w-0"
|
|
121
112
|
title="{{ prod_url }}{{ page.url }}">
|
|
122
|
-
{{ canonical_prod_origin | remove: "https://" | remove: "http://"
|
|
113
|
+
{{ canonical_prod_origin | remove: "https://" | remove: "http://" }}{{ page.url }}
|
|
123
114
|
</a>
|
|
124
115
|
</div>
|
|
125
|
-
<div class="btn-group btn-group-sm">
|
|
126
|
-
<a href="{{ prod_url }}{{ page.url }}"
|
|
127
|
-
target="_blank"
|
|
128
|
-
rel="noopener"
|
|
129
|
-
class="btn btn-outline-success"
|
|
116
|
+
<div class="btn-group btn-group-sm flex-shrink-0">
|
|
117
|
+
<a href="{{ prod_url }}{{ page.url }}"
|
|
118
|
+
target="_blank"
|
|
119
|
+
rel="noopener"
|
|
120
|
+
class="btn btn-outline-success"
|
|
121
|
+
aria-label="Open production URL in new tab"
|
|
130
122
|
title="Open in new tab">
|
|
131
|
-
<i class="bi bi-box-arrow-up-right"></i>
|
|
123
|
+
<i class="bi bi-box-arrow-up-right" aria-hidden="true"></i>
|
|
132
124
|
</a>
|
|
133
|
-
<button class="btn btn-outline-secondary"
|
|
125
|
+
<button class="btn btn-outline-secondary"
|
|
134
126
|
type="button"
|
|
135
|
-
|
|
127
|
+
data-zer0-copy="{{ prod_url }}{{ page.url }}"
|
|
128
|
+
aria-label="Copy production URL"
|
|
136
129
|
title="Copy URL">
|
|
137
|
-
<i class="bi bi-clipboard"></i>
|
|
130
|
+
<i class="bi bi-clipboard" aria-hidden="true"></i>
|
|
138
131
|
</button>
|
|
139
132
|
</div>
|
|
140
133
|
</li>
|
|
141
134
|
|
|
142
135
|
<!-- Development URL -->
|
|
143
|
-
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
144
|
-
<div class="d-flex align-items-center">
|
|
136
|
+
<li class="list-group-item d-flex justify-content-between align-items-center gap-2">
|
|
137
|
+
<div class="d-flex align-items-center min-w-0">
|
|
145
138
|
<span class="badge bg-warning text-dark me-2">Dev</span>
|
|
146
|
-
<a href="{{ dev_url }}{{ page.url }}"
|
|
147
|
-
target="_blank"
|
|
148
|
-
rel="noopener"
|
|
149
|
-
class="text-decoration-none font-monospace small text-truncate"
|
|
150
|
-
style="max-width: 180px;"
|
|
139
|
+
<a href="{{ dev_url }}{{ page.url }}"
|
|
140
|
+
target="_blank"
|
|
141
|
+
rel="noopener"
|
|
142
|
+
class="text-decoration-none font-monospace small text-truncate min-w-0"
|
|
151
143
|
title="{{ dev_url }}{{ page.url }}">
|
|
152
|
-
localhost:{{ dev_port }}{{ page.url
|
|
144
|
+
localhost:{{ dev_port }}{{ page.url }}
|
|
153
145
|
</a>
|
|
154
146
|
</div>
|
|
155
|
-
<div class="btn-group btn-group-sm">
|
|
156
|
-
<a href="{{ dev_url }}{{ page.url }}"
|
|
157
|
-
target="_blank"
|
|
158
|
-
rel="noopener"
|
|
159
|
-
class="btn btn-outline-warning"
|
|
147
|
+
<div class="btn-group btn-group-sm flex-shrink-0">
|
|
148
|
+
<a href="{{ dev_url }}{{ page.url }}"
|
|
149
|
+
target="_blank"
|
|
150
|
+
rel="noopener"
|
|
151
|
+
class="btn btn-outline-warning"
|
|
152
|
+
aria-label="Open development URL in new tab"
|
|
160
153
|
title="Open in new tab">
|
|
161
|
-
<i class="bi bi-box-arrow-up-right"></i>
|
|
154
|
+
<i class="bi bi-box-arrow-up-right" aria-hidden="true"></i>
|
|
162
155
|
</a>
|
|
163
|
-
<button class="btn btn-outline-secondary"
|
|
156
|
+
<button class="btn btn-outline-secondary"
|
|
164
157
|
type="button"
|
|
165
|
-
|
|
158
|
+
data-zer0-copy="{{ dev_url }}{{ page.url }}"
|
|
159
|
+
aria-label="Copy development URL"
|
|
166
160
|
title="Copy URL">
|
|
167
|
-
<i class="bi bi-clipboard"></i>
|
|
161
|
+
<i class="bi bi-clipboard" aria-hidden="true"></i>
|
|
168
162
|
</button>
|
|
169
163
|
</div>
|
|
170
164
|
</li>
|
|
171
165
|
|
|
172
166
|
{% if site.repository %}
|
|
173
167
|
<!-- GitHub Source -->
|
|
174
|
-
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
175
|
-
<div class="d-flex align-items-center">
|
|
168
|
+
<li class="list-group-item d-flex justify-content-between align-items-center gap-2">
|
|
169
|
+
<div class="d-flex align-items-center min-w-0">
|
|
176
170
|
<span class="badge bg-dark me-2">Source</span>
|
|
177
|
-
<span class="font-monospace small text-truncate
|
|
171
|
+
<span class="font-monospace small text-truncate min-w-0">
|
|
178
172
|
{{ page.path | split: "/" | last }}
|
|
179
173
|
</span>
|
|
180
174
|
</div>
|
|
181
|
-
<a href="https://github.com/{{ site.repository }}/blob/{{ site.branch | default: 'main' }}/{% if page.collection %}{{ site.collections_dir }}/{% endif %}{{ page.path }}"
|
|
182
|
-
target="_blank"
|
|
183
|
-
rel="noopener"
|
|
184
|
-
class="btn btn-sm btn-outline-dark"
|
|
175
|
+
<a href="https://github.com/{{ site.repository }}/blob/{{ site.branch | default: 'main' }}/{% if page.collection %}{{ site.collections_dir }}/{% endif %}{{ page.path }}"
|
|
176
|
+
target="_blank"
|
|
177
|
+
rel="noopener"
|
|
178
|
+
class="btn btn-sm btn-outline-dark flex-shrink-0"
|
|
179
|
+
aria-label="View source file on GitHub"
|
|
185
180
|
title="View on GitHub">
|
|
186
|
-
<i class="bi bi-github"></i>
|
|
181
|
+
<i class="bi bi-github" aria-hidden="true"></i>
|
|
187
182
|
</a>
|
|
188
183
|
</li>
|
|
189
184
|
{% endif %}
|
|
190
185
|
</ul>
|
|
191
186
|
</div>
|
|
192
|
-
|
|
193
|
-
<!-- Environment Tip -->
|
|
194
|
-
<div class="alert {% if is_production %}alert-success{% else %}alert-warning{% endif %} alert-dismissible fade show mt-3 py-2 small" role="alert">
|
|
195
|
-
<i class="bi bi-info-circle me-1"></i>
|
|
196
|
-
{% if is_production %}
|
|
197
|
-
Viewing <strong>production</strong> build. Changes require deployment.
|
|
198
|
-
{% else %}
|
|
199
|
-
<strong>Dev</strong> context{% if is_local_url and build_env == "production" %} (local URL; JEKYLL_ENV is production){% endif %}. Changes auto-reload when using <code>jekyll serve</code>.
|
|
200
|
-
{% endif %}
|
|
201
|
-
<button type="button" class="btn-close btn-close-sm" data-bs-dismiss="alert" aria-label="Close" style="padding: 0.5rem;"></button>
|
|
202
|
-
</div>
|
|
203
|
-
|
|
204
|
-
<script>
|
|
205
|
-
function copyToClipboard(inputId, btn) {
|
|
206
|
-
const input = document.getElementById(inputId);
|
|
207
|
-
navigator.clipboard.writeText(input.value).then(() => {
|
|
208
|
-
showCopyFeedback(btn, true);
|
|
209
|
-
}).catch(() => {
|
|
210
|
-
showCopyFeedback(btn, false);
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
function copyUrl(url, btn) {
|
|
215
|
-
navigator.clipboard.writeText(url).then(() => {
|
|
216
|
-
showCopyFeedback(btn, true);
|
|
217
|
-
}).catch(() => {
|
|
218
|
-
showCopyFeedback(btn, false);
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
function showCopyFeedback(btn, success) {
|
|
223
|
-
const originalHtml = btn.innerHTML;
|
|
224
|
-
btn.innerHTML = success ? '<i class="bi bi-check2"></i>' : '<i class="bi bi-x"></i>';
|
|
225
|
-
btn.classList.add(success ? 'btn-success' : 'btn-danger');
|
|
226
|
-
btn.classList.remove('btn-outline-secondary');
|
|
227
|
-
|
|
228
|
-
setTimeout(() => {
|
|
229
|
-
btn.innerHTML = originalHtml;
|
|
230
|
-
btn.classList.remove('btn-success', 'btn-danger');
|
|
231
|
-
btn.classList.add('btn-outline-secondary');
|
|
232
|
-
}, 1500);
|
|
233
|
-
}
|
|
234
|
-
</script>
|
|
@@ -1,46 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
{% comment %} Feature: ZER0-077 {% endcomment %}
|
|
2
|
+
<!--
|
|
2
3
|
file: halfmoon.html
|
|
3
|
-
path: _includes/halfmoon.html
|
|
4
|
-
description: Dark / light / auto
|
|
4
|
+
path: _includes/components/halfmoon.html
|
|
5
|
+
description: Dark / light / auto color-mode switcher (segmented control).
|
|
6
|
+
Buttons carry data-bs-theme-value; assets/js/halfmoon.js wires
|
|
7
|
+
clicks, persistence (localStorage "theme") and active state.
|
|
8
|
+
No ids on purpose — the control may render more than once per
|
|
9
|
+
page (settings offcanvas + theme-controls-bar).
|
|
10
|
+
params: class (string, optional, default "") — extra btn-group classes,
|
|
11
|
+
e.g. "w-100" to fill the parent.
|
|
5
12
|
-->
|
|
6
13
|
|
|
7
|
-
<div class="
|
|
8
|
-
<button
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<
|
|
19
|
-
<use href="#moon-stars-fill"></use>
|
|
20
|
-
</svg>
|
|
21
|
-
<span class="visually-hidden" id="bd-theme-text">Toggle theme</span>
|
|
14
|
+
<div class="btn-group bd-theme-switch {{ include.class | default: '' }}" role="group" aria-label="Color mode">
|
|
15
|
+
<button type="button" class="btn btn-outline-secondary btn-sm d-flex align-items-center justify-content-center gap-1" data-bs-theme-value="light" aria-pressed="false">
|
|
16
|
+
<svg class="bi flex-shrink-0" width="1em" height="1em" fill="currentColor" aria-hidden="true"><use href="#sun-fill"></use></svg>
|
|
17
|
+
<span>Light</span>
|
|
18
|
+
</button>
|
|
19
|
+
<button type="button" class="btn btn-outline-secondary btn-sm d-flex align-items-center justify-content-center gap-1" data-bs-theme-value="dark" aria-pressed="false">
|
|
20
|
+
<svg class="bi flex-shrink-0" width="1em" height="1em" fill="currentColor" aria-hidden="true"><use href="#moon-stars-fill"></use></svg>
|
|
21
|
+
<span>Dark</span>
|
|
22
|
+
</button>
|
|
23
|
+
<button type="button" class="btn btn-outline-secondary btn-sm d-flex align-items-center justify-content-center gap-1" data-bs-theme-value="auto" aria-pressed="false">
|
|
24
|
+
<svg class="bi flex-shrink-0" width="1em" height="1em" fill="currentColor" aria-hidden="true"><use href="#circle-half"></use></svg>
|
|
25
|
+
<span>Auto</span>
|
|
22
26
|
</button>
|
|
23
|
-
<ul class="dropdown-menu dropdown-menu-end shadow-sm bd-theme-menu py-1" aria-labelledby="bd-theme">
|
|
24
|
-
<li>
|
|
25
|
-
<button type="button" class="dropdown-item d-flex align-items-center gap-2" data-bs-theme-value="light" aria-pressed="false">
|
|
26
|
-
<svg class="bi flex-shrink-0 opacity-50" width="1em" height="1em" fill="currentColor" aria-hidden="true"><use href="#sun-fill"></use></svg>
|
|
27
|
-
<span>Light</span>
|
|
28
|
-
<svg class="bi ms-auto flex-shrink-0 d-none" width="1em" height="1em" fill="currentColor" aria-hidden="true"><use href="#check2"></use></svg>
|
|
29
|
-
</button>
|
|
30
|
-
</li>
|
|
31
|
-
<li>
|
|
32
|
-
<button type="button" class="dropdown-item d-flex align-items-center gap-2 active" data-bs-theme-value="dark" aria-pressed="true">
|
|
33
|
-
<svg class="bi flex-shrink-0 opacity-50" width="1em" height="1em" fill="currentColor" aria-hidden="true"><use href="#moon-stars-fill"></use></svg>
|
|
34
|
-
<span>Dark</span>
|
|
35
|
-
<svg class="bi ms-auto flex-shrink-0 d-none" width="1em" height="1em" fill="currentColor" aria-hidden="true"><use href="#check2"></use></svg>
|
|
36
|
-
</button>
|
|
37
|
-
</li>
|
|
38
|
-
<li>
|
|
39
|
-
<button type="button" class="dropdown-item d-flex align-items-center gap-2" data-bs-theme-value="auto" aria-pressed="false">
|
|
40
|
-
<svg class="bi flex-shrink-0 opacity-50" width="1em" height="1em" fill="currentColor" aria-hidden="true"><use href="#circle-half"></use></svg>
|
|
41
|
-
<span>Auto</span>
|
|
42
|
-
<svg class="bi ms-auto flex-shrink-0 d-none" width="1em" height="1em" fill="currentColor" aria-hidden="true"><use href="#check2"></use></svg>
|
|
43
|
-
</button>
|
|
44
|
-
</li>
|
|
45
|
-
</ul>
|
|
46
27
|
</div>
|