diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2021-03-21 21:44:19 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2021-03-21 21:44:19 +0300 |
commit | c994959f736206aacec8e9933d62588b9cb5b0c5 (patch) | |
tree | a65a3061df93984ecdb0911c4d0582c353ca5035 /templates/pages/save.gohtml | |
parent | 37c250d538893ff8178bd9c9e4dde225a991ce76 (diff) |
Diffstat (limited to 'templates/pages/save.gohtml')
-rw-r--r-- | templates/pages/save.gohtml | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/templates/pages/save.gohtml b/templates/pages/save.gohtml index 2b427f6..318fd51 100644 --- a/templates/pages/save.gohtml +++ b/templates/pages/save.gohtml @@ -1,14 +1,25 @@ {{template "layout.gohtml" .}} {{define "content"}} -<div class="layout-center"> - <form action="/"> +<div class="flex content three"> + <div class="full off-third-800 third-800"> <h1>Saved</h1> Secret url: - <hr /> - <p>https://sendsafe.xyz/s/{{.id}}</p> + <div class="stack"> + <input class="stack" type="text" id="link" value="https://sendsafe.xyz/s/{{.id}}" /> + <button class="stack" id="copy"><i class="icon-docs"></i> Copy link</button> + </div> <p>Send this link to recepient. This link can be viewed only once!</p> - <hr /> - <input type="submit" value="← Back"> - </form> + <a href="/" class="button"><i class="icon-left-big"></i> Back</a> + </div> </div> +<script type="application/javascript"> +htmx.onLoad(function(content) { + document.getElementById("copy").onclick = function () { + var copyText = document.getElementById("link"); + copyText.select(); + copyText.setSelectionRange(0, 99999); + document.execCommand("copy"); + } +}) +</script> {{ end }} |