47 lines
1.7 KiB
HTML
47 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport"
|
|
content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<link rel="stylesheet"
|
|
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
|
|
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"
|
|
crossorigin="anonymous">
|
|
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
|
<title>Pizzatool</title>
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
<h2>Ingredients</h2>
|
|
<ul>
|
|
<li v-for="ingredient in ingredients">
|
|
{{ ingredient.name }}
|
|
<button v-on:click="delete_ingredient(ingredient.id)">-</button>
|
|
</li>
|
|
<li>
|
|
<form v-on:submit.prevent="create_ingredient">
|
|
<input v-model="ingredient_name">
|
|
<button type="submit">+</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
<h2>Pizzas</h2>
|
|
<ul>
|
|
<li v-for="pizza in pizzas">
|
|
{{ pizza.name }}
|
|
<button v-on:click="delete_pizza(pizza.id)">-</button>
|
|
</li>
|
|
<li>
|
|
<form v-on:submit.prevent="create_pizza">
|
|
<input v-model="pizza_name">
|
|
<button type="submit">+</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<script src="ui.js"></script>
|
|
</body>
|
|
</html>
|