From 3bdbd54c1062ab36e561bd4d1d2ee54a0977402f Mon Sep 17 00:00:00 2001 From: Tykayn Date: Wed, 20 Jul 2022 17:01:53 +0200 Subject: [PATCH] style output html bulma --- app.js | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/app.js b/app.js index a61c53d..65b5d4c 100644 --- a/app.js +++ b/app.js @@ -64,7 +64,7 @@ function sortTasksFromJson(statObject) { }) // console.log(' ' + title) } else { - console.log('no' , elem['properties']['raw-value']) + console.log('no', elem['properties']['raw-value']) } }) @@ -106,35 +106,42 @@ function writeHtmlOutput() { let tasksOfTheDay = ''; stats.tasksByDay[dayRefString].forEach((dayObj) => { + let graphicKeyword = '✅' + if ('DONE' !== dayObj.todoKeyword) { + graphicKeyword = dayObj.todoKeyword; + } tasksOfTheDay += `
  • - ${dayObj.todoKeyword} + ${graphicKeyword} ${dayObj.title}

    -

    +

    ${dayObj.itags}

  • ` }) htmlOut += ` +
    +

    - - - ${dayRefString} - - - ${stats.tasksByDay[dayRefString].length} - - + + ${dayRefString} + + + ${stats.tasksByDay[dayRefString].length} +

    +
    -
      - ${tasksOfTheDay} -
    -
    - ` + +
    + + ` }) htmlOut += ` +