shoplist2/templates/index.html
2020-01-22 03:06:20 +11:00

60 lines
2.4 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<title>This is my site</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/static/css/index.css"/>
</head>
<body>
<h1 class="container" style="text-align: center">{{ data["title"] }}</h1>
<aside>
<form action="/post" method="post">
Name:<br>
<input type="text" name="name" value=""><br>
Item:<br>
<input type="text" name="item" value=""><br><br>
<input type="submit" name="addValue"value="Submit">
</form>
</aside>
<div class="container" id="memes">
<table class="table-striped table">
<thead class="thead-dark">
<tr>
<th scope="col">Item</th>
<th scope="col">Requester</th>
<th scope="col">Gottem?</th>
<th scope="col">Remove</th>
</tr>
{% for x in data["results"] %}
<tr id="row-{{x[0]}}">
<td>{{x[1]}}</td>
<td>{{x[4]}}</td>
<td> {% if x[3] == 0 %}
<form><button type="submit" formaction="/post" formmethod="POST" name="got" value="{{x[0]}}">No</button></form>
{% else %}
yes
{% endif %}</td>
<td><form>
<button type="submit" formaction="/post" formmethod="POST" name="rem" value="{{x[0]}}">Remove</button>
</form>
</td>
</tr>
{% endfor %}
</table>
</div>
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<!-- Popper JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</body>
</html>