jekyll-zeta 0.9.2.2 → 0.9.4
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/_config.yml +2 -2
- data/_includes/heatmap.html +4 -7
- data/_includes/heatmap.js +29 -9
- data/_sass/heatmap.scss +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f5b7a9cb09e5360ed8f9eccc4b379b66fd3ccb90d72c9e4be56f58713967780
|
4
|
+
data.tar.gz: 071a4840f57b37af0ed8e740930899e1c2ddf5987d239b1d8d5b51ee4045c30d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54d558bae02171320c3bc98c0969f38d1353dae74e189be0be26468dfa84bf1fc9a0ad2452ed1d6b8286f3d5ff68b5c73675ac77e5d1e0782975daadf0e06005
|
7
|
+
data.tar.gz: 26ae3613a849a15a4e9079de4183c5df9923394d2f82256773eb6a855ff1f220d20b1517d7dfa26abfe1ea0ece7fdb187093fae135ca7dfc1d20f443240442c0
|
data/_config.yml
CHANGED
@@ -19,9 +19,9 @@ theme_config:
|
|
19
19
|
appearance: "auto" # can be "light", "dark" or "auto"
|
20
20
|
navbarPosition: left # left or top
|
21
21
|
date_format: "%m/%d" # customize how date is formatted
|
22
|
-
post_date_format: "%Y/%m/%d"
|
22
|
+
post_date_format: "%Y/%m/%d %a"
|
23
23
|
encrypt_title: "Content is Encryped :)"
|
24
|
-
# encrypt_clear_btn: "清空缓存密码"
|
24
|
+
# encrypt_clear_btn: "清空缓存密码"A
|
25
25
|
# decrypt_btn: 解密
|
26
26
|
# encrypt_btn: 重新加密
|
27
27
|
tag_showall: true
|
data/_includes/heatmap.html
CHANGED
@@ -29,16 +29,13 @@
|
|
29
29
|
|
30
30
|
{%- assign MothStr = site.theme_config.heatMapMonth -%}
|
31
31
|
{%- assign HeatMapShowWeek = site.theme_config.heatMapShowWeek -%}
|
32
|
-
|
33
|
-
{%- assign HeatMapType = site.theme_config.heatMapType -%}
|
34
|
-
|
35
32
|
{%- assign heatMapLoadCount = site.theme_config.heatMapLoadCount | default: 8 -%}
|
36
33
|
|
34
|
+
const WeeKStartStr = "{{ site.theme_config.heatMapWeekStart | default: 0 }}" ;// 0 sunday 1 monday 2. tuesday ...
|
37
35
|
|
38
|
-
const heatMapLoadCount = {{heatMapLoadCount}}
|
39
|
-
var
|
40
|
-
var
|
41
|
-
var _showWeek = '{{ HeatMapShowWeek | default: "Mon Wed Fri" }}';
|
36
|
+
const heatMapLoadCount = {{heatMapLoadCount}};
|
37
|
+
var _MonthStr = '{{ MothnStr | default: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec" }}';
|
38
|
+
var _showWeek = '{{ HeatMapShowWeek | default: "Sun Mon Tue Wed Thu Fri Sat" }}';
|
42
39
|
var _allyearurl = '{{ "assets/dyn/allyear.json" | relative_url }}';
|
43
40
|
{% include heatmap.js %}
|
44
41
|
}
|
data/_includes/heatmap.js
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
;!(function () {
|
2
|
+
|
3
|
+
const WeeKStart = parseInt(WeeKStartStr)
|
4
|
+
|
2
5
|
|
3
6
|
var GDATA = window._G_DATA;
|
4
7
|
if (!GDATA) {
|
@@ -13,8 +16,10 @@
|
|
13
16
|
return `${t.getFullYear()}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d}`;
|
14
17
|
}
|
15
18
|
|
19
|
+
const strictMod = endYear && endYear.length == 4;
|
20
|
+
const maxDateYmd = `${endYear}-12-31`
|
16
21
|
const dateEnd =
|
17
|
-
endYear && endYear.length == 4 ? new Date(
|
22
|
+
endYear && endYear.length == 4 ? new Date(maxDateYmd) : new Date();
|
18
23
|
|
19
24
|
const endStamp = dateEnd.getTime();
|
20
25
|
const dayEleId = Math.random().toString(16).substring(2);
|
@@ -22,9 +27,10 @@
|
|
22
27
|
arr.pop();
|
23
28
|
const jsonUrlBase = arr.join("/");
|
24
29
|
|
30
|
+
const nLastColumnCount = (dateEnd.getDay() - WeeKStart + 7) % 7 + 1
|
25
31
|
const ColumnsCount = 53;
|
26
32
|
const RowCount = 7;
|
27
|
-
const DayCount = (ColumnsCount - 1) * RowCount +
|
33
|
+
const DayCount = (ColumnsCount - 1) * RowCount + nLastColumnCount;
|
28
34
|
|
29
35
|
let queue = window._y_queue || []
|
30
36
|
window._y_queue = queue;
|
@@ -173,6 +179,7 @@
|
|
173
179
|
|
174
180
|
shuffle(SEQ);
|
175
181
|
|
182
|
+
const minYmd = `${endYear - 1}${maxDateYmd.substring(4)}`
|
176
183
|
function update1Day() {
|
177
184
|
if (G_idxOfDay < 0) {
|
178
185
|
return;
|
@@ -180,8 +187,19 @@
|
|
180
187
|
const idxOfDay = SEQ[G_idxOfDay--];
|
181
188
|
let dateKeyYmd = idx2Ymd(idxOfDay);
|
182
189
|
let arrPostInOneDay = Map[dateKeyYmd];
|
190
|
+
|
191
|
+
let hideblock = false
|
192
|
+
if (strictMod) {
|
193
|
+
hideblock = dateKeyYmd <= minYmd;
|
194
|
+
|
195
|
+
}
|
196
|
+
|
183
197
|
const dayCell = dayCells[idxOfDay];
|
184
|
-
|
198
|
+
if (hideblock) {
|
199
|
+
dayCell.classList = 'heatmap-day-cell hm-check-notyet'
|
200
|
+
}else{
|
201
|
+
|
202
|
+
const nobg =
|
185
203
|
parseInt(dateKeyYmd.substring(5, 7)) % 2 == 1
|
186
204
|
? "hm-check-no-b"
|
187
205
|
: "hm-check-no-a";
|
@@ -223,6 +241,9 @@
|
|
223
241
|
});
|
224
242
|
dayCell.appendChild(tip);
|
225
243
|
}
|
244
|
+
}
|
245
|
+
|
246
|
+
|
226
247
|
}
|
227
248
|
|
228
249
|
function updateMultiDays() {
|
@@ -301,7 +322,7 @@
|
|
301
322
|
const monthStr = _MonthStr.split(" ");
|
302
323
|
|
303
324
|
let nowM = dateEnd.getMonth();
|
304
|
-
let
|
325
|
+
let nowWeekIdx = nLastColumnCount - 1;
|
305
326
|
|
306
327
|
for (let i = 0; i < monthStr.length; i++) {
|
307
328
|
let m = document.createElement("span");
|
@@ -315,9 +336,10 @@
|
|
315
336
|
const WeekStr = _showWeek.split(" ");
|
316
337
|
|
317
338
|
for (let i = 0; i < WeekStr.length; i++) {
|
339
|
+
const idx = (i + WeeKStart) % 7
|
318
340
|
let m = document.createElement("div");
|
319
341
|
m.className = "heatmap-week-cell";
|
320
|
-
m.innerHTML = `<span>${WeekStr[
|
342
|
+
m.innerHTML = i % 2 ? `<span>${WeekStr[idx]}</span>` : ''
|
321
343
|
weekEle.appendChild(m);
|
322
344
|
}
|
323
345
|
|
@@ -328,13 +350,11 @@
|
|
328
350
|
dayEle.className = "heatmap-day";
|
329
351
|
dayEle.id = dayEleId;
|
330
352
|
|
331
|
-
|
332
|
-
|
333
|
-
// console.log(nowWeek, firstDateDayDiff);
|
353
|
+
// console.log(nowWeekIdx, firstDateDayDiff);
|
334
354
|
|
335
355
|
for (let c = 0; c < ColumnsCount; c++) {
|
336
356
|
for (let r = 0; r < RowCount; r++) {
|
337
|
-
if (r >
|
357
|
+
if (r > nowWeekIdx && c == ColumnsCount - 1) {
|
338
358
|
break;
|
339
359
|
}
|
340
360
|
|
data/_sass/heatmap.scss
CHANGED
@@ -65,7 +65,9 @@ $heatFont:Georgia,"Nimbus Roman No9 L","Songti SC",STSong,"AR PL New Sung","AR P
|
|
65
65
|
justify-content: center;
|
66
66
|
padding-right: 0.2em;
|
67
67
|
font-size: 0.8rem;
|
68
|
-
font-family: $heatFont
|
68
|
+
font-family: $heatFont;
|
69
|
+
line-height: $hmbloksizeH;
|
70
|
+
height: $hmbloksizeH;
|
69
71
|
}
|
70
72
|
|
71
73
|
.heatmap-day{
|
@@ -118,6 +120,10 @@ $heatFont:Georgia,"Nimbus Roman No9 L","Songti SC",STSong,"AR PL New Sung","AR P
|
|
118
120
|
background-color: #edebf0aa;
|
119
121
|
}
|
120
122
|
|
123
|
+
.hm-check-notyet{
|
124
|
+
visibility: hidden;
|
125
|
+
}
|
126
|
+
|
121
127
|
.heatmap-day-cell:hover{
|
122
128
|
transform: scale(1.3);
|
123
129
|
z-index: 999;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-zeta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vitock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|