Merge branch 'main' of code.giller.dev:m.giller/giller.dev
This commit is contained in:
commit
bf8ce0f5b7
1 changed files with 8 additions and 1 deletions
|
@ -167,6 +167,10 @@
|
||||||
<br />
|
<br />
|
||||||
<a href="https://insta.giller.dev">My archived Instagram</a>
|
<a href="https://insta.giller.dev">My archived Instagram</a>
|
||||||
<br />
|
<br />
|
||||||
|
<a href="https://letterboxd.com/mgiller">Movies I watched</a>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<a href="https://linu.sk/blog">My prefered literature</a>
|
||||||
<br />
|
<br />
|
||||||
<a href="https://tv.giller.dev">My prefered entertainment</a>
|
<a href="https://tv.giller.dev">My prefered entertainment</a>
|
||||||
<br />
|
<br />
|
||||||
|
@ -332,18 +336,21 @@
|
||||||
const adjustedDate = new Date((new Date()).getTime() - offset * 24 * 60 * 60 * 1000);
|
const adjustedDate = new Date((new Date()).getTime() - offset * 24 * 60 * 60 * 1000);
|
||||||
const formattedDate = adjustedDate.getFullYear().toString() + "-" + (adjustedDate.getMonth() + 1).toString().padStart(2, "0") + "-" + adjustedDate.getDate().toString().padStart(2, "0");
|
const formattedDate = adjustedDate.getFullYear().toString() + "-" + (adjustedDate.getMonth() + 1).toString().padStart(2, "0") + "-" + adjustedDate.getDate().toString().padStart(2, "0");
|
||||||
|
|
||||||
|
let titleSuffix = ""
|
||||||
if (streakData.length > 0) {
|
if (streakData.length > 0) {
|
||||||
if (streakData.includes(formattedDate)) {
|
if (streakData.includes(formattedDate)) {
|
||||||
classes.push("bi-circle-fill");
|
classes.push("bi-circle-fill");
|
||||||
|
titleSuffix = " | Hit";
|
||||||
} else if (offset == 0) {
|
} else if (offset == 0) {
|
||||||
classes.push("bi-circle-half");
|
classes.push("bi-circle-half");
|
||||||
} else {
|
} else {
|
||||||
classes.push("bi-circle");
|
classes.push("bi-circle");
|
||||||
|
titleSuffix = " | Miss";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById("day-" + offset).classList = classes.join(" ");
|
document.getElementById("day-" + offset).classList = classes.join(" ");
|
||||||
document.getElementById("day-" + offset).title = formattedDate;
|
document.getElementById("day-" + offset).title = formattedDate + titleSuffix;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue