summaryrefslogtreecommitdiff
path: root/templates/pages
diff options
context:
space:
mode:
authorAlexander Kiryukhin <a.kiryukhin@mail.ru>2021-03-18 02:06:42 +0300
committerAlexander Kiryukhin <a.kiryukhin@mail.ru>2021-03-18 02:06:42 +0300
commit6f31f35c7b38fbf63d7a0c9322458e0b75828495 (patch)
tree2fcb8cb31bb6604e85cf390dbc01f2e9a8b26ee7 /templates/pages
Initial
Diffstat (limited to 'templates/pages')
-rw-r--r--templates/pages/error.gohtml5
-rw-r--r--templates/pages/index.gohtml21
-rw-r--r--templates/pages/memo.gohtml13
-rw-r--r--templates/pages/notfound.gohtml10
-rw-r--r--templates/pages/save.gohtml13
5 files changed, 62 insertions, 0 deletions
diff --git a/templates/pages/error.gohtml b/templates/pages/error.gohtml
new file mode 100644
index 0000000..8d63bbd
--- /dev/null
+++ b/templates/pages/error.gohtml
@@ -0,0 +1,5 @@
+{{template "layout.gohtml" .}}
+{{define "content"}}
+<h1>Error happened.</h1>
+<h2>Nothing can be done.</h2>
+{{ end }}
diff --git a/templates/pages/index.gohtml b/templates/pages/index.gohtml
new file mode 100644
index 0000000..8cfcae1
--- /dev/null
+++ b/templates/pages/index.gohtml
@@ -0,0 +1,21 @@
+{{template "layout.gohtml" .}}
+{{define "content"}}
+<div class="layout-center">
+ <form method="POST" action="/save">
+ <h1>New secret</h1>
+ <label for="secret">Secret content:<span class="required">(required)</span></label>
+ <textarea id="secret" name="secret" rows="6" required></textarea>
+ <label><span>Expires after (or <b>first</b> read):</span><span class="required">(required)</span></label>
+ <div class="form-row">
+ <label><input id="days" name="days" type="number" value="0" min="0" max="365" required />days</label>
+ <label><input id="hours" name="hours" type="number" value="0" min="0" max="23" required />hours</label>
+ <label><input id="minutes" name="minutes" type="number" value="30" min="0" max="59" required />minutes</label>
+ </div>
+ {{/* <label for="pin">Pin code to open:<span class="optional">(optional)</span></label> */}}
+ {{/* <input id="pin" name="pin" type="string" value="" /> */}}
+ <hr />
+ <input type="hidden" name="csrf" value={{.csrf}} />
+ <input type="submit" value="Send" />
+ </form>
+</div>
+{{ end }}
diff --git a/templates/pages/memo.gohtml b/templates/pages/memo.gohtml
new file mode 100644
index 0000000..804d7b7
--- /dev/null
+++ b/templates/pages/memo.gohtml
@@ -0,0 +1,13 @@
+{{template "layout.gohtml" .}}
+{{define "content"}}
+<div class="layout-center">
+ <form action="/">
+ <h1>Secret:</h1>
+ <b>Warning!</b> This text already deleted from server! If you refresh or close page - secret will be completely lost!
+ <hr />
+ <pre>{{.secret}}</pre>
+ <hr />
+ <input type="submit" value="&larr; Back">
+ </form>
+</div>
+{{ end }}
diff --git a/templates/pages/notfound.gohtml b/templates/pages/notfound.gohtml
new file mode 100644
index 0000000..911f8e1
--- /dev/null
+++ b/templates/pages/notfound.gohtml
@@ -0,0 +1,10 @@
+{{template "layout.gohtml" .}}
+{{define "content"}}
+<div class="layout-center">
+ <form action="/">
+ <h1>Not found.</h1>
+ <p>Link expired or already viewed.</p>
+ <input type="submit" value="&larr; Back">
+ </form>
+</div>
+{{ end }}
diff --git a/templates/pages/save.gohtml b/templates/pages/save.gohtml
new file mode 100644
index 0000000..f940502
--- /dev/null
+++ b/templates/pages/save.gohtml
@@ -0,0 +1,13 @@
+{{template "layout.gohtml" .}}
+{{define "content"}}
+<div class="layout-center">
+ <form action="/">
+ <h1>Saved</h1>
+ Secret url:
+ <hr />
+ <a href="https://sendsafe.xyz/s/{{.id}}">https://sendsafe.xyz/s/{{.id}}</a>
+ <hr />
+ <input type="submit" value="&larr; Back">
+ </form>
+</div>
+{{ end }}