summaryrefslogtreecommitdiffstats
path: root/pages/index.html
blob: f27d46d57073bda9c739d06f3940517e1d8b6a1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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>