From 2349e69c4fb55fab330ec5d794a35f6423152023 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Fri, 1 May 2026 11:31:55 +0300 Subject: [PATCH] style today page with shell and card list wrap the today page in the shared header + container/stack shell, render scheduled nodes as cards via list-cards, and add a muted empty-state message that toggles when no nodes are scheduled. existing #scheduled-nodes-list and li selectors used by cypress tests are preserved (the empty message lives in its own element). --- public/js/today.js | 12 ++++++++++-- views/templates/today.php | 17 ++++++++++++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/public/js/today.js b/public/js/today.js index 6f14627..a9bbda8 100644 --- a/public/js/today.js +++ b/public/js/today.js @@ -2,6 +2,7 @@ document.addEventListener('DOMContentLoaded', () => { const scheduledNodesList = document.getElementById( 'scheduled-nodes-list' ); + const emptyMessage = document.getElementById('scheduled-nodes-empty'); function todayDateString() { const today = new Date(); @@ -23,10 +24,17 @@ document.addEventListener('DOMContentLoaded', () => { const scheduledNodes = await response.json(); scheduledNodesList.innerHTML = scheduledNodes .map((scheduledNode) => - '
  • ' + scheduledNode.planName + ': ' + - scheduledNode.nodeTitle + '
  • ' + '
  • ' + + '' + scheduledNode.planName + + ': ' + + '' + scheduledNode.nodeTitle + + '' + + '
  • ' ) .join(''); + if (emptyMessage !== null) { + emptyMessage.hidden = scheduledNodes.length > 0; + } } loadScheduledNodes(); diff --git a/views/templates/today.php b/views/templates/today.php index e76d875..4a5ed8a 100644 --- a/views/templates/today.php +++ b/views/templates/today.php @@ -7,9 +7,20 @@ -

    Today

    - + +
    + + +