aboutsummaryrefslogtreecommitdiff
path: root/t_idea/edit.html
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2024-09-29 13:10:56 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2024-09-29 13:11:04 +0200
commit07ace53ba2423f1b7e62477549ba62a30e79ff47 (patch)
treef1db9b2ab3d92ab292dd2b39c9902d4a44a043d7 /t_idea/edit.html
parent83334dc6011a5d39dd44995645fad55ee37daea7 (diff)
Added edit functionalityv0.1.0
Added a new edit functionality and page with styling. Other minor changes: - Added assets folder served under /static/ - Created a new template edit.html - grouped ideas.html and edit.html under t_idea - Changed router to use mux and organized routes - Added more checks on empty titles - Added javascript to t_idea/index.html for intuitive button functionality
Diffstat (limited to 't_idea/edit.html')
-rw-r--r--t_idea/edit.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/t_idea/edit.html b/t_idea/edit.html
new file mode 100644
index 0000000..cae7bd2
--- /dev/null
+++ b/t_idea/edit.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link rel="stylesheet" href="/static/main.css">
+ <title>Editing "{{.Title}}"</title>
+ <style>
+textarea[name="text"] {
+ color: #4c4c4c;
+ border: dashed 1px black;
+ font-size: 1.25em;
+ font-family: monospace;
+}
+input[name="title"] {
+ color: #4c4c4c;
+ border: dashed 1px black;
+ font-weight: bold;
+ font-size: 2em;
+}
+ </style>
+ </head>
+ <body>
+ <h3>Editing "{{.Title}}"</h3>
+ <hr>
+ <div class="idea">
+ <form action="/idea/edit/" method="post">
+ <input name="title" type="text" value="{{.Title}}"><br>
+ <textarea name="text" cols=80 rows=4 required>{{.Text}}</textarea>
+ <p class="creation">by <span class="author">{{.Author}}</span> on <span class="date">{{.CreatedAt}}</span></p>
+ <input type="submit" value="confirm">
+ </form>
+ <form action="/ideas/" method="get">
+ <input type="submit" value="cancel">
+ </form>
+ </div>
+ </body>
+</html>