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.
This commit is contained in:
Yisroel Baum 2026-05-01 11:32:21 +03:00
parent 2349e69c4f
commit 5be645f4e5
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
2 changed files with 29 additions and 10 deletions

View file

@ -8,7 +8,8 @@ document.addEventListener('DOMContentLoaded', () => {
});
const texts = await res.json();
textsList.innerHTML = texts.map(text =>
'<li><a href=/admin/texts/'
'<li class="card"><a class="card-link"'
+ ' href=/admin/texts/'
+ text.id
+ '>'
+ 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);