From 5be645f4e5ea68e7ed327a386806b8c200d10296 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Fri, 1 May 2026 11:32:21 +0300 Subject: [PATCH] style admin texts page with card list and form apply the page shell to the admin texts page and present each existing text as a card-link plus the new-text form as a card with a primary submit button. ids (#texts-list, #newTextName, #submit, #back) and the name attribute on the input are preserved so the existing cypress flows continue to work. --- public/js/texts.js | 5 ++++- views/templates/texts.php | 34 +++++++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/public/js/texts.js b/public/js/texts.js index 029196d..a0b69e1 100644 --- a/public/js/texts.js +++ b/public/js/texts.js @@ -8,7 +8,8 @@ document.addEventListener('DOMContentLoaded', () => { }); const texts = await res.json(); textsList.innerHTML = texts.map(text => - '
  • ' + text.name @@ -26,7 +27,9 @@ document.addEventListener('DOMContentLoaded', () => { if (res.ok) { const text = await res.json(); const li = document.createElement('li'); + li.className = 'card'; const a = document.createElement('a'); + a.className = 'card-link'; a.href = '/admin/texts/' + text.id; a.textContent = text.name; li.appendChild(a); diff --git a/views/templates/texts.php b/views/templates/texts.php index a56b5d2..a37bd1e 100644 --- a/views/templates/texts.php +++ b/views/templates/texts.php @@ -7,14 +7,30 @@ -

    Texts

    -
    Back to Admin - -
    - - -
    + +
    +
      +
      + +
      + +
      +
      +
      - \ No newline at end of file +