style home page with shell and card list
apply the new design system to the home page: wrap content in a container/stack shell with a site-header for the logout and today links, render the texts list as a vertical stack of cards via the list-cards primitive, and dress the create plan modal with the new modal/btn classes. js renders each text as an li.card with the create-plan button preserved so existing cypress hooks (li, .create-plan, .plan-name, .save-plan, .cancel-plan, ids) keep matching.
This commit is contained in:
parent
b259a1243e
commit
807458ebe8
2 changed files with 36 additions and 21 deletions
|
|
@ -9,9 +9,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
const texts = await response.json();
|
||||
textsList.innerHTML = texts
|
||||
.map(text =>
|
||||
'<li>' + text.name +
|
||||
' <button class="create-plan" data-text-id="' +
|
||||
text.id + '">Create plan</button></li>'
|
||||
'<li class="card cluster cluster-between">' +
|
||||
'<span class="text-name">' + text.name + '</span>' +
|
||||
'<button class="create-plan btn btn-primary"' +
|
||||
' data-text-id="' + text.id + '">Create plan</button>' +
|
||||
'</li>'
|
||||
)
|
||||
.join('');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue