This commit is contained in:
suihan
2020-12-01 21:21:08 +09:00
parent 5805a737f4
commit 3bcd9d0642

View File

@@ -67,7 +67,9 @@ function yearly(year) {
} }
function monthly(year, month, posts) { function monthly(year, month, posts) {
const monthPosts = posts.filter(post => post.date.getMonth() === month); const monthPosts = posts.filter(post =>
post.date.getFullYear().toString() === year && post.date.getMonth() === month
);
let liHtml = ''; let liHtml = '';
for (const post of monthPosts) { for (const post of monthPosts) {
liHtml += `<li class="d-flex mt-1 py-1 flex-row flex-nowrap flex-justify-between"><span class="flex-auto css-truncate css-truncate-target"> liHtml += `<li class="d-flex mt-1 py-1 flex-row flex-nowrap flex-justify-between"><span class="flex-auto css-truncate css-truncate-target">