diff options
Diffstat (limited to 'views/list.html')
-rw-r--r-- | views/list.html | 74 |
1 files changed, 57 insertions, 17 deletions
diff --git a/views/list.html b/views/list.html index c944e87..0393d19 100644 --- a/views/list.html +++ b/views/list.html | |||
@@ -1,22 +1,62 @@ | |||
1 | {{ define "list" }} | 1 | {{ define "list" }} |
2 | {{ $list := .list }} | 2 | {{ $list := .list }} |
3 | {{ $user := .user }} | ||
3 | <html> | 4 | <html> |
4 | <head> | 5 | <head> |
5 | {{ template "materialize" }} | 6 | {{ template "materialize" }} |
6 | <title>grilist</title> | 7 | <title>grilist</title> |
7 | <link rel="stylesheet" href="/assets/css/gril.css" /> | 8 | <link rel="stylesheet" href="/assets/css/list.css" /> |
8 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | 9 | <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> |
9 | </head> | 10 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> |
10 | <body> | 11 | </head> |
11 | {{ template "navbar" . }} | 12 | <body> |
12 | <div class="container"> | 13 | {{ template "navbar" . }} |
13 | <h1>{{ $list.Name }}<small>von xyz</small></h1><br /> | 14 | <div class="container"> |
14 | <ul> | 15 | <h1>{{ $list.Name }}<small>von {{ $list.Owner.GetName }}</small></h1><br /> |
15 | {{ range $lg := $list.Grils }} | 16 | <ul class="gril-list"> |
16 | <li><a href="/gril/{{ $lg.Gril.Slug }}">{{ $lg.Gril.RomajiName }}</a></li> | 17 | {{ range $index, $lg := $list.Grils }} |
17 | {{ end }} | 18 | <li id="{{ $index }}" class="col s12 m8 offset-m2 l6 offset-l3"> |
18 | </ul> | 19 | <div class="card-panel hoverable list-entry"> |
19 | </div> | 20 | <div class="row valign-wrapper"> |
20 | </body> | 21 | <div class="col s1 rank-text"> |
22 | {{ $index }} | ||
23 | </div> | ||
24 | <div class="col s3 m2"> | ||
25 | <div class="circle gril-img" style="background-image: url(/{{ $lg.Gril.ImagePath true }})"> </div> | ||
26 | </div> | ||
27 | <div class="col s6 m6"> | ||
28 | <span><a href="/gril/{{ $lg.Gril.Slug }}">{{ $lg.Gril.RomajiName }}</a><br /> | ||
29 | <span class="jap-name">{{ $lg.Gril.KanjiName }}</span> | ||
30 | </span> | ||
31 | </div> | ||
32 | {{ if ($user) and eq $user.ID $list.Owner.ID }} | ||
33 | <div class="col s2 m3"> | ||
34 | <div class="hide-on-med-and-up"> | ||
35 | <div class="row list-controls valign-wrapper"> | ||
36 | <div class="col s6 left-align"> | ||
37 | <i class="material-icons grey-text" onClick="">keyboard_arrow_up</i> | ||
38 | <i class="material-icons grey-text" onClick="">keyboard_arrow_down</i> | ||
39 | </div> | ||
40 | <div class="col s4 left-align"> | ||
41 | <i class="hide-on-med-and-up material-icons delete-icon grey-text" onClick="">delete</i> | ||
42 | </div> | ||
43 | </div> | ||
44 | </div> | ||
45 | <div class="hide-on-small-only"> | ||
46 | <div class="valign-wrapper"> | ||
47 | <i class="medium material-icons grey-text" onClick="">keyboard_arrow_up</i> | ||
48 | <i class="medium material-icons grey-text" onClick="">keyboard_arrow_down</i> | ||
49 | <i class="material-icons grey-text" onClick="">delete</i> | ||
50 | </div> | ||
51 | </div> | ||
52 | </div> | ||
53 | {{ end }} | ||
54 | </div> | ||
55 | </div> | ||
56 | </li> | ||
57 | {{ end }} | ||
58 | </ul> | ||
59 | </div> | ||
60 | </body> | ||
21 | </html> | 61 | </html> |
22 | {{ end }} | 62 | {{ end }} |