jekyll-zeta 0.9.10 → 0.9.12
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/getmapdata.js +14 -0
- data/_includes/heatmap.js +50 -21
- data/_layouts/lovemap.html +12 -2
- data/_sass/heatmap.scss +10 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4cdf9ffeebd761d6a27651dca10b2754b301a836ae259609c3ac8ec7c8b7fcd
|
4
|
+
data.tar.gz: ad82a893a19ae99112d50c5683d859992bd468305162f217b836c00f76aecf75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71a472490183230c4d75f2adacaf42c776fbf8117fffdfd640c5026ba490931d18f2710a5a12303d894499f139c4a7e07bc5761ff1f781169626fe5bc8ed663f
|
7
|
+
data.tar.gz: '032139e895e16f6f9dc8c3f285a3d3d203b621d4ed8eca0a458d4ae15b6433afe33a03cf5c824312673cdf5266a4f6637d39c4b4e576422270a28c1fa9527573'
|
data/_includes/getmapdata.js
CHANGED
@@ -113,6 +113,20 @@
|
|
113
113
|
}
|
114
114
|
})
|
115
115
|
|
116
|
+
|
117
|
+
if (dataObj.title ) {
|
118
|
+
|
119
|
+
|
120
|
+
let divTitle = document.createElement('div')
|
121
|
+
divTitle.className = 'custom-map-title'
|
122
|
+
divTitle.innerText = dataObj.title || ''
|
123
|
+
|
124
|
+
let codeHolder = node.parentNode
|
125
|
+
codeHolder.insertBefore(divTitle,node)
|
126
|
+
|
127
|
+
}
|
128
|
+
|
129
|
+
|
116
130
|
let allYearArr = Object.keys(allYear).sort().reverse()
|
117
131
|
console.log(dataObj)
|
118
132
|
|
data/_includes/heatmap.js
CHANGED
@@ -1,9 +1,19 @@
|
|
1
|
-
function __filldata(heatmapid,endYear,WeeKStartStr,heatMapLoadCount,_MonthStr,_showWeek,_allyearurl,dataSourceObj
|
2
|
-
|
1
|
+
function __filldata(heatmapid,endYear,WeeKStartStr,heatMapLoadCount,_MonthStr,_showWeek,_allyearurl,dataSourceObj) {
|
2
|
+
|
3
|
+
|
4
|
+
function idx2Ymd(idx) {
|
5
|
+
let t = new Date(endStamp - (DayCount - 1 - idx) * 3600000 * 24);
|
6
|
+
let m = t.getMonth() + 1;
|
7
|
+
let d = t.getDate();
|
8
|
+
return `${t.getFullYear()}-${m < 10 ? "0" + m : m}-${
|
9
|
+
d < 10 ? "0" + d : d
|
10
|
+
}`;
|
11
|
+
}
|
3
12
|
|
4
|
-
const WeeKStart = parseInt(WeeKStartStr)
|
5
13
|
|
6
|
-
|
14
|
+
|
15
|
+
const WeeKStart = parseInt(WeeKStartStr)
|
16
|
+
const color = dataSourceObj && dataSourceObj.color;
|
7
17
|
|
8
18
|
var GDATA = window._G_DATA;
|
9
19
|
if (!GDATA) {
|
@@ -86,6 +96,7 @@ function __filldata(heatmapid,endYear,WeeKStartStr,heatMapLoadCount,_MonthStr,_s
|
|
86
96
|
}
|
87
97
|
GDATA['_allYear'] = d ;return d ;})
|
88
98
|
}
|
99
|
+
|
89
100
|
!(function fillData() {
|
90
101
|
let year = "" + dateEnd.getFullYear();
|
91
102
|
let preYear = "" + (year - 1);
|
@@ -133,14 +144,7 @@ function __filldata(heatmapid,endYear,WeeKStartStr,heatMapLoadCount,_MonthStr,_s
|
|
133
144
|
);
|
134
145
|
}
|
135
146
|
|
136
|
-
|
137
|
-
let t = new Date(endStamp - (DayCount - 1 - idx) * 3600000 * 24);
|
138
|
-
let m = t.getMonth() + 1;
|
139
|
-
let d = t.getDate();
|
140
|
-
return `${t.getFullYear()}-${m < 10 ? "0" + m : m}-${
|
141
|
-
d < 10 ? "0" + d : d
|
142
|
-
}`;
|
143
|
-
}
|
147
|
+
|
144
148
|
|
145
149
|
function updateCell(data) {
|
146
150
|
if (!data) return;
|
@@ -212,6 +216,8 @@ function __filldata(heatmapid,endYear,WeeKStartStr,heatMapLoadCount,_MonthStr,_s
|
|
212
216
|
let dateKeyYmd = idx2Ymd(idxOfDay);
|
213
217
|
let arrPostInOneDay = Map[dateKeyYmd];
|
214
218
|
|
219
|
+
|
220
|
+
|
215
221
|
let hideblock = false
|
216
222
|
if (minYmd) {
|
217
223
|
hideblock = dateKeyYmd < minYmd;
|
@@ -220,6 +226,7 @@ function __filldata(heatmapid,endYear,WeeKStartStr,heatMapLoadCount,_MonthStr,_s
|
|
220
226
|
let isFuture = dateKeyYmd > todayYmd;
|
221
227
|
|
222
228
|
const dayCell = dayCells[idxOfDay];
|
229
|
+
dayCell.dataset.x = dateKeyYmd
|
223
230
|
if (hideblock) {
|
224
231
|
dayCell.classList = 'heatmap-day-cell hm-check-notyet'
|
225
232
|
}else if(isFuture){
|
@@ -227,8 +234,7 @@ function __filldata(heatmapid,endYear,WeeKStartStr,heatMapLoadCount,_MonthStr,_s
|
|
227
234
|
}
|
228
235
|
else{
|
229
236
|
|
230
|
-
|
231
|
-
const nobg =
|
237
|
+
const nobg =
|
232
238
|
parseInt(dateKeyYmd.substring(5, 7)) % 2 == 1
|
233
239
|
? "hm-check-no-b"
|
234
240
|
: "hm-check-no-a";
|
@@ -236,10 +242,10 @@ function __filldata(heatmapid,endYear,WeeKStartStr,heatMapLoadCount,_MonthStr,_s
|
|
236
242
|
!arrPostInOneDay
|
237
243
|
? nobg
|
238
244
|
: arrPostInOneDay.length > 2
|
239
|
-
? (
|
245
|
+
? ("hm-check3")
|
240
246
|
: arrPostInOneDay.length == 2 ?
|
241
|
-
(
|
242
|
-
:
|
247
|
+
( "hm-check2")
|
248
|
+
: "hm-check"
|
243
249
|
}`;
|
244
250
|
|
245
251
|
if (color && arrPostInOneDay && arrPostInOneDay.length) {
|
@@ -357,18 +363,41 @@ function __filldata(heatmapid,endYear,WeeKStartStr,heatMapLoadCount,_MonthStr,_s
|
|
357
363
|
const monthEle = document.createElement("div");
|
358
364
|
monthEle.className = "heatmap-month";
|
359
365
|
Frag.appendChild(monthEle);
|
360
|
-
const
|
366
|
+
const monthStrArr = _MonthStr.split(" ");
|
361
367
|
|
362
368
|
let nowM = dateEnd.getMonth();
|
363
369
|
let nowWeekIdx = nLastColumnCount - 1;
|
364
370
|
|
365
|
-
|
371
|
+
let monthEleArr = []
|
372
|
+
for (let i = 0; i < monthStrArr.length; i++) {
|
366
373
|
let m = document.createElement("span");
|
367
374
|
m.className = "heatmap-month-cell";
|
368
|
-
m.innerHTML = `${monthStr[(i + nowM + 1) % 12]}`;
|
375
|
+
// m.innerHTML = `${monthStr[(i + nowM + 1) % 12]}`;
|
369
376
|
monthEle.appendChild(m);
|
377
|
+
monthEleArr.push(m)
|
378
|
+
}
|
379
|
+
|
380
|
+
/// reset month cell postion
|
381
|
+
|
382
|
+
|
383
|
+
for (let index = 0 ,j = 0; index < ColumnsCount && j < monthStrArr.length; index++) {
|
384
|
+
const ymd = idx2Ymd(index * 7)
|
385
|
+
const m = ymd.substring(5,7)
|
386
|
+
const d = ymd.substring(8,10)
|
387
|
+
|
388
|
+
if (d <= '07') {
|
389
|
+
let ele = monthEleArr[j ++]
|
390
|
+
console.log(ymd,m,d)
|
391
|
+
ele.innerText = monthStrArr[Number(m) - 1]
|
392
|
+
ele.style.gridColumnStart = index + 1
|
393
|
+
ele.style.gridColumnEnd = 'span 4'
|
394
|
+
|
395
|
+
}
|
370
396
|
}
|
371
397
|
|
398
|
+
|
399
|
+
|
400
|
+
|
372
401
|
const weekEle = document.createElement("div");
|
373
402
|
weekEle.className = "heatmap-week";
|
374
403
|
const WeekStr = _showWeek.split(" ");
|
@@ -397,7 +426,7 @@ function __filldata(heatmapid,endYear,WeeKStartStr,heatMapLoadCount,_MonthStr,_s
|
|
397
426
|
}
|
398
427
|
|
399
428
|
let m = document.createElement("span");
|
400
|
-
m.classList = `heatmap-day-cell
|
429
|
+
m.classList = `heatmap-day-cell hm-check-nodata`;
|
401
430
|
dayEle.appendChild(m);
|
402
431
|
}
|
403
432
|
}
|
data/_layouts/lovemap.html
CHANGED
@@ -17,14 +17,23 @@ layout: default
|
|
17
17
|
|
18
18
|
|
19
19
|
<style>
|
20
|
+
.custom-map-title{
|
21
|
+
margin: 0;
|
22
|
+
font-size: 1.5em;
|
23
|
+
color: #444455;
|
24
|
+
}
|
25
|
+
|
26
|
+
.map-container{
|
27
|
+
padding-bottom: 4em;
|
28
|
+
}
|
20
29
|
.lv-year{
|
21
|
-
|
30
|
+
|
22
31
|
font-family: 'Courier New', Courier, monospace;
|
23
32
|
}
|
24
33
|
|
25
34
|
.lv-year-title{
|
26
35
|
font-weight: bold;
|
27
|
-
font-size: 1.
|
36
|
+
font-size: 1.5em;
|
28
37
|
display: inline-block;
|
29
38
|
color: #aaa;
|
30
39
|
|
@@ -56,6 +65,7 @@ layout: default
|
|
56
65
|
<script >
|
57
66
|
function create_heatmap(heatmapid,endYear,dataObj,title,count,node){
|
58
67
|
let container = document.createElement('div')
|
68
|
+
container.className = 'map-container'
|
59
69
|
let divtitle = document.createElement('div')
|
60
70
|
divtitle.className = 'lv-year'
|
61
71
|
|
data/_sass/heatmap.scss
CHANGED
@@ -24,7 +24,8 @@ $dayGap:1px;
|
|
24
24
|
grid-column-end: 3;
|
25
25
|
|
26
26
|
display: grid;
|
27
|
-
grid-template-columns: repeat(
|
27
|
+
grid-template-columns: repeat(53,4fr);
|
28
|
+
|
28
29
|
|
29
30
|
border: $dbgBorder;
|
30
31
|
|
@@ -34,7 +35,7 @@ $dayGap:1px;
|
|
34
35
|
.heatmap-month-cell{
|
35
36
|
display: flex;
|
36
37
|
align-items: center;
|
37
|
-
justify-content: center;
|
38
|
+
// justify-content: center;
|
38
39
|
|
39
40
|
// font-family: $heatFont;
|
40
41
|
font-size: 0.8rem;
|
@@ -42,6 +43,12 @@ $dayGap:1px;
|
|
42
43
|
height: 12px;
|
43
44
|
|
44
45
|
padding: 0.2em 0;
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
overflow: visible;
|
51
|
+
|
45
52
|
|
46
53
|
}
|
47
54
|
|
@@ -164,7 +171,7 @@ $dayGap:1px;
|
|
164
171
|
$bh:2px;
|
165
172
|
.hm-check-future-b{
|
166
173
|
background:repeating-linear-gradient(
|
167
|
-
|
174
|
+
135deg, /* 斜条纹角度 */
|
168
175
|
#edebf0aa, /* 第一种颜色 */
|
169
176
|
#edebf0aa $bh, /* 第一种颜色的宽度 */
|
170
177
|
#ffffff $bh , /* 第二种颜色的起点 */
|
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.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vitock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.9.
|
47
|
+
version: 0.9.5
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.9.
|
54
|
+
version: 0.9.5
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- r
|