aboutsummaryrefslogtreecommitdiff
path: root/cmd/sklad/base.tmpl
blob: 956bfa43140a61a6290a3c1f72de955f06cb2487 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html>
<head>
	<title>{{ template "Title" . }} - sklad</title>
	<meta http-equiv=Content-Type content="text/html; charset=utf-8">
	<meta name=viewport content="width=device-width, initial-scale=1">
	<style>
	html, body { min-height: 100vh; }
	body { padding: 1rem; box-sizing: border-box;
		margin: 0 auto; max-width: 50rem;
		border-left: 1px solid #ccc; border-right: 1px solid #ccc;
		font-family: sans-serif; }

	section { border: 1px outset #ccc; padding: 0 .5rem; margin: 1rem 0; }
	section > p { margin: 0 0 .5rem 0; }

	header, footer { display: flex; justify-content: space-between;
		align-items: center; flex-wrap: wrap; padding-top: .5em; }
	header { margin: 0 -.5rem; padding: .5rem .5rem 0 .5rem;
		background: linear-gradient(0deg, transparent, #f8f8f8); }
	body > header { margin: -1rem -1rem 0 -1rem; padding: 1rem 1rem 0 1rem;
		background: linear-gradient(0deg, transparent, #eeeeee); }

	header *,
	footer * { display: inline-block; }
	header > *,
	footer > * { margin: 0 0 .5rem 0; }
	header > *:not(:last-child),
	footer > *:not(:last-child) { margin-right: .5rem; }

	header > h2,
	header > h3 { flex-grow: 1; }

	/* Don't ask me why this is an improvement on mobile browsers. */
	input[type=submit], input[type=text], input[type=password],
	select, textarea { border: 1px inset #ccc; padding: .25rem; }
	input[type=submit] { border-style: outset; }
	select { border-style: solid; }

	a { color: inherit; }
	textarea { padding: .5rem; box-sizing: border-box; width: 100%;
		font-family: inherit; resize: vertical; }
	select { max-width: 15rem; }
	</style>
</head>
<body>

<header>
	<h1>sklad</h1>

{{ block "HeaderControls" . }}
	<a href="container">Obaly</a>
	<a href="series">Řady</a>

	<form method=get action="search">
	<input type=text name=q autofocus><input type=submit value="Hledat">
	</form>

	<form method=post action="logout">
	<input type=submit value="Odhlásit">
	</form>
{{ end }}

</header>

{{ template "Content" . }}
</body>
</html>