47 lines
2.2 KiB
HTML
47 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<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" class="container">
|
|
<h2>Ingredients</h2>
|
|
<ul class="list-group">
|
|
<li v-for="ingredient in ingredients" class="list-group-item d-flex justify-content-between align-items-center">
|
|
{{ ingredient.name }}
|
|
<button v-on:click="delete_ingredient(ingredient.id)" class="btn btn-primary">-</button>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<form v-on:submit.prevent="create_ingredient" class="form-inline">
|
|
<input v-model="ingredient_name" placeholder="New Ingredient" class="form-control">
|
|
<button type="submit" class="btn btn-primary">+</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
<h2>Pizzas</h2>
|
|
<ul class="list-group">
|
|
<li v-for="pizza in pizzas" class="list-group-item d-flex justify-content-between align-items-center">
|
|
{{ pizza.name }}
|
|
<button v-on:click="delete_pizza(pizza.id)" class="btn btn-primary">-</button>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<form v-on:submit.prevent="create_pizza" class="form-inline">
|
|
<input v-model="pizza_name" placeholder="New Pizza" class="form-control">
|
|
<button type="submit" class="btn btn-primary">+</button>
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<script src="ui.js"></script>
|
|
</body>
|
|
</html>
|