aboutsummaryrefslogtreecommitdiff
path: root/templates/ideas.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/ideas.html')
-rw-r--r--templates/ideas.html44
1 files changed, 44 insertions, 0 deletions
diff --git a/templates/ideas.html b/templates/ideas.html
new file mode 100644
index 0000000..e233000
--- /dev/null
+++ b/templates/ideas.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta property="og:title" content="{{.Name}} Ideez"/>
+ <meta property="og:description" content="Find all {{.Name}} ideez here!"/>
+ <meta property="og:image" content="/static/favicon.ico" />
+ <link rel="stylesheet" href="/static/main.css">
+ <script src="/static/index.js" defer></script>
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
+ <title>{{.Name}} Ideez</title>
+ </head>
+ <body>
+ {{ with .Error }}
+ <p class="error">{{.}}</p>
+ {{ end}}
+ <h3>Add an idea to <span title="copy link to Ideez" id="link">{{.Name}}</span>:</h3>
+ <form action="{{.RoutePrefix}}/idea/create/" method="post">
+ <input name="title" type="text" placeholder="Title" required></br>
+ <textarea name="text" cols=50 rows=4 placeholder="Write what is in your lightbulb here." required></textarea>
+ </br>
+ <input name="author" type="text" placeholder="Your Name" required></br>
+ <input type="submit" value="Think">
+ </form>
+ <hr>
+ <ul>
+ {{ range .Ideas }}
+ <div class="idea">
+ <h2 class="title">{{.Title}}</h2>
+ <pre class="text">{{.Text}}</pre>
+ <p class="creation">by <span class="author">{{.Author}}</span> on <span class="date">{{.LastUpdated}}</span></p>
+ <form action="{{$.RoutePrefix}}/idea/delete/" method="post">
+ <input type="hidden" name="id" value="{{.Id}}">
+ <input type="submit" value="delete">
+ </form>
+ <button class="edit" idea-id="{{.Id}}">edit</button>
+ </div>
+ {{ else }}
+ <p><i>No ideas here... Be the first one to think!</i></p>
+ {{ end }}
+ </ul>
+ </body>
+</html>