aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/gril.html3
-rw-r--r--views/list.html74
-rw-r--r--views/navbar.html2
3 files changed, 61 insertions, 18 deletions
diff --git a/views/gril.html b/views/gril.html
index 803cdde..776f14f 100644
--- a/views/gril.html
+++ b/views/gril.html
@@ -17,6 +17,9 @@
17 {{ $alias }}{{ end }} 17 {{ $alias }}{{ end }}
18 </p> 18 </p>
19 {{ end }} 19 {{ end }}
20 <div class="row center-align">
21 <img src="/{{ $gril.ImagePath false }}" />
22 </div>
20 {{ range $tag := $gril.Tags }} 23 {{ range $tag := $gril.Tags }}
21 <a href="/tag/{{ $tag }}" 24 <a href="/tag/{{ $tag }}"
22 alt="Mit &quot;{{ $tag }}&quot; getaggte Grils einsehen" 25 alt="Mit &quot;{{ $tag }}&quot; getaggte Grils einsehen"
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 }}
diff --git a/views/navbar.html b/views/navbar.html
index 70911e4..8905a1d 100644
--- a/views/navbar.html
+++ b/views/navbar.html
@@ -4,7 +4,7 @@
4 <a href="/" class="brand-logo center">grilist</a> 4 <a href="/" class="brand-logo center">grilist</a>
5 <ul id="nav-mobile" class="right hide-on-med-and-down"> 5 <ul id="nav-mobile" class="right hide-on-med-and-down">
6 {{ if .user }} 6 {{ if .user }}
7 <li><a href="/">{{ .user.Name }}</a></li> 7 <li><a href="/">{{ .user.GetName }}</a></li>
8 <li><a href="/logout">Ausloggen</a></li> 8 <li><a href="/logout">Ausloggen</a></li>
9 {{ else }} 9 {{ else }}
10 <li><a href="/login">Einloggen</a></li> 10 <li><a href="/login">Einloggen</a></li>