jekyll-theme-zer0 0.4.0 → 0.5.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,243 @@
1
+ <!--
2
+ ===================================================================
3
+ STATS METRICS COMPONENT
4
+ ===================================================================
5
+
6
+ File: stats-metrics.html
7
+ Path: _includes/stats/stats-metrics.html
8
+ Purpose: Additional metrics and quick facts section
9
+
10
+ Features:
11
+ - Quick facts and summary information
12
+ - Bootstrap styled info cards
13
+ - Dynamic calculations
14
+ - Summary statistics
15
+
16
+ Dependencies:
17
+ - Bootstrap 5 for styling
18
+ - Bootstrap Icons for iconography
19
+ - site.data.content_statistics
20
+ ===================================================================
21
+ -->
22
+
23
+ <!-- ================================================ -->
24
+ <!-- ADDITIONAL METRICS SECTION -->
25
+ <!-- Quick facts and summary information -->
26
+ <!-- ================================================ -->
27
+ <div id="metrics" class="row mb-5">
28
+ <div class="col-12">
29
+ <div class="card shadow-sm">
30
+ <div class="card-header bg-info text-white">
31
+ <h3 class="mb-0 fw-bold">
32
+ <i class="bi bi-info-circle me-2"></i> Quick Facts & Insights
33
+ </h3>
34
+ </div>
35
+
36
+ <div class="card-body">
37
+ <div class="row g-4">
38
+
39
+ <!-- Content Overview Column -->
40
+ <div class="col-md-4">
41
+ <div class="h-100 p-3 bg-light rounded">
42
+ <h5 class="text-primary mb-3">
43
+ <i class="bi bi-file-text me-2"></i> Content Overview
44
+ </h5>
45
+ <ul class="list-unstyled">
46
+ <li class="mb-2">
47
+ <strong>Total Posts:</strong>
48
+ <span class="badge bg-primary">{{ site.data.content_statistics.overview.total_posts | default: 0 }}</span>
49
+ </li>
50
+ <li class="mb-2">
51
+ <strong>Categories:</strong>
52
+ <span class="badge bg-success">{{ site.data.content_statistics.overview.total_categories | default: 0 }}</span>
53
+ </li>
54
+ <li class="mb-2">
55
+ <strong>Tags:</strong>
56
+ <span class="badge bg-info">{{ site.data.content_statistics.overview.total_tags | default: 0 }}</span>
57
+ </li>
58
+ <li class="mb-2">
59
+ <strong>Total Words:</strong>
60
+ <span class="badge bg-warning">{{ site.data.content_statistics.overview.total_words | number_with_delimiter | default: 0 }}</span>
61
+ </li>
62
+ <li class="mb-2">
63
+ <strong>Avg Words per Content:</strong>
64
+ <span class="badge bg-info">{{ site.data.content_statistics.overview.average_words_per_post | default: 0 }}</span>
65
+ </li>
66
+ </ul>
67
+ </div>
68
+ </div>
69
+
70
+ <!-- Top Performers Column -->
71
+ <div class="col-md-4">
72
+ <div class="h-100 p-3 bg-light rounded">
73
+ <h5 class="text-success mb-3">
74
+ <i class="bi bi-trophy me-2"></i> Top Performers
75
+ </h5>
76
+
77
+ {% if site.data.content_statistics.categories and site.data.content_statistics.categories.size > 0 %}
78
+ {% assign top_category = site.data.content_statistics.categories | first %}
79
+ <div class="mb-3">
80
+ <strong>Most Popular Category:</strong><br>
81
+ <span class="text-success fw-bold">{{ top_category[0] | capitalize }}</span><br>
82
+ <small class="text-muted">{{ top_category[1] }} posts</small>
83
+ </div>
84
+ {% endif %}
85
+
86
+ {% if site.data.content_statistics.tags and site.data.content_statistics.tags.size > 0 %}
87
+ {% assign top_tag = site.data.content_statistics.tags | first %}
88
+ <div class="mb-3">
89
+ <strong>Most Used Tag:</strong><br>
90
+ <span class="text-info fw-bold">{{ top_tag[0] }}</span><br>
91
+ <small class="text-muted">{{ top_tag[1] }} uses</small>
92
+ </div>
93
+ {% endif %}
94
+
95
+ <!-- Content Distribution -->
96
+ <div class="mb-3">
97
+ <strong>Content Distribution:</strong><br>
98
+ {% if site.data.content_statistics.categories and site.data.content_statistics.categories.size > 0 %}
99
+ {% assign top_category = site.data.content_statistics.categories | first %}
100
+ {% assign top_category_percentage = top_category[1] | times: 100 | divided_by: site.data.content_statistics.overview.total_content %}
101
+ <div class="progress stats-progress">
102
+ <div class="progress-bar bg-success"
103
+ role="progressbar"
104
+ aria-valuenow="0"
105
+ aria-valuemin="0"
106
+ aria-valuemax="100"
107
+ aria-label="Content distribution percentage"
108
+ data-width="{{ top_category_percentage }}%">
109
+ {{ top_category_percentage | round }}%
110
+ </div>
111
+ </div>
112
+ <small class="text-muted">{{ top_category[0] | capitalize }} dominance</small>
113
+ {% else %}
114
+ <small class="text-muted">No data available</small>
115
+ {% endif %}
116
+ </div>
117
+ </div>
118
+ </div>
119
+
120
+ <!-- Data Health Column -->
121
+ <div class="col-md-4">
122
+ <div class="h-100 p-3 bg-light rounded">
123
+ <h5 class="text-warning mb-3">
124
+ <i class="bi bi-heart-pulse me-2"></i> Data Health
125
+ </h5>
126
+
127
+ <!-- Last Update Status -->
128
+ <div class="mb-3">
129
+ <strong>Last Updated:</strong><br>
130
+ {% if site.data.content_statistics.generated_at %}
131
+ <span class="text-primary">{{ site.data.content_statistics.generated_at | date: "%B %d, %Y" }}</span><br>
132
+ <small class="text-muted">{{ site.data.content_statistics.generated_at | date: "%I:%M %p" }}</small>
133
+ {% else %}
134
+ <span class="text-danger">Not Available</span><br>
135
+ <small class="text-muted">Statistics not generated</small>
136
+ {% endif %}
137
+ </div>
138
+
139
+ <!-- Data Completeness -->
140
+ <div class="mb-3">
141
+ <strong>Data Completeness:</strong><br>
142
+ {% assign completeness_score = 0 %}
143
+ {% if site.data.content_statistics.overview.total_posts > 0 %}
144
+ {% assign completeness_score = completeness_score | plus: 25 %}
145
+ {% endif %}
146
+ {% if site.data.content_statistics.overview.total_categories > 0 %}
147
+ {% assign completeness_score = completeness_score | plus: 25 %}
148
+ {% endif %}
149
+ {% if site.data.content_statistics.overview.total_tags > 0 %}
150
+ {% assign completeness_score = completeness_score | plus: 25 %}
151
+ {% endif %}
152
+ {% if site.data.content_statistics.generated_at %}
153
+ {% assign completeness_score = completeness_score | plus: 25 %}
154
+ {% endif %}
155
+
156
+ <div class="progress stats-progress">
157
+ <div class="progress-bar
158
+ {% if completeness_score == 100 %}bg-success
159
+ {% elsif completeness_score >= 75 %}bg-info
160
+ {% elsif completeness_score >= 50 %}bg-warning
161
+ {% else %}bg-danger{% endif %}"
162
+ role="progressbar"
163
+ aria-valuenow="0"
164
+ aria-valuemin="0"
165
+ aria-valuemax="100"
166
+ aria-label="Data completeness percentage"
167
+ data-width="{{ completeness_score }}%">
168
+ {{ completeness_score }}%
169
+ </div>
170
+ </div>
171
+ <small class="text-muted">Overall data quality</small>
172
+ </div>
173
+
174
+ <!-- Refresh Instructions -->
175
+ {% unless site.data.content_statistics %}
176
+ <div class="alert alert-warning alert-sm p-2" role="alert">
177
+ <small>
178
+ <i class="bi bi-arrow-clockwise"></i>
179
+ Run <code>ruby _data/generate_statistics.rb</code> to refresh
180
+ </small>
181
+ </div>
182
+ {% endunless %}
183
+ </div>
184
+ </div>
185
+
186
+ </div>
187
+ </div>
188
+
189
+ <!-- Action Buttons Footer -->
190
+ <div class="card-footer bg-light text-center">
191
+ <div class="btn-group" role="group">
192
+ <button type="button" class="btn btn-outline-primary" onclick="window.print()">
193
+ <i class="bi bi-printer"></i> Print Report
194
+ </button>
195
+ <button type="button" class="btn btn-outline-success" onclick="window.location.reload()">
196
+ <i class="bi bi-arrow-clockwise"></i> Refresh Data
197
+ </button>
198
+ <button type="button" class="btn btn-outline-info" data-bs-toggle="modal" data-bs-target="#helpModal">
199
+ <i class="bi bi-question-circle"></i> Help
200
+ </button>
201
+ </div>
202
+ </div>
203
+ </div>
204
+ </div>
205
+ </div>
206
+
207
+ <!-- ================================================ -->
208
+ <!-- HELP MODAL -->
209
+ <!-- Information about statistics and data sources -->
210
+ <!-- ================================================ -->
211
+ <div class="modal fade" id="helpModal" tabindex="-1" aria-labelledby="helpModalLabel" aria-hidden="true">
212
+ <div class="modal-dialog">
213
+ <div class="modal-content">
214
+ <div class="modal-header">
215
+ <h5 class="modal-title" id="helpModalLabel">
216
+ <i class="bi bi-question-circle"></i> Statistics Help
217
+ </h5>
218
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
219
+ </div>
220
+ <div class="modal-body">
221
+ <h6>About These Statistics</h6>
222
+ <p>This dashboard displays comprehensive analytics about your site's content, including posts, categories, and tags.</p>
223
+
224
+ <h6>Data Sources</h6>
225
+ <ul>
226
+ <li><strong>Posts:</strong> All published content from your site</li>
227
+ <li><strong>Categories:</strong> Content groupings and classifications</li>
228
+ <li><strong>Tags:</strong> Topic labels and keywords</li>
229
+ </ul>
230
+
231
+ <h6>Updating Statistics</h6>
232
+ <p>To refresh the data, run the statistics generator:</p>
233
+ <code>ruby _data/generate_statistics.rb</code>
234
+
235
+ <h6>Data Freshness</h6>
236
+ <p>Statistics are generated manually and should be updated regularly to reflect the latest content changes.</p>
237
+ </div>
238
+ <div class="modal-footer">
239
+ <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
240
+ </div>
241
+ </div>
242
+ </div>
243
+ </div>
@@ -0,0 +1,180 @@
1
+ <!--
2
+ ===================================================================
3
+ STATS NO DATA COMPONENT
4
+ ===================================================================
5
+
6
+ File: stats-no-data.html
7
+ Path: _includes/stats/stats-no-data.html
8
+ Purpose: Error state when statistics data is not available
9
+
10
+ Features:
11
+ - Clear messaging about missing data
12
+ - Instructions for generating statistics
13
+ - Bootstrap styled alert components
14
+ - Action buttons for getting started
15
+
16
+ Dependencies:
17
+ - Bootstrap 5 for styling
18
+ - Bootstrap Icons for iconography
19
+ ===================================================================
20
+ -->
21
+
22
+ <!-- ================================================ -->
23
+ <!-- NO DATA AVAILABLE SECTION -->
24
+ <!-- Error state when statistics are not generated -->
25
+ <!-- ================================================ -->
26
+ <div class="row justify-content-center">
27
+ <div class="col-lg-8">
28
+
29
+ <!-- Main Alert -->
30
+ <div class="alert alert-warning border-0 shadow-sm" role="alert">
31
+ <div class="text-center py-4">
32
+ <i class="bi bi-exclamation-triangle display-1 text-warning mb-4"></i>
33
+ <h2 class="alert-heading mb-3">No Statistics Available</h2>
34
+ <p class="lead mb-4">
35
+ Statistics haven't been generated yet. Follow the steps below to create comprehensive analytics for your site.
36
+ </p>
37
+ </div>
38
+ </div>
39
+
40
+ <!-- Instructions Card -->
41
+ <div class="card shadow-sm mb-4">
42
+ <div class="card-header bg-primary text-white">
43
+ <h4 class="mb-0">
44
+ <i class="bi bi-gear me-2"></i> How to Generate Statistics
45
+ </h4>
46
+ </div>
47
+ <div class="card-body">
48
+ <div class="row">
49
+ <div class="col-md-6">
50
+ <h5 class="text-primary">
51
+ <i class="bi bi-1-circle me-2"></i> Run Generator Script
52
+ </h5>
53
+ <p class="mb-3">Execute the statistics generation script from your site's root directory:</p>
54
+ <div class="bg-dark text-light p-3 rounded mb-3">
55
+ <code>ruby _data/generate_statistics.rb</code>
56
+ </div>
57
+ <p class="text-muted small">
58
+ This script will analyze your content and create the statistics data file.
59
+ </p>
60
+ </div>
61
+ <div class="col-md-6">
62
+ <h5 class="text-success">
63
+ <i class="bi bi-2-circle me-2"></i> Refresh This Page
64
+ </h5>
65
+ <p class="mb-3">After the script completes, refresh this page to see your statistics:</p>
66
+ <div class="d-grid">
67
+ <button class="btn btn-success" onclick="window.location.reload()">
68
+ <i class="bi bi-arrow-clockwise me-2"></i>
69
+ Refresh Page
70
+ </button>
71
+ </div>
72
+ <p class="text-muted small mt-2">
73
+ The statistics will be displayed once the data file is created.
74
+ </p>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </div>
79
+
80
+ <!-- Alternative Setup Information -->
81
+ <div class="card shadow-sm mb-4">
82
+ <div class="card-header bg-info text-white">
83
+ <h4 class="mb-0">
84
+ <i class="bi bi-info-circle me-2"></i> What You'll See
85
+ </h4>
86
+ </div>
87
+ <div class="card-body">
88
+ <p>Once statistics are generated, this page will display:</p>
89
+ <div class="row">
90
+ <div class="col-md-3 text-center mb-3">
91
+ <i class="bi bi-file-text display-4 text-primary mb-2"></i>
92
+ <h6>Total Posts</h6>
93
+ <p class="text-muted small">Count of all published content</p>
94
+ </div>
95
+ <div class="col-md-3 text-center mb-3">
96
+ <i class="bi bi-folder display-4 text-success mb-2"></i>
97
+ <h6>Categories</h6>
98
+ <p class="text-muted small">Content organization groups</p>
99
+ </div>
100
+ <div class="col-md-3 text-center mb-3">
101
+ <i class="bi bi-tags display-4 text-info mb-2"></i>
102
+ <h6>Tags</h6>
103
+ <p class="text-muted small">Topic labels and keywords</p>
104
+ </div>
105
+ <div class="col-md-3 text-center mb-3">
106
+ <i class="bi bi-graph-up display-4 text-warning mb-2"></i>
107
+ <h6>Analytics</h6>
108
+ <p class="text-muted small">Detailed insights and metrics</p>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </div>
113
+
114
+ <!-- Troubleshooting -->
115
+ <div class="card shadow-sm">
116
+ <div class="card-header bg-secondary text-white">
117
+ <h4 class="mb-0">
118
+ <i class="bi bi-tools me-2"></i> Troubleshooting
119
+ </h4>
120
+ </div>
121
+ <div class="card-body">
122
+ <div class="row">
123
+ <div class="col-md-6">
124
+ <h6 class="text-danger">
125
+ <i class="bi bi-x-circle me-2"></i> Script Not Found
126
+ </h6>
127
+ <p class="small mb-3">
128
+ If the generator script doesn't exist, you may need to create it or check your site's documentation for the correct path.
129
+ </p>
130
+
131
+ <h6 class="text-danger">
132
+ <i class="bi bi-x-circle me-2"></i> Permission Denied
133
+ </h6>
134
+ <p class="small mb-3">
135
+ Make sure you have write permissions to the <code>_data</code> directory and that Ruby is installed.
136
+ </p>
137
+ </div>
138
+ <div class="col-md-6">
139
+ <h6 class="text-danger">
140
+ <i class="bi bi-x-circle me-2"></i> No Content Found
141
+ </h6>
142
+ <p class="small mb-3">
143
+ If you have posts but see no statistics, check that your content has proper front matter with categories and tags.
144
+ </p>
145
+
146
+ <h6 class="text-success">
147
+ <i class="bi bi-check-circle me-2"></i> Need Help?
148
+ </h6>
149
+ <p class="small">
150
+ Check the site documentation or contact support for assistance with statistics generation.
151
+ </p>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ </div>
156
+
157
+ </div>
158
+ </div>
159
+
160
+ <!-- ================================================ -->
161
+ <!-- NO DATA PAGE ACTIONS -->
162
+ <!-- Additional helpful actions -->
163
+ <!-- ================================================ -->
164
+ <div class="row justify-content-center mt-4">
165
+ <div class="col-lg-8">
166
+ <div class="text-center">
167
+ <div class="btn-group" role="group">
168
+ <a href="{{ '/' | relative_url }}" class="btn btn-outline-primary">
169
+ <i class="bi bi-house me-2"></i> Return Home
170
+ </a>
171
+ <button type="button" class="btn btn-primary" onclick="window.location.reload()">
172
+ <i class="bi bi-arrow-clockwise me-2"></i> Check Again
173
+ </button>
174
+ <a href="{{ '/docs' | relative_url }}" class="btn btn-outline-info">
175
+ <i class="bi bi-book me-2"></i> Documentation
176
+ </a>
177
+ </div>
178
+ </div>
179
+ </div>
180
+ </div>
@@ -0,0 +1,119 @@
1
+ <!--
2
+ ===================================================================
3
+ STATS OVERVIEW COMPONENT
4
+ ===================================================================
5
+
6
+ File: stats-overview.html
7
+ Path: _includes/stats/stats-overview.html
8
+ Purpose: Overview metrics cards for statistics dashboard
9
+
10
+ Features:
11
+ - Key metrics display in card format
12
+ - Responsive grid layout
13
+ - Bootstrap styled cards with icons
14
+ - Dynamic data from Jekyll data files
15
+
16
+ Dependencies:
17
+ - Bootstrap 5 for styling
18
+ - Bootstrap Icons for iconography
19
+ - site.data.content_statistics
20
+ ===================================================================
21
+ -->
22
+
23
+ <!-- ================================================ -->
24
+ <!-- OVERVIEW METRICS SECTION -->
25
+ <!-- High-level statistics in card format -->
26
+ <!-- ================================================ -->
27
+ <div id="overview" class="mb-5">
28
+ <!-- Section Header -->
29
+ <div class="text-center mb-4">
30
+ <h2 class="display-5 fw-bold text-primary mb-3">
31
+ <i class="bi bi-speedometer2 me-2"></i>
32
+ Quick Overview
33
+ </h2>
34
+ <p class="lead text-muted">
35
+ Key metrics and insights at a glance
36
+ </p>
37
+ </div>
38
+
39
+ <!-- Stats Cards Grid -->
40
+ <div class="row g-4">
41
+
42
+ <!-- Total Posts Card -->
43
+ <div class="col-lg-3 col-md-6">
44
+ <div class="card h-100 border-primary shadow-sm stats-card">
45
+ <div class="card-body text-center p-4">
46
+ <div class="mb-3">
47
+ <i class="bi bi-file-text display-3 text-primary"></i>
48
+ </div>
49
+ <h2 class="card-title mb-2 fw-bold display-6">
50
+ {{ site.data.content_statistics.overview.total_posts | default: 0 }}
51
+ </h2>
52
+ <p class="card-text text-muted mb-2 fw-medium">Total Posts</p>
53
+ <small class="text-muted d-flex align-items-center justify-content-center">
54
+ <i class="bi bi-calendar me-1"></i>
55
+ All time content
56
+ </small>
57
+ </div>
58
+ </div>
59
+ </div>
60
+
61
+ <!-- Total Categories Card -->
62
+ <div class="col-lg-3 col-md-6">
63
+ <div class="card h-100 border-success shadow-sm stats-card">
64
+ <div class="card-body text-center p-4">
65
+ <div class="mb-3">
66
+ <i class="bi bi-folder display-3 text-success"></i>
67
+ </div>
68
+ <h2 class="card-title mb-2 fw-bold display-6">
69
+ {{ site.data.content_statistics.overview.total_content | default: 0 }}
70
+ </h2>
71
+ <p class="card-text text-muted mb-2 fw-medium">Total Content</p>
72
+ <small class="text-muted d-flex align-items-center justify-content-center">
73
+ <i class="bi bi-collection me-1"></i>
74
+ Posts & Pages
75
+ </small>
76
+ </div>
77
+ </div>
78
+ </div>
79
+
80
+ <!-- Total Tags Card -->
81
+ <div class="col-lg-3 col-md-6">
82
+ <div class="card h-100 border-info shadow-sm stats-card">
83
+ <div class="card-body text-center p-4">
84
+ <div class="mb-3">
85
+ <i class="bi bi-tags display-3 text-info"></i>
86
+ </div>
87
+ <h2 class="card-title mb-2 fw-bold display-6">
88
+ {{ site.data.content_statistics.overview.total_categories | default: 0 }}
89
+ </h2>
90
+ <p class="card-text text-muted mb-2 fw-medium">Categories</p>
91
+ <small class="text-muted d-flex align-items-center justify-content-center">
92
+ <i class="bi bi-tag me-1"></i>
93
+ Topic groups
94
+ </small>
95
+ </div>
96
+ </div>
97
+ </div>
98
+
99
+ <!-- Total Words Card -->
100
+ <div class="col-lg-3 col-md-6">
101
+ <div class="card h-100 border-info shadow-sm stats-card">
102
+ <div class="card-body text-center p-4">
103
+ <div class="mb-3">
104
+ <i class="bi bi-chat-text display-3 text-info"></i>
105
+ </div>
106
+ <h2 class="card-title mb-2 fw-bold display-6">
107
+ {{ site.data.content_statistics.overview.total_words | number_with_delimiter | default: 0 }}
108
+ </h2>
109
+ <p class="card-text text-muted mb-2 fw-medium">Total Words</p>
110
+ <small class="text-muted d-flex align-items-center justify-content-center">
111
+ <i class="bi bi-pencil me-1"></i>
112
+ All content
113
+ </small>
114
+ </div>
115
+ </div>
116
+ </div>
117
+
118
+ </div>
119
+ </div>