_includes/heatmap.js in jekyll-zeta-0.9.4 vs _includes/heatmap.js in jekyll-zeta-0.9.4.1

- old
+ new

@@ -14,10 +14,11 @@ let m = t.getMonth() + 1; let d = t.getDate(); return `${t.getFullYear()}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d}`; } + const todayYmd = date2ymd(new Date()) const strictMod = endYear && endYear.length == 4; const maxDateYmd = `${endYear}-12-31` const dateEnd = endYear && endYear.length == 4 ? new Date(maxDateYmd) : new Date(); @@ -189,16 +190,20 @@ let arrPostInOneDay = Map[dateKeyYmd]; let hideblock = false if (strictMod) { hideblock = dateKeyYmd <= minYmd; - } + let isFuture = dateKeyYmd > todayYmd; + const dayCell = dayCells[idxOfDay]; if (hideblock) { dayCell.classList = 'heatmap-day-cell hm-check-notyet' - }else{ + } if(isFuture){ + dayCell.classList = parseInt(dateKeyYmd.substring(5, 7)) % 2 == 1 ? 'heatmap-day-cell hm-check-future-b' : 'heatmap-day-cell hm-check-future-a' + } + else{ const nobg = parseInt(dateKeyYmd.substring(5, 7)) % 2 == 1 ? "hm-check-no-b" : "hm-check-no-a";