diff --git a/html/calendar.ejs b/html/calendar.ejs index d4c48c7f..2b95e983 100644 --- a/html/calendar.ejs +++ b/html/calendar.ejs @@ -4,184 +4,196 @@ - + + + + + + + + + + + + + + Poke! Calendar - - - - - - - -
-

<%= queryDate.toLocaleString('default', { month: 'long' }) %> <%= year %>

+ +
+
+

<%= queryDate.toLocaleString('default', { month: 'long' }) %> <%= year %>

+
+ + +
+
- - - - - - - + - <% for (let i = 0; i < 6; i++) { %> - - <% for (let j = 0; j < 7; j++) { %> - - <% } %> - - <% } %> + <% days.forEach((day, idx) => { %> + <% if (idx % 7 === 0) { %><% } %> + <% const isToday = day && day.toDateString() === currentDate.toDateString(); %> + + <% if (idx % 7 === 6) { %><% } %> + <% }); %>
SundayMondayTuesdayWednesdayThursdayFridaySaturdaySunMonTueWedThuFriSat
- <% const day = days[i * 7 + j]; %> - <%= day ? day.getDate() : '' %> -
<%= day ? day.getDate() : '' %>