aboutsummaryrefslogtreecommitdiff
path: root/views/list.html
blob: 7963004c6ec50ca5639020af513ebdb94fe414ba (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{{ define "list" }}
{{ $list := .list }}
{{ $user := .user }}
<html>
	<head>
		{{ template "materialize" }}
		<title>grilist</title>
		<link rel="stylesheet" href="/assets/css/list.css" />
		<link rel="stylesheet" href="/assets/css/search.css" />
		<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
		<script src="/assets/js/search.js"></script>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
	</head>
	<body>
		{{ template "navbar" . }}
		<div class="container">
			<h1>{{ $list.Name }}<small>von {{ $list.Owner.GetName }}</small></h1><br />
			<div class="row">
				<div class="col s12 {{ if ($user) and eq $user.ID $list.Owner.ID }}l8{{ end }}">
					<ul class="gril-list">
					{{ range $index, $lg := $list.Grils }}
						<li id="{{ $index }}">
							<div class="card-panel hoverable list-entry">
								<div class="row valign-wrapper">
									<div class="col s3 m2">
										<div class="circle gril-img" style="background-image: url(/{{ $lg.Gril.ImagePath true }})"> </div>
									</div>
									<div class="col s6 m6">
									<span><a href="/gril/{{ $lg.Gril.Slug }}">{{ $lg.Gril.RomajiName }}</a><br />
										<span class="jap-name">{{ $lg.Gril.KanjiName }}</span>
									</span>
									</div>
									{{ if ($user) and eq $user.ID $list.Owner.ID }}
									<div class="col s3 m5">
										<div class="hide-on-med-and-up">
											<div class="row list-controls valign-wrapper">
												<div class="col s6 left-align">
													<i class="material-icons grey-text" onClick="">keyboard_arrow_up</i>
													<i class="material-icons grey-text" onClick="">keyboard_arrow_down</i>
													</div>
													<div class="col s4 left-align">
													<i class="hide-on-med-and-up material-icons delete-icon grey-text" onClick="">delete</i>
													</div>
												</div>
											</div>
											<div class="hide-on-small-only">
												<div class="valign-wrapper">
												<i class="medium material-icons grey-text" onClick="">keyboard_arrow_up</i>
												<i class="medium material-icons grey-text" onClick="">keyboard_arrow_down</i>
												<i class="material-icons grey-text" onClick="">delete</i>
											</div>
										</div>
									</div>
									{{ end }}
								</div>
							</div>
						</li>
					{{ end }}
					</ul>
				</div>
				{{ if ($user) and eq $user.ID $list.Owner.ID }}
				<div class="col s12 l4">
					<div class="card-panel" style="margin-top: 14px">
						<span style="font-size: 130%">Gril hinzufügen</span><br />
						<form>
							<div class="input-field">
								<input id="search" type="search" onKeyDown="instantSearch()" required>
								<label for="search"><i class="material-icons">search</i></label>
								<i class="material-icons">close</i>
							</div>
						</form>
					</div>
					<div class="col s10 offset-s1">
						<ul class="collection search-results" id="search-results">
						</ul>
					</div>
				</div>
				{{ end }}
			</div>
		</div>
	</body>
</html>
{{ end }}