Overview calendar: mark today in amber so it can't pass for the selected day
Today gets an amber stripe across the top, an amber badge on the date and an amber edge; the selected day keeps the blue outline and tint.
This commit is contained in:
2 files changed
+12
-5
No files matched your search
+6
-2
@@ -484,8 +484,12 @@
|
||||
for (let d = 1; d <= dim; d++) {
|
||||
const date = new Date(m.getFullYear(), m.getMonth(), d);
|
||||
const info = days[dayKey(date)];
|
||||
const cell = el('div', 'ov-day' + (date.getTime() === today.getTime() ? ' ov-today' : '') + (date.getDay() % 6 === 0 ? ' ov-weekend' : ''));
|
||||
cell.appendChild(el('span', 'ov-day-num', String(d)));
|
||||
const isToday = date.getTime() === today.getTime();
|
||||
const cell = el('div', 'ov-day' + (isToday ? ' ov-today' : '') + (date.getDay() % 6 === 0 ? ' ov-weekend' : ''));
|
||||
const head = el('div', 'ov-day-head');
|
||||
head.appendChild(el('span', 'ov-day-num', String(d)));
|
||||
if (isToday) cell.title = 'Today';
|
||||
cell.appendChild(head);
|
||||
if (info) {
|
||||
cell.classList.add('ov-has-day');
|
||||
const c3 = { todo: 0, doing: 0, done: 0 };
|
||||
|
||||
Reference in new issue
Block a user