summaryrefslogtreecommitdiff
path: root/templates/blog.html
diff options
context:
space:
mode:
authorroerick <roerick@wyo.town>2025-10-17 15:32:19 -0600
committerroerick <roerick@wyo.town>2025-10-17 15:32:19 -0600
commitce61d3db96e0539c8df1886ac635e7e85dbde31f (patch)
tree8af7c0eda03b91273ebffbde5799e4436b04cac6 /templates/blog.html
initial commit, models not working
Diffstat (limited to 'templates/blog.html')
-rw-r--r--templates/blog.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/templates/blog.html b/templates/blog.html
new file mode 100644
index 0000000..0fc0035
--- /dev/null
+++ b/templates/blog.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>{{.Title}}</title>
+</head>
+<body>
+ <h1>{{.Title}}</h1>
+ <p>{{.Content}}</p>
+ <hr>
+ <h2>Edit Blog</h2>
+ <form method="POST" action="/blogs/{{.ID}}">
+ <input type="hidden" name="_method" value="PUT">
+ <label>Title:</label><br>
+ <input type="text" name="title" value="{{.Title}}"><br>
+ <label>Content:</label><br>
+ <textarea name="content">{{.Content}}</textarea><br>
+ <input type="submit" value="Update">
+ </form>
+ <form method="POST" action="/blogs/{{.ID}}">
+ <input type="hidden" name="_method" value="DELETE">
+ <input type="submit" value="Delete">
+ </form>
+</body>
+</html>