summaryrefslogtreecommitdiffstats
path: root/pages/index.html
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2016-12-09 13:55:09 +0100
committerclsr <clsr@clsr.net>2016-12-09 13:55:09 +0100
commit08a51af8eafabc6c074ca5a924d86a48280a7357 (patch)
tree881deee37a8d0072daa7b27e794f4f58dc9f5123 /pages/index.html
downloadgomf-web-08a51af8eafabc6c074ca5a924d86a48280a7357.tar.gz
gomf-web-08a51af8eafabc6c074ca5a924d86a48280a7357.zip
Initial commit
Diffstat (limited to 'pages/index.html')
-rw-r--r--pages/index.html40
1 files changed, 40 insertions, 0 deletions
diff --git a/pages/index.html b/pages/index.html
new file mode 100644
index 0000000..f27d46d
--- /dev/null
+++ b/pages/index.html
@@ -0,0 +1,40 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <title>{{.SiteName}}</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <link rel="stylesheet" href="/static/gomf.css" />
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+ <script type="text/javascript" src="/static/gomf.js" async></script>
+ </head>
+ <body>
+ <h1>{{.SiteName}}</h1>
+
+ <main>
+ <p>Maximum file size: <b>{{.MaxSize}}</b>.</p>
+ <form method="post" enctype="multipart/form-data" action="upload.php?output=html">
+ <div>
+ <span>Select file</span>
+ <input type="file" name="files[]" multiple data-max-size="{{.MaxSizeBytes}}" id="file" />
+ </div>
+ <input id="file-submit" type="submit" value="upload" />
+ </form>
+ {{with .Result}}<ul id="results">
+ {{range .Files}}<li><b>{{.Name}}</b>: <a href="{{.Url}}">{{.Url}}</a></li>{{end}}
+ {{if .Description}}<span style="color: red">{{.Description}}</span>{{end}}
+ </ul>{{end}}
+ </main>
+
+ <nav>
+ <ul>
+ <li><a href="/">{{.SiteName}}</a></li>
+ <li><a href="mailto:{{.Contact}}">Contact</a></li>
+ <li><a href="mailto:{{.Abuse}}">Report abuse</a></li>
+ {{range $name, $path := .Pages}}{{if ne $path "index.html"}}
+ <li><a href="{{$path}}">{{$name}}</a></li>
+ {{end}}{{end}}
+ </ul>
+ </nav>
+ </body>
+</html>