jekyll-theme-zer0 0.4.0 → 0.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,312 @@
1
+ <!--
2
+ ===================================================================
3
+ THEME INFO - Theme Version and System Information Display
4
+ ===================================================================
5
+
6
+ File: theme-info.html
7
+ Path: _includes/components/theme-info.html
8
+ Purpose: Display theme version, Jekyll version, and system information
9
+
10
+ Template Logic:
11
+ - Automatically extracts theme version from gem specification
12
+ - Shows Jekyll and Ruby versions
13
+ - Displays GitHub repository information
14
+ - Links to theme documentation and changelog
15
+
16
+ Dependencies:
17
+ - site.remote_theme or site.theme configuration
18
+ - Jekyll's site.github metadata (for GitHub Pages)
19
+
20
+ Notes:
21
+ - Version is pulled dynamically during build
22
+ - No hardcoded version numbers
23
+ ===================================================================
24
+ -->
25
+
26
+ <div class="theme-info">
27
+ <h5 class="border-bottom pb-2 mb-3">
28
+ <i class="{{ site.default_icon }} bi-info-circle me-2"></i>
29
+ Theme Information
30
+ </h5>
31
+
32
+ <div class="row g-3">
33
+ <!-- Theme Details -->
34
+ <div class="col-12">
35
+ <div class="card bg-dark border-secondary">
36
+ <div class="card-body">
37
+ <h6 class="card-title">
38
+ <i class="{{ site.default_icon }} bi-palette me-2"></i>
39
+ Theme
40
+ </h6>
41
+
42
+ {% if site.remote_theme %}
43
+ {% assign theme_parts = site.remote_theme | split: "/" %}
44
+ {% assign theme_owner = theme_parts[0] %}
45
+ {% assign theme_repo = theme_parts[1] %}
46
+
47
+ <p class="mb-2">
48
+ <strong>Name:</strong>
49
+ <a href="https://github.com/{{ site.remote_theme }}"
50
+ target="_blank"
51
+ rel="noopener noreferrer"
52
+ class="text-info text-decoration-none">
53
+ {{ theme_repo }}
54
+ </a>
55
+ </p>
56
+
57
+ <p class="mb-2">
58
+ <strong>Repository:</strong>
59
+ <code class="text-warning">{{ site.remote_theme }}</code>
60
+ </p>
61
+
62
+ {% comment %}
63
+ Try to get version from Gem specification if available
64
+ This works when the theme is installed as a gem
65
+ {% endcomment %}
66
+ {% capture theme_version %}
67
+ {%- for spec in site.theme_specs -%}
68
+ {%- if spec.name == "jekyll-theme-zer0" -%}
69
+ {{ spec.version }}
70
+ {%- endif -%}
71
+ {%- endfor -%}
72
+ {% endcapture %}
73
+
74
+ {% if theme_version and theme_version != "" %}
75
+ <p class="mb-2">
76
+ <strong>Version:</strong>
77
+ <span class="badge bg-success">v{{ theme_version | strip }}</span>
78
+ </p>
79
+ {% else %}
80
+ <p class="mb-2">
81
+ <strong>Version:</strong>
82
+ <span class="badge bg-info">Remote (Latest)</span>
83
+ <small class="text-muted d-block mt-1">
84
+ Using latest version from GitHub
85
+ </small>
86
+ </p>
87
+ {% endif %}
88
+
89
+ <div class="mt-3">
90
+ <a href="https://github.com/{{ site.remote_theme }}/blob/main/CHANGELOG.md"
91
+ target="_blank"
92
+ rel="noopener noreferrer"
93
+ class="btn btn-sm btn-outline-info me-2">
94
+ <i class="{{ site.default_icon }} bi-journal-text"></i>
95
+ Changelog
96
+ </a>
97
+ <a href="https://github.com/{{ site.remote_theme }}#readme"
98
+ target="_blank"
99
+ rel="noopener noreferrer"
100
+ class="btn btn-sm btn-outline-info">
101
+ <i class="{{ site.default_icon }} bi-book"></i>
102
+ Documentation
103
+ </a>
104
+ </div>
105
+
106
+ {% elsif site.theme %}
107
+ <p class="mb-2">
108
+ <strong>Name:</strong>
109
+ <code class="text-warning">{{ site.theme }}</code>
110
+ </p>
111
+ <p class="mb-2">
112
+ <strong>Type:</strong> Local Theme
113
+ </p>
114
+ {% else %}
115
+ <p class="text-muted">No theme configured</p>
116
+ {% endif %}
117
+ </div>
118
+ </div>
119
+ </div>
120
+
121
+ <!-- Build Environment -->
122
+ <div class="col-12">
123
+ <div class="card bg-dark border-secondary">
124
+ <div class="card-body">
125
+ <h6 class="card-title">
126
+ <i class="{{ site.default_icon }} bi-cpu me-2"></i>
127
+ Build Environment
128
+ </h6>
129
+
130
+ <p class="mb-2">
131
+ <strong>Jekyll:</strong>
132
+ <span class="badge bg-primary">v{{ jekyll.version }}</span>
133
+ </p>
134
+
135
+ <p class="mb-2">
136
+ <strong>Ruby:</strong>
137
+ <span class="badge bg-danger">v{{ site.powered_by | where: "name", "Ruby" | map: "version" | first | default: "Unknown" }}</span>
138
+ </p>
139
+
140
+ <p class="mb-2">
141
+ <strong>Environment:</strong>
142
+ <span class="badge bg-secondary">{{ jekyll.environment }}</span>
143
+ </p>
144
+
145
+ {% if site.github %}
146
+ <p class="mb-2">
147
+ <strong>Build:</strong>
148
+ <span class="badge bg-info">GitHub Pages</span>
149
+ </p>
150
+ {% endif %}
151
+
152
+ <p class="mb-0">
153
+ <strong>Last Build:</strong>
154
+ <small class="text-muted">{{ site.time | date: "%Y-%m-%d %H:%M:%S %Z" }}</small>
155
+ </p>
156
+ </div>
157
+ </div>
158
+ </div>
159
+
160
+ <!-- Site Information -->
161
+ <div class="col-12">
162
+ <div class="card bg-dark border-secondary">
163
+ <div class="card-body">
164
+ <h6 class="card-title">
165
+ <i class="{{ site.default_icon }} bi-globe me-2"></i>
166
+ Site Details
167
+ </h6>
168
+
169
+ <p class="mb-2">
170
+ <strong>Repository:</strong>
171
+ <a href="https://github.com/{{ site.repository }}"
172
+ target="_blank"
173
+ rel="noopener noreferrer"
174
+ class="text-info text-decoration-none">
175
+ {{ site.repository }}
176
+ </a>
177
+ </p>
178
+
179
+ <p class="mb-2">
180
+ <strong>Branch:</strong>
181
+ <code class="text-warning">{{ site.branch }}</code>
182
+ </p>
183
+
184
+ <p class="mb-0">
185
+ <strong>Collections:</strong>
186
+ <span class="badge bg-secondary">{{ site.collections | size }} configured</span>
187
+ </p>
188
+ </div>
189
+ </div>
190
+ </div>
191
+
192
+ <!-- Plugin Information -->
193
+ <div class="col-12">
194
+ <div class="card bg-dark border-secondary">
195
+ <div class="card-body">
196
+ <h6 class="card-title">
197
+ <i class="{{ site.default_icon }} bi-plugin me-2"></i>
198
+ Active Plugins
199
+ </h6>
200
+
201
+ <div class="d-flex flex-wrap gap-2">
202
+ {% for plugin in site.plugins %}
203
+ <span class="badge bg-info">{{ plugin }}</span>
204
+ {% endfor %}
205
+ </div>
206
+ </div>
207
+ </div>
208
+ </div>
209
+
210
+ <!-- Powered By Framework -->
211
+ <div class="col-12">
212
+ <div class="card bg-dark border-secondary">
213
+ <div class="card-body">
214
+ <h6 class="card-title">
215
+ <i class="{{ site.default_icon }} bi-stack me-2"></i>
216
+ Technology Stack
217
+ </h6>
218
+
219
+ <div class="table-responsive">
220
+ <table class="table table-sm table-dark table-hover mb-0">
221
+ <thead>
222
+ <tr>
223
+ <th>Technology</th>
224
+ <th>Version</th>
225
+ </tr>
226
+ </thead>
227
+ <tbody>
228
+ {% for tech in site.powered_by %}
229
+ <tr>
230
+ <td>
231
+ {% if tech.url %}
232
+ <a href="{{ tech.url }}"
233
+ target="_blank"
234
+ rel="noopener noreferrer"
235
+ class="text-decoration-none">
236
+ <i class="{{ site.default_icon }} {{ tech.icon }}"></i>
237
+ {{ tech.name }}
238
+ </a>
239
+ {% else %}
240
+ <i class="{{ site.default_icon }} {{ tech.icon }}"></i>
241
+ {{ tech.name }}
242
+ {% endif %}
243
+ </td>
244
+ <td>
245
+ {% if tech.version %}
246
+ <code class="text-info">{{ tech.version }}</code>
247
+ {% else %}
248
+ <span class="text-muted">—</span>
249
+ {% endif %}
250
+ </td>
251
+ </tr>
252
+ {% endfor %}
253
+ </tbody>
254
+ </table>
255
+ </div>
256
+ </div>
257
+ </div>
258
+ </div>
259
+ </div>
260
+
261
+ <!-- Help Links -->
262
+ <div class="mt-4 pt-3 border-top">
263
+ <p class="text-muted mb-2">
264
+ <small>
265
+ <i class="{{ site.default_icon }} bi-question-circle me-1"></i>
266
+ Need help? Check out these resources:
267
+ </small>
268
+ </p>
269
+ <div class="d-flex flex-wrap gap-2">
270
+ <a href="https://jekyllrb.com/docs/"
271
+ target="_blank"
272
+ rel="noopener noreferrer"
273
+ class="btn btn-sm btn-outline-secondary">
274
+ Jekyll Docs
275
+ </a>
276
+ <a href="https://github.com/{{ site.remote_theme }}/issues"
277
+ target="_blank"
278
+ rel="noopener noreferrer"
279
+ class="btn btn-sm btn-outline-secondary">
280
+ Report Issue
281
+ </a>
282
+ <a href="https://github.com/{{ site.repository }}/discussions"
283
+ target="_blank"
284
+ rel="noopener noreferrer"
285
+ class="btn btn-sm btn-outline-secondary">
286
+ Discussions
287
+ </a>
288
+ </div>
289
+ </div>
290
+ </div>
291
+
292
+ <style>
293
+ .theme-info .card {
294
+ transition: transform 0.2s ease-in-out;
295
+ }
296
+
297
+ .theme-info .card:hover {
298
+ transform: translateY(-2px);
299
+ }
300
+
301
+ .theme-info code {
302
+ font-size: 0.875rem;
303
+ padding: 0.2rem 0.4rem;
304
+ background-color: rgba(0, 0, 0, 0.3);
305
+ border-radius: 0.25rem;
306
+ }
307
+
308
+ .theme-info .badge {
309
+ font-size: 0.875rem;
310
+ padding: 0.35rem 0.65rem;
311
+ }
312
+ </style>