add the first version groceries_list page

This commit is contained in:
starnakin 2023-02-12 21:54:29 +01:00
parent f7d2e8563b
commit 9c903176b1
3 changed files with 71 additions and 2 deletions

View File

@ -6,7 +6,6 @@
</head>
<body>
<h1>connected</h1>
<h2>Welcome to FlaskApp!</h2>
<a href="/logout">
<input type="button" value="logout">
</a>

71
templates/grocery.html Normal file
View File

@ -0,0 +1,71 @@
<!DOCTYPE html>
<html>
<header>
<title>{{name}}</title>
</header>
<body>
<div id="container">
<table>
<tr>
<td><b>Acheté</b></td>
<td><b>Nom</b></td>
<td><b>Quantité</b></td>
<td><b>Prix</b></td>
</tr>
<tr>
{% for article in articles %}
<td class="buyed">
<input type="checkbox" id={{article.id}}>
</td>
<td>
<input type="text" value={{article.name}}>
</td>
<td>
<input type="number" value="{{article.quantity}}" size="7" step="1">
</td>
<td>
<input type="number" value="{{article.price}}" size="9" step="0.01"'>
</td>
{% endfor %}
</tr>
<tr>
<td class="add_element" colspan="4">
<a href={{add_button_url}}>
<input type="button" value="+">
</a>
</td>
</tr>
</table>
</div>
<style>
td.buyed {
text-align: center;
vertical-align: middle;
}
body {
background: #67BE4B;
}
#container {
width: 400px;
margin: 0 auto;
margin-top: 5%;
border: 1px solid #f1f1f1;
background: #fff;
}
td.add_element {
background: #fff;
margin: 100%;
text-align: center;
}
td.add_element input[type=button] {
width: 100%;
border: 0px;
background: #67BE4B;
}
td.add_element input[type=button]:hover {
background: #fff;
border: 1px solid #67BE4B;
}
</style>
</body>
</html>

View File

@ -4,7 +4,6 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="index.css" />
<title>Beyond School</title>
</head>
<body>