feat: Add date to task bar
- Add date display to task bar - Add new DateDisplay class to app.js - Update TimeDisplay to be like DateDisplay
This commit is contained in:
parent
cc4649df1e
commit
496b6e37d8
2 changed files with 55 additions and 20 deletions
|
|
@ -30,7 +30,7 @@ tags:
|
|||
<button><i class="bi bi-volume-down"></i></button>
|
||||
</nav>
|
||||
<nav class="clock">
|
||||
<span><span id="time">##:##</span><br>TT.MM.JJJJ</span>
|
||||
<span><span id="time">##:##</span><br><span id="date">TT.MM.JJJJ</span></span>
|
||||
</nav>
|
||||
<nav>
|
||||
<button data-action="notification"><i class="bi bi-bell-fill"></i></button>
|
||||
|
|
@ -57,7 +57,12 @@ tags:
|
|||
|
||||
// let clock = new Clock('time');
|
||||
const timeElement = document.getElementById('time');
|
||||
const timeDisplay = new TimeDisplay(timeElement, 'HH:mm:ss', 1000);
|
||||
const timeFormat = {hour: '2-digit', minute: '2-digit'};
|
||||
const timeDisplay = new TimeDisplay(timeElement, timeFormat);
|
||||
const dateElement = document.getElementById('date');
|
||||
const dateFormat = {year: 'numeric', month: '2-digit', day: '2-digit'}
|
||||
const dateDisplay = new DateDisplay(dateElement, dateFormat);
|
||||
|
||||
|
||||
document.getElementById('pauseButton').addEventListener('click', () => {
|
||||
timeDisplay.pause();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue