aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorjan <jan@ruken.pw>2015-12-30 14:08:03 (UTC)
committerjan <jan@ruken.pw>2015-12-30 14:08:03 (UTC)
commita46963a6f9dff657a180ba0c6871c015871a80f5 (patch)
tree15adfd0298ff1d2fdfec62ceaabf8a904d811e74 /views
parent36d7f9a0551a98eda1ff2a871254ff19128e7f63 (diff)
instant. fucking. suche.
Diffstat (limited to 'views')
-rw-r--r--views/instant_search_results.html9
-rw-r--r--views/list.html92
2 files changed, 65 insertions, 36 deletions
diff --git a/views/instant_search_results.html b/views/instant_search_results.html
new file mode 100644
index 0000000..e05c17a
--- /dev/null
+++ b/views/instant_search_results.html
@@ -0,0 +1,9 @@
1{{ define "instant_search_results" }}
2{{ range .results }}
3<li class="collection-item avatar hoverable">
4 <img src="{{ .ImagePath true }}" alt="" class="circle">
5 <span class="title">{{ .RomajiName }}</span>
6 <p>{{ .KanjiName }}</p>
7</li>
8{{ end }}
9{{ end }} \ No newline at end of file
diff --git a/views/list.html b/views/list.html
index 0393d19..5114ab9 100644
--- a/views/list.html
+++ b/views/list.html
@@ -7,55 +7,75 @@
7 <title>grilist</title> 7 <title>grilist</title>
8 <link rel="stylesheet" href="/assets/css/list.css" /> 8 <link rel="stylesheet" href="/assets/css/list.css" />
9 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> 9 <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
10 <script src="/assets/js/search.js"></script>
10 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> 11 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
11 </head> 12 </head>
12 <body> 13 <body>
13 {{ template "navbar" . }} 14 {{ template "navbar" . }}
14 <div class="container"> 15 <div class="container">
15 <h1>{{ $list.Name }}<small>von {{ $list.Owner.GetName }}</small></h1><br /> 16 <h1>{{ $list.Name }}<small>von {{ $list.Owner.GetName }}</small></h1><br />
16 <ul class="gril-list"> 17 <div class="row">
17 {{ range $index, $lg := $list.Grils }} 18 <div class="col s12 {{ if ($user) and eq $user.ID $list.Owner.ID }}l8{{ end }}">
18 <li id="{{ $index }}" class="col s12 m8 offset-m2 l6 offset-l3"> 19 <ul class="gril-list">
19 <div class="card-panel hoverable list-entry"> 20 {{ range $index, $lg := $list.Grils }}
20 <div class="row valign-wrapper"> 21 <li id="{{ $index }}">
21 <div class="col s1 rank-text"> 22 <div class="card-panel hoverable list-entry">
22 {{ $index }} 23 <div class="row valign-wrapper">
23 </div> 24 <div class="col s3 m2">
24 <div class="col s3 m2"> 25 <div class="circle gril-img" style="background-image: url(/{{ $lg.Gril.ImagePath true }})"> </div>
25 <div class="circle gril-img" style="background-image: url(/{{ $lg.Gril.ImagePath true }})"> </div> 26 </div>
26 </div> 27 <div class="col s6 m6">
27 <div class="col s6 m6"> 28 <span><a href="/gril/{{ $lg.Gril.Slug }}">{{ $lg.Gril.RomajiName }}</a><br />
28 <span><a href="/gril/{{ $lg.Gril.Slug }}">{{ $lg.Gril.RomajiName }}</a><br /> 29 <span class="jap-name">{{ $lg.Gril.KanjiName }}</span>
29 <span class="jap-name">{{ $lg.Gril.KanjiName }}</span> 30 </span>
30 </span> 31 </div>
31 </div> 32 {{ if ($user) and eq $user.ID $list.Owner.ID }}
32 {{ if ($user) and eq $user.ID $list.Owner.ID }} 33 <div class="col s3 m5">
33 <div class="col s2 m3"> 34 <div class="hide-on-med-and-up">
34 <div class="hide-on-med-and-up"> 35 <div class="row list-controls valign-wrapper">
35 <div class="row list-controls valign-wrapper"> 36 <div class="col s6 left-align">
36 <div class="col s6 left-align"> 37 <i class="material-icons grey-text" onClick="">keyboard_arrow_up</i>
37 <i class="material-icons grey-text" onClick="">keyboard_arrow_up</i> 38 <i class="material-icons grey-text" onClick="">keyboard_arrow_down</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>
39 </div> 44 </div>
40 <div class="col s4 left-align"> 45 <div class="hide-on-small-only">
41 <i class="hide-on-med-and-up material-icons delete-icon grey-text" onClick="">delete</i> 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>
42 </div> 50 </div>
43 </div> 51 </div>
44 </div> 52 </div>
45 <div class="hide-on-small-only"> 53 {{ end }}
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> 54 </div>
52 </div> 55 </div>
53 {{ end }} 56 </li>
54 </div> 57 {{ end }}
58 </ul>
59 </div>
60 {{ if ($user) and eq $user.ID $list.Owner.ID }}
61 <div class="col s12 l4">
62 <div class="card-panel" style="margin-top: 14px">
63 <span style="font-size: 130%">Gril hinzufügen</span><br />
64 <form>
65 <div class="input-field">
66 <input id="search" type="search" onKeyDown="instantSearch()" required>
67 <label for="search"><i class="material-icons">search</i></label>
68 <i class="material-icons">close</i>
69 </div>
70 </form>
71 </div>
72 <div class="col s10 offset-s1">
73 <ul class="collection search-results" id="search-results">
74 </ul>
55 </div> 75 </div>
56 </li> 76 </div>
57 {{ end }} 77 {{ end }}
58 </ul> 78 </div>
59 </div> 79 </div>
60 </body> 80 </body>
61</html> 81</html>