aboutsummaryrefslogtreecommitdiff
path: root/views/list.html
blob: 0393d19e66ecc29f67c836390b7bafe198f87ac4 (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
{{ define "list" }}
{{ $list := .list }}
{{ $user := .user }}
<html>
	<head>
		{{ template "materialize" }}
		<title>grilist</title>
		<link rel="stylesheet" href="/assets/css/list.css" />
		<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
		<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 />
			<ul class="gril-list">
			{{ range $index, $lg := $list.Grils }}
				<li id="{{ $index }}" class="col s12 m8 offset-m2 l6 offset-l3">
					<div class="card-panel hoverable list-entry">
						<div class="row valign-wrapper">
							<div class="col s1 rank-text">
							{{ $index }}
							</div>
							<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 s2 m3">
								<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>
	</body>
</html>
{{ end }}