This commit is contained in:
Marc Gauch committed 2022-11-17 15:48:17 +01:00
commit d5b9c54ea1
27 files changed
+900

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Example 1 Week 5</title>
<link
rel="stylesheet"
href="https://unpkg.com/mustard-ui@latest/dist/css/mustard-ui.min.css"
/>
<script src="https://unpkg.com/vue@latest" defer></script>
<script src="app.js" defer></script>
<style>
.active {
background-color: aqua;
}
</style>
</head>
<body>
<section id="comp" class="section-secondary">
<h1>ToDo List</h1>
<div class="form-control">
<label>Enter new Item</label>
<input type="text" placeholder="Fill me up" v-model="newItem" />
</div>
<button
:class="[!!newItem ? 'button-primary':'button-primary-outlined']"
@click="addItem"
>
Add
</button>
<ul>
<li v-for="(item, index) of items" :key="index">
{{ item }}&nbsp;<button
class="button-danger button-small"
@click="removeItem(index)"
>
X
</button>
</li>
</ul>
</section>
</body>
</html>