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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6cd84b8ba748c01cfd4776295116a4bf6593ef12bb1662ad56cbb5b1db95a569
4
- data.tar.gz: d57343875f6aa327652889884babf666f76552ea2cb9eb3063b70486d1d584cd
3
+ metadata.gz: e4cdf9ffeebd761d6a27651dca10b2754b301a836ae259609c3ac8ec7c8b7fcd
4
+ data.tar.gz: ad82a893a19ae99112d50c5683d859992bd468305162f217b836c00f76aecf75
5
5
  SHA512:
6
- metadata.gz: 6893d527ca9c609ecc25d55baaccbf7ba58882239328aac78f6f9967b0ebc8819c69956566138a882177af01b9baa9bd395ab1750828a48c30ebbd81ae4db697
7
- data.tar.gz: 7ea6209372677d4320c4673f5f51a67923b40fae6da0cd59236f285a30be0ad7f603ce78126169d913de97fa10821fabde14fff9a307ccf13b485e5c620ae34e
6
+ metadata.gz: 71a472490183230c4d75f2adacaf42c776fbf8117fffdfd640c5026ba490931d18f2710a5a12303d894499f139c4a7e07bc5761ff1f781169626fe5bc8ed663f
7
+ data.tar.gz: '032139e895e16f6f9dc8c3f285a3d3d203b621d4ed8eca0a458d4ae15b6433afe33a03cf5c824312673cdf5266a4f6637d39c4b4e576422270a28c1fa9527573'
@@ -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,checkPrefix) {
2
- checkPrefix = null
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
- const color = dataSourceObj && dataSourceObj.color;
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
- function idx2Ymd(idx) {
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
- const checkClassPrefix = checkPrefix || 'hm'
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
- ? (checkClassPrefix + "-check3")
245
+ ? ("hm-check3")
240
246
  : arrPostInOneDay.length == 2 ?
241
- (checkClassPrefix + "-check2")
242
- : checkClassPrefix + "-check"
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 monthStr = _MonthStr.split(" ");
366
+ const monthStrArr = _MonthStr.split(" ");
361
367
 
362
368
  let nowM = dateEnd.getMonth();
363
369
  let nowWeekIdx = nLastColumnCount - 1;
364
370
 
365
- for (let i = 0; i < monthStr.length; i++) {
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 ${checkPrefix || "hm"}-check-nodata`;
429
+ m.classList = `heatmap-day-cell hm-check-nodata`;
401
430
  dayEle.appendChild(m);
402
431
  }
403
432
  }
@@ -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
- margin-top: 2.5rem;
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.8em;
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(12,1fr);
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
- 45deg, /* 斜条纹角度 */
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.10
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-12 00:00:00.000000000 Z
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.0
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.0
54
+ version: 0.9.5
55
55
  description:
56
56
  email:
57
57
  - r