struktur überarbeitet

eine div index die alle inhalte hat, es wird jtz pro liste ein LI und
ein UL mehr erstellt. li hat id. Im li gibt es jtz auch einen
Bearbeitungsknopf
This commit is contained in:
Technoir committed 2026-10-09 21:34:41 +02:00
1 parent c72b14e594
commit b14b0ac08b
1 file changed
+10 -12
+10 -12
View File
@@ -11,21 +11,19 @@ xmlns:th="http://www.thymeleaf.org">
<script src="/js/pages/index/index.js" type="module"></script>
<body>
<div class="index">
<form class="addListForm">
<input type="text" name="listName" required />
<button type="submit">Neue Liste erstellen</button>
</form>
<div class="createShoppingList">
<form th:action="@{api/list}" method="post">
<input type="text" name="listName" required />
<button type="submit">Neue Liste erstellen</button>
</form>
</div>
<div class="shoppingListOverwiev">
<ul th:each="shoppingList : ${lists}" >
<li class="shoppingListOverview__shoppingList" th:id="${shoppingList.id}" th:attr="name=${shoppingList.listName}">
<a th:text="${shoppingList.listName}" th:href="@{/list/{id}(id=${shoppingList.id})}"></a>
<button type="button" class="shoppingListOverview__deleteListButton" th:attr="data-id=${shoppingList.id}">Liste löschen</button>
<ul class="displayedList">
<li th:each="list : ${lists}" class="list" th:id="${list.id}">
<a th:text="${list.listName}" th:href="@{/list/{id}(id=${list.id})}"></a>
<button type="button" class="list__editButton">Liste bearbeiten</button>
<button type="button" class="list__deleteButton">Liste löschen</button>
</li>
</ul>
</div>
</body>