jekyll-zeta 0.9.6 → 0.9.8.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/_config.yml +2 -2
- data/_includes/heatmap.js +19 -5
- data/_layouts/lovemap.html +30 -12
- data/_sass/heatmap.scss +1 -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: 28c35ed3eaa0a85fb55d982c6b9c6a1457461747d8f65e4472d39daa6ce4de7e
|
4
|
+
data.tar.gz: dcfb141e16e82c5683ca974a3ae8d78088d2a1223cd68aa0f5aefc5d25efd0fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86b78e40aaa99a3f51b72ac43af2a6aee789bfe76ab00b7c2899d5f5a4e3bcc4619c05c8f885f5a3d872ea06fc12033bb2c131ed4aa593b57c98c3adbb5d28e5
|
7
|
+
data.tar.gz: 18ec27221c62e491795de4e7d0f4ee30b3811da7c952b0c9b2cec1636bc3ec2552ead6647035b2c8fbe6c2dca018acdde784ce92d3b73dc474ddfb896138864d
|
data/_config.yml
CHANGED
data/_includes/heatmap.js
CHANGED
@@ -18,8 +18,23 @@ function __filldata(heatmapid,endYear,WeeKStartStr,heatMapLoadCount,_MonthStr,_s
|
|
18
18
|
|
19
19
|
const todayYmd = date2ymd(new Date())
|
20
20
|
// 指定日期,可以是年2014 或者 年月 2012-12-03
|
21
|
-
|
22
|
-
|
21
|
+
|
22
|
+
var maxDateYmd = `${endYear}-12-31`
|
23
|
+
if (endYear && endYear.length == 4) {
|
24
|
+
maxDateYmd = `${endYear}-12-31`
|
25
|
+
}else if(endYear && endYear.length == 10) { ///
|
26
|
+
maxDateYmd = endYear
|
27
|
+
}else if(!endYear){
|
28
|
+
maxDateYmd = todayYmd
|
29
|
+
|
30
|
+
}
|
31
|
+
endYear = maxDateYmd.substring(0, 4)
|
32
|
+
|
33
|
+
const minYmd = `${Number(endYear) - 1}${maxDateYmd.substring(4)}`
|
34
|
+
|
35
|
+
|
36
|
+
console.log('maxDateYmd',maxDateYmd)
|
37
|
+
|
23
38
|
const dateEnd =
|
24
39
|
endYear && endYear.length == 4 ? new Date(maxDateYmd) : new Date();
|
25
40
|
|
@@ -187,7 +202,6 @@ function __filldata(heatmapid,endYear,WeeKStartStr,heatMapLoadCount,_MonthStr,_s
|
|
187
202
|
|
188
203
|
shuffle(SEQ);
|
189
204
|
|
190
|
-
const minYmd = `${endYear - 1}${maxDateYmd.substring(4)}`
|
191
205
|
function update1Day() {
|
192
206
|
if (G_idxOfDay < 0) {
|
193
207
|
return;
|
@@ -197,8 +211,8 @@ function __filldata(heatmapid,endYear,WeeKStartStr,heatMapLoadCount,_MonthStr,_s
|
|
197
211
|
let arrPostInOneDay = Map[dateKeyYmd];
|
198
212
|
|
199
213
|
let hideblock = false
|
200
|
-
if (
|
201
|
-
hideblock = dateKeyYmd
|
214
|
+
if (minYmd) {
|
215
|
+
hideblock = dateKeyYmd < minYmd;
|
202
216
|
}
|
203
217
|
|
204
218
|
let isFuture = dateKeyYmd > todayYmd;
|
data/_layouts/lovemap.html
CHANGED
@@ -19,26 +19,30 @@ layout: default
|
|
19
19
|
<style>
|
20
20
|
.lv-year{
|
21
21
|
margin-top: 2.5rem;
|
22
|
+
font-family: 'Courier New', Courier, monospace;
|
22
23
|
}
|
23
24
|
|
24
25
|
.lv-year-title{
|
25
26
|
font-weight: bold;
|
26
|
-
font-size:
|
27
|
+
font-size: 1.8em;
|
27
28
|
display: inline-block;
|
28
|
-
color: #
|
29
|
+
color: #aaa;
|
30
|
+
|
29
31
|
}
|
30
32
|
.lv-year-count{
|
31
33
|
font-weight: bold;
|
32
34
|
display: inline-block;
|
33
|
-
font-size:
|
34
|
-
color: #
|
35
|
+
font-size: 1.2em;
|
36
|
+
color: #aaa;
|
37
|
+
|
35
38
|
}
|
36
39
|
.lv-year-count::before{
|
37
40
|
content: "x";
|
38
41
|
margin-left: 1em;
|
39
42
|
margin-right: 0.2em;
|
43
|
+
font-weight: 400;
|
40
44
|
font-size: 1.5rem;
|
41
|
-
color: #
|
45
|
+
color: #aaa;
|
42
46
|
}
|
43
47
|
|
44
48
|
#loveiContainer{
|
@@ -50,19 +54,19 @@ layout: default
|
|
50
54
|
|
51
55
|
|
52
56
|
<script >
|
53
|
-
function create_heatmap(heatmapid,endYear,dataObj){
|
57
|
+
function create_heatmap(heatmapid,endYear,dataObj,title,count){
|
54
58
|
let container = document.getElementById('loveiContainer')
|
55
59
|
let divtitle = document.createElement('div')
|
56
60
|
divtitle.className = 'lv-year'
|
57
61
|
|
58
62
|
let divYear = document.createElement('div')
|
59
63
|
divYear.className = 'lv-year-title'
|
60
|
-
divYear.innerText = endYear
|
64
|
+
divYear.innerText = title || endYear
|
61
65
|
divtitle.appendChild(divYear)
|
62
66
|
|
63
67
|
let divYearC = document.createElement('div')
|
64
68
|
divYearC.className = 'lv-year-count'
|
65
|
-
divYearC.innerText = '' + dataObj.allYear[endYear]
|
69
|
+
divYearC.innerText = count || ('' + dataObj.allYear[endYear])
|
66
70
|
divtitle.appendChild(divYearC)
|
67
71
|
|
68
72
|
|
@@ -145,7 +149,6 @@ layout: default
|
|
145
149
|
let nM = Number(month)
|
146
150
|
let nD = Number(month)
|
147
151
|
if (isNaN(nY) || isNaN(nD) || isNaN(nM) || nY < 1900 || nY > 2100 || nM < 1 || nM > 12 || nD < 1 || nD > 31) {
|
148
|
-
console.error("Invalid date format: " + str0)
|
149
152
|
return null
|
150
153
|
}
|
151
154
|
date = year + "-" + month.padStart(2, '0') + "-" + day.padStart(2, '0')
|
@@ -193,6 +196,16 @@ layout: default
|
|
193
196
|
let allYear = {}
|
194
197
|
let data = {allYear:allYear};
|
195
198
|
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
let Recent365Count = 0;
|
203
|
+
let nowDate = new Date
|
204
|
+
let Recent365YMD = `${nowDate.getFullYear()-1}-${(nowDate.getMonth() + 1).toString().padStart(2, '0')}-${nowDate.getDate().toString().padStart(2, '0')}`
|
205
|
+
|
206
|
+
console.log(Recent365YMD)
|
207
|
+
|
208
|
+
|
196
209
|
let arrCodes = document.querySelectorAll('pre > code')
|
197
210
|
if(!arrCodes || arrCodes.length == 0) return
|
198
211
|
if(arrCodes.length > 0){
|
@@ -200,8 +213,14 @@ layout: default
|
|
200
213
|
var strAll = code.textContent
|
201
214
|
strAll.split("\n").forEach(function(str){
|
202
215
|
let item = getDataFromSignleLine(str)
|
203
|
-
console.log('xxxx',item,str)
|
204
216
|
fillDataObj(data,item)
|
217
|
+
if(item ){
|
218
|
+
if(item.date >= Recent365YMD){
|
219
|
+
|
220
|
+
Recent365Count ++
|
221
|
+
}
|
222
|
+
|
223
|
+
}
|
205
224
|
})
|
206
225
|
|
207
226
|
})
|
@@ -209,8 +228,7 @@ layout: default
|
|
209
228
|
|
210
229
|
let allYearArr = Object.keys(allYear).sort().reverse()
|
211
230
|
|
212
|
-
|
213
|
-
console.log(allYearArr)
|
231
|
+
create_heatmap('lmpRecent365' ,'',data ,"Last 1Y",Recent365Count)
|
214
232
|
for(let i = 0; i < allYearArr.length; i++){
|
215
233
|
let y = allYearArr[i]
|
216
234
|
create_heatmap('lmp' + y ,y,data )
|
data/_sass/heatmap.scss
CHANGED
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.8.1
|
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-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|