style output html bulma

This commit is contained in:
Tykayn 2022-07-20 17:01:53 +02:00 committed by tykayn
parent d2d3f32c8a
commit 3bdbd54c10
1 changed files with 23 additions and 16 deletions

17
app.js
View File

@ -106,35 +106,42 @@ function writeHtmlOutput() {
let tasksOfTheDay = ''; let tasksOfTheDay = '';
stats.tasksByDay[dayRefString].forEach((dayObj) => { stats.tasksByDay[dayRefString].forEach((dayObj) => {
let graphicKeyword = '✅'
if ('DONE' !== dayObj.todoKeyword) {
graphicKeyword = dayObj.todoKeyword;
}
tasksOfTheDay += ` <li> tasksOfTheDay += ` <li>
<h2 class="subtitle is-1"> <h2 class="subtitle is-1">
<span class="keyword"> ${dayObj.todoKeyword}</span> <span class="keyword"> ${graphicKeyword}</span>
<span class="title"> ${dayObj.title} </span> <span class="title"> ${dayObj.title} </span>
</h2> </h2>
<p class="tags"> <p class="tag is-light is-primary">
${dayObj.itags} ${dayObj.itags}
</p> </p>
</li>` </li>`
}) })
htmlOut += ` htmlOut += `
<div class="box">
<h1 class="title is-1"> <h1 class="title is-1">
<span class="day-ref"> <span class="day-ref">
${dayRefString} ${dayRefString}
</span> </span>
<span class="counter pull-right badge"> <span class="counter pull-right badge">
${stats.tasksByDay[dayRefString].length} ${stats.tasksByDay[dayRefString].length}
</span> </span>
</h1> </h1>
<div class="day-detail"> <div class="day-detail">
<ul> <ul>
${tasksOfTheDay} ${tasksOfTheDay}
</ul> </ul>
</div> </div>
`
</div> `
}) })
htmlOut += ` htmlOut += `
</div> </div>
</body> </body>
</html> </html>