diff options
Diffstat (limited to 'controller/template')
| -rw-r--r-- | controller/template/404.html | 7 | ||||
| -rw-r--r-- | controller/template/base.html | 49 | ||||
| -rw-r--r-- | controller/template/index.html | 28 | ||||
| -rw-r--r-- | controller/template/uploaded.html | 10 |
4 files changed, 94 insertions, 0 deletions
diff --git a/controller/template/404.html b/controller/template/404.html new file mode 100644 index 0000000..fa19547 --- /dev/null +++ b/controller/template/404.html @@ -0,0 +1,7 @@ +{{define "404"}} +{{template "header" .}} +<main> + <h1>no such file</h1> +</main> +{{template "footer" .}} +{{end}} diff --git a/controller/template/base.html b/controller/template/base.html new file mode 100644 index 0000000..c91245d --- /dev/null +++ b/controller/template/base.html @@ -0,0 +1,49 @@ +{{define "header"}} +<!DOCTYPE html> +<html lang="en"> + <head> + <title>drop.janw.name</title> + <meta charset="UTF-8"> + <meta name="author" content="Jan Wolff"> + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> + <link href="data:," rel="icon"> + <style> + html, body { + padding: 0; + margin: 0; + width: 100%; + height: 100%; + } + + body { + display: flex; + justify-content: center; + align-items: center; + background: #ebebeb; + font-family: sans-serif; + } + + main { + padding: 2rem; + border-radius: 2rem; + background: #fefefe; + } + + form { + display: flex; + flex-direction: column; + gap: 1rem; + } + + progress { + width: 100%; + } + </style> + </head> + <body> +{{end}} + +{{define "footer"}} + </body> +</html> +{{end}} diff --git a/controller/template/index.html b/controller/template/index.html new file mode 100644 index 0000000..f50be97 --- /dev/null +++ b/controller/template/index.html @@ -0,0 +1,28 @@ +{{define "index"}} +{{template "header" .}} +<main> + <h1>drop.janw.name</h1> + <form method="POST" action="/" enctype="multipart/form-data"> + <div> + <label for="file"> + File: + </label> + <input id="file" type="file" name="file"> + </div> + <div> + <label for="protect"> + Password Protect: + </label> + <input id="protect" type="checkbox" name="protect"> + </div> + <div> + <label for="until"> + Available Until: + </label> + <input id="until" type="datetime-local" name="until"> + </div> + <input type="submit" id="upload" value="Upload"> + </form> +</main> +{{template "footer" .}} +{{end}} diff --git a/controller/template/uploaded.html b/controller/template/uploaded.html new file mode 100644 index 0000000..1324082 --- /dev/null +++ b/controller/template/uploaded.html @@ -0,0 +1,10 @@ +{{define "uploaded"}} +{{template "header" .}} +<main> + <h1>File uploaded successfully</h1> + <p> + <a href="{{.DownloadURL}}">{{.DownloadURL}}</a> + </p> +</main> +{{template "footer" .}} +{{end}} |
