jekyll-zeta 0.9.3 → 0.9.4.1
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/_includes/heatmap.js +24 -2
- data/_sass/heatmap.scss +27 -0
- 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: 317509866b194e90a96989f42923c7d1b476b062a8fe63b0e35077477c85b4f0
|
4
|
+
data.tar.gz: c544ecaf3a8e2a4513f0e8a59cde4b78412987d8e71134c99008b8bfcd247c77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 497c78ded3a2d0b56bf29e49cd35a4c279ae3304c3fa865f346a0886cc38952ccc86874a0f1728061a83d99f85851a312cc9c40d38bdf1c9dcd4db43a66821af
|
7
|
+
data.tar.gz: 7b7cfd7b8c551564f61f931079e28b90bbc3cf1a2ec81f0b73443c9b8a17bffb24b378933fd6c2a6705337d4785eae4c43f58ac8d128a4abdd0e4cae31df54e8
|
data/_includes/heatmap.js
CHANGED
@@ -16,8 +16,11 @@
|
|
16
16
|
return `${t.getFullYear()}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d}`;
|
17
17
|
}
|
18
18
|
|
19
|
+
const todayYmd = date2ymd(new Date())
|
20
|
+
const strictMod = endYear && endYear.length == 4;
|
21
|
+
const maxDateYmd = `${endYear}-12-31`
|
19
22
|
const dateEnd =
|
20
|
-
endYear && endYear.length == 4 ? new Date(
|
23
|
+
endYear && endYear.length == 4 ? new Date(maxDateYmd) : new Date();
|
21
24
|
|
22
25
|
const endStamp = dateEnd.getTime();
|
23
26
|
const dayEleId = Math.random().toString(16).substring(2);
|
@@ -177,6 +180,7 @@
|
|
177
180
|
|
178
181
|
shuffle(SEQ);
|
179
182
|
|
183
|
+
const minYmd = `${endYear - 1}${maxDateYmd.substring(4)}`
|
180
184
|
function update1Day() {
|
181
185
|
if (G_idxOfDay < 0) {
|
182
186
|
return;
|
@@ -184,8 +188,23 @@
|
|
184
188
|
const idxOfDay = SEQ[G_idxOfDay--];
|
185
189
|
let dateKeyYmd = idx2Ymd(idxOfDay);
|
186
190
|
let arrPostInOneDay = Map[dateKeyYmd];
|
191
|
+
|
192
|
+
let hideblock = false
|
193
|
+
if (strictMod) {
|
194
|
+
hideblock = dateKeyYmd <= minYmd;
|
195
|
+
}
|
196
|
+
|
197
|
+
let isFuture = dateKeyYmd > todayYmd;
|
198
|
+
|
187
199
|
const dayCell = dayCells[idxOfDay];
|
188
|
-
|
200
|
+
if (hideblock) {
|
201
|
+
dayCell.classList = 'heatmap-day-cell hm-check-notyet'
|
202
|
+
} if(isFuture){
|
203
|
+
dayCell.classList = parseInt(dateKeyYmd.substring(5, 7)) % 2 == 1 ? 'heatmap-day-cell hm-check-future-b' : 'heatmap-day-cell hm-check-future-a'
|
204
|
+
}
|
205
|
+
else{
|
206
|
+
|
207
|
+
const nobg =
|
189
208
|
parseInt(dateKeyYmd.substring(5, 7)) % 2 == 1
|
190
209
|
? "hm-check-no-b"
|
191
210
|
: "hm-check-no-a";
|
@@ -227,6 +246,9 @@
|
|
227
246
|
});
|
228
247
|
dayCell.appendChild(tip);
|
229
248
|
}
|
249
|
+
}
|
250
|
+
|
251
|
+
|
230
252
|
}
|
231
253
|
|
232
254
|
function updateMultiDays() {
|
data/_sass/heatmap.scss
CHANGED
@@ -120,6 +120,33 @@ $heatFont:Georgia,"Nimbus Roman No9 L","Songti SC",STSong,"AR PL New Sung","AR P
|
|
120
120
|
background-color: #edebf0aa;
|
121
121
|
}
|
122
122
|
|
123
|
+
.hm-check-notyet{
|
124
|
+
visibility: hidden;
|
125
|
+
}
|
126
|
+
|
127
|
+
|
128
|
+
$bh:2px;
|
129
|
+
.hm-check-future-b{
|
130
|
+
background:repeating-linear-gradient(
|
131
|
+
45deg, /* 斜条纹角度 */
|
132
|
+
#edebf0aa, /* 第一种颜色 */
|
133
|
+
#edebf0aa $bh, /* 第一种颜色的宽度 */
|
134
|
+
#ffffff $bh , /* 第二种颜色的起点 */
|
135
|
+
#ffffff $bh * 2 /* 第二种颜色的宽度 */
|
136
|
+
)
|
137
|
+
}
|
138
|
+
|
139
|
+
|
140
|
+
.hm-check-future-a{
|
141
|
+
background:repeating-linear-gradient(
|
142
|
+
45deg, /* 斜条纹角度 */
|
143
|
+
#ffffff, /* 第一种颜色 */
|
144
|
+
#ffffff $bh, /* 第一种颜色的宽度 */
|
145
|
+
#edebf0 $bh , /* 第二种颜色的起点 */
|
146
|
+
#edebf0 $bh * 2 /* 第二种颜色的宽度 */
|
147
|
+
)
|
148
|
+
}
|
149
|
+
|
123
150
|
.heatmap-day-cell:hover{
|
124
151
|
transform: scale(1.3);
|
125
152
|
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.1
|
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
|