diff options
Diffstat (limited to 'pages')
-rw-r--r-- | pages/index.html | 40 |
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> |