Moved parts of the html separate files
This commit is contained in:
1 parent
1ba198f130
commit
a8b4c42e32
7 files changed
+49
-93
No files matched your search
+3
-39
@@ -1,47 +1,11 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Shopping List</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" content="text/css" href="/static/css/main.css"/>
|
||||
</head>
|
||||
{% include "header.html" %}
|
||||
<body>
|
||||
<h1 class="container" style="text-align: center">{{ data["title"] }}</h1>
|
||||
<div class="" style=" text-align: center">
|
||||
<form action="/post" method="post">
|
||||
Name: <input type="text" name="name" value=""><br>
|
||||
Item: <input type="text" name="item" value=""><br><br>
|
||||
<input type="submit" name="addValue" value="Submit"/>
|
||||
</form>
|
||||
{% include "addForm.html" %}
|
||||
</div>
|
||||
<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>
|
||||
{% include "list.html" %}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user