We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2eff91 commit 77a3482Copy full SHA for 77a3482
source/css/heat-map.styl
@@ -54,7 +54,7 @@
54
55
56
.tiles {
57
- grid-column: 2/55;
+ grid-column: 2/56;
58
grid-row: 2/9;
59
60
source/js/heat_map.js
@@ -316,8 +316,13 @@ function getLevelFromWordCount(totalCount) {
316
return 4;
317
}
318
319
+var currentDate = new Date();
320
+
321
function transformArticlesData(articlesData) {
322
const dailyStats = articlesData.reduce((map, { date, wordcount }) => {
323
+ if (new Date(date) > currentDate) {
324
+ return map; // 忽略未来的日期
325
+ }
326
const entry = map.get(date) ?? { count: 0, post: 0 };
327
return map.set(date, {
328
count: entry.count + wordcount,
0 commit comments