add page for item and route for deleting items
This commit is contained in:
25
views/item.html
Normal file
25
views/item.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>{{.Item.Title}}</title>
|
||||
|
||||
<style>
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<img src="{{.Item.Image}}" alt="" width="auto" height="100px" />
|
||||
<h2>{{.Item.Title}}</h2>
|
||||
<form method="POST" action="/items/{{.Item.ID}}/delete">
|
||||
<button type="submit">Delete item</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user