diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/card.html | 20 | ||||
-rw-r--r-- | views/dashboard.html | 20 | ||||
-rw-r--r-- | views/gril.html | 26 | ||||
-rw-r--r-- | views/list.html | 4 | ||||
-rw-r--r-- | views/login.html | 8 | ||||
-rw-r--r-- | views/tag.html | 22 |
6 files changed, 68 insertions, 32 deletions
diff --git a/views/card.html b/views/card.html new file mode 100644 index 0000000..be28272 --- /dev/null +++ b/views/card.html | |||
@@ -0,0 +1,20 @@ | |||
1 | {{ define "card" }} | ||
2 | {{ $card := . }} | ||
3 | <div class="col s12 m6 l4"> | ||
4 | <div class="card white"> | ||
5 | <div class="card-content black-text"> | ||
6 | <span class="card-title">{{ $card.Title | html }}</span> | ||
7 | <p>{{ $card.Description | html }}</p> | ||
8 | </div> | ||
9 | <div class="card-action"> | ||
10 | {{ range $action := $card.Actions }} | ||
11 | {{ if $action.Disabled }} | ||
12 | <span>{{ $action.Name | html }}</span> | ||
13 | {{ else }} | ||
14 | <a href="{{ $action.Link }}">{{ $action.Name | html }}</a> | ||
15 | {{ end }} | ||
16 | {{ end }} | ||
17 | </div> | ||
18 | </div> | ||
19 | </div> | ||
20 | {{ end }} | ||
diff --git a/views/dashboard.html b/views/dashboard.html index 0551285..56be42b 100644 --- a/views/dashboard.html +++ b/views/dashboard.html | |||
@@ -13,23 +13,7 @@ | |||
13 | <h2>{{ $category.Title }}</h2> | 13 | <h2>{{ $category.Title }}</h2> |
14 | <div class="row"> | 14 | <div class="row"> |
15 | {{ range $card := $category.Cards }} | 15 | {{ range $card := $category.Cards }} |
16 | <div class="col s12 m6 l4"> | 16 | {{ template "card" $card }} |
17 | <div class="card white"> | ||
18 | <div class="card-content black-text"> | ||
19 | <span class="card-title">{{ $card.Title | html }}</span> | ||
20 | <p>{{ $card.Description | html }}</p> | ||
21 | </div> | ||
22 | <div class="card-action"> | ||
23 | {{ range $action := $card.Actions }} | ||
24 | {{ if $action.Disabled }} | ||
25 | <span>{{ $action.Name | html }}</span> | ||
26 | {{ else }} | ||
27 | <a href="{{ $action.Link }}">{{ $action.Name | html }}</a> | ||
28 | {{ end }} | ||
29 | {{ end }} | ||
30 | </div> | ||
31 | </div> | ||
32 | </div> | ||
33 | {{ end }} | 17 | {{ end }} |
34 | </div> | 18 | </div> |
35 | {{ end }} | 19 | {{ end }} |
@@ -37,4 +21,4 @@ | |||
37 | </div> | 21 | </div> |
38 | </body> | 22 | </body> |
39 | </html> | 23 | </html> |
40 | {{ end }} \ No newline at end of file | 24 | {{ end }} |
diff --git a/views/gril.html b/views/gril.html index 2dea399..776f14f 100644 --- a/views/gril.html +++ b/views/gril.html | |||
@@ -10,14 +10,24 @@ | |||
10 | <body> | 10 | <body> |
11 | {{ template "navbar" . }} | 11 | {{ template "navbar" . }} |
12 | <div class="container"> | 12 | <div class="container"> |
13 | <h1>{{ $gril.RomajiName }}<small>{{ $gril.KanjiName }}</small></h1> | 13 | <h1 id="gril-title">{{ $gril.RomajiName }}<small>{{ $gril.KanjiName }}</small></h1> |
14 | {{ if $gril.OtherNames }} | ||
15 | <p id="gril-alias">Auch bekannt als: | ||
16 | {{ range $i, $alias := $gril.OtherNames }}{{ if $i }},{{ end }} | ||
17 | {{ $alias }}{{ end }} | ||
18 | </p> | ||
19 | {{ end }} | ||
14 | <div class="row center-align"> | 20 | <div class="row center-align"> |
15 | <img src="/{{ $gril.ImagePath false }}" /> | 21 | <img src="/{{ $gril.ImagePath false }}" /> |
16 | </div> | 22 | </div> |
17 | {{ range $tag := $gril.Tags }} | 23 | {{ range $tag := $gril.Tags }} |
18 | <div class="chip"> | 24 | <a href="/tag/{{ $tag }}" |
19 | {{ $tag }} | 25 | alt="Mit "{{ $tag }}" getaggte Grils einsehen" |
20 | </div> | 26 | title="Mit "{{ $tag }}" getaggte Grils einsehen"> |
27 | <div class="chip gril-tag"> | ||
28 | {{ $tag }} | ||
29 | </div> | ||
30 | </a> | ||
21 | {{ end }} | 31 | {{ end }} |
22 | <br /> | 32 | <br /> |
23 | <br /> | 33 | <br /> |
@@ -27,7 +37,7 @@ | |||
27 | <div class="card"> | 37 | <div class="card"> |
28 | <div class="card-content purple-text text-lighten-2 center-align"> | 38 | <div class="card-content purple-text text-lighten-2 center-align"> |
29 | <span class="card-title big">{{ $gril.Birthday.Value}}</span> | 39 | <span class="card-title big">{{ $gril.Birthday.Value}}</span> |
30 | <p>geburtstag</p> | 40 | <p>Geburtstag</p> |
31 | </div> | 41 | </div> |
32 | </div> | 42 | </div> |
33 | </div> | 43 | </div> |
@@ -36,7 +46,7 @@ | |||
36 | <div class="card"> | 46 | <div class="card"> |
37 | <div class="card-content purple-text text-lighten-2 center-align"> | 47 | <div class="card-content purple-text text-lighten-2 center-align"> |
38 | <span class="card-title big">{{ $gril.Age.Value }}</span> | 48 | <span class="card-title big">{{ $gril.Age.Value }}</span> |
39 | <p>jahre alt</p> | 49 | <p>Jahre alt</p> |
40 | </div> | 50 | </div> |
41 | </div> | 51 | </div> |
42 | </div> | 52 | </div> |
@@ -47,7 +57,7 @@ | |||
47 | <div class="card-content center-big purple-text text-lighten-2 center-align"> | 57 | <div class="card-content center-big purple-text text-lighten-2 center-align"> |
48 | <p>in</p> | 58 | <p>in</p> |
49 | <span class="card-title big">{{ len $gril.Lists}}</span> | 59 | <span class="card-title big">{{ len $gril.Lists}}</span> |
50 | <p>liste{{ if ne (len $gril.Lists) 1 }}n{{ end }}</p> | 60 | <p>Liste{{ if ne (len $gril.Lists) 1 }}n{{ end }}</p> |
51 | </div> | 61 | </div> |
52 | </div> | 62 | </div> |
53 | </div> | 63 | </div> |
@@ -64,4 +74,4 @@ | |||
64 | </div> | 74 | </div> |
65 | </body> | 75 | </body> |
66 | </html> | 76 | </html> |
67 | {{ end }} \ No newline at end of file | 77 | {{ end }} |
diff --git a/views/list.html b/views/list.html index ddec59f..0393d19 100644 --- a/views/list.html +++ b/views/list.html | |||
@@ -25,7 +25,7 @@ | |||
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.ID }}">{{ $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> |
@@ -59,4 +59,4 @@ | |||
59 | </div> | 59 | </div> |
60 | </body> | 60 | </body> |
61 | </html> | 61 | </html> |
62 | {{ end }} \ No newline at end of file | 62 | {{ end }} |
diff --git a/views/login.html b/views/login.html index d671d50..6014d4d 100644 --- a/views/login.html +++ b/views/login.html | |||
@@ -24,15 +24,15 @@ | |||
24 | <form method="POST" name="login" action="#"> | 24 | <form method="POST" name="login" action="#"> |
25 | <div class="input-field col s12"> | 25 | <div class="input-field col s12"> |
26 | <i class="material-icons prefix">perm_identity</i> | 26 | <i class="material-icons prefix">perm_identity</i> |
27 | <input name="username" type="text" placeholder="Username" class="validate" value="{{ .previous_user }}"/> | 27 | <input name="username" type="text" placeholder="Benutzername" class="validate" value="{{ .previous_user }}"/> |
28 | </div> | 28 | </div> |
29 | <div class="input-field col s12"> | 29 | <div class="input-field col s12"> |
30 | <i class="material-icons prefix">lock_outline</i> | 30 | <i class="material-icons prefix">lock_outline</i> |
31 | <input name="password" type="password" placeholder="Password" class="validate" /> | 31 | <input name="password" type="password" placeholder="Passwort" class="validate" /> |
32 | </div> | 32 | </div> |
33 | <div class="row col s12"> | 33 | <div class="row col s12"> |
34 | <div class="col s4"> | 34 | <div class="col s4"> |
35 | <a class="waves-effect waves-teal btn-flat" href="/register">Register</a> | 35 | <a class="waves-effect waves-teal btn-flat" href="/register">Registrieren</a> |
36 | </div> | 36 | </div> |
37 | <div class="right-align"> | 37 | <div class="right-align"> |
38 | <button class="btn waves-effect waves-light purple lighten-2" type="submit" name="action"> | 38 | <button class="btn waves-effect waves-light purple lighten-2" type="submit" name="action"> |
@@ -46,4 +46,4 @@ | |||
46 | </div> | 46 | </div> |
47 | </body> | 47 | </body> |
48 | </html> | 48 | </html> |
49 | {{ end }} \ No newline at end of file | 49 | {{ end }} |
diff --git a/views/tag.html b/views/tag.html new file mode 100644 index 0000000..788083f --- /dev/null +++ b/views/tag.html | |||
@@ -0,0 +1,22 @@ | |||
1 | {{ define "tag" }} | ||
2 | <html> | ||
3 | <head> | ||
4 | {{ template "materialize" }} | ||
5 | <title>grilist</title> | ||
6 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | ||
7 | </head> | ||
8 | <body> | ||
9 | {{ template "navbar" . }} | ||
10 | <div class="container"> | ||
11 | <div class="row"> | ||
12 | <h2>Grils mit dem Tag "{{ .tag }}":</h2> | ||
13 | <div class="row"> | ||
14 | {{ range .cards }} | ||
15 | {{ template "card" . }} | ||
16 | {{ end }} | ||
17 | </div> | ||
18 | </div> | ||
19 | </div> | ||
20 | </body> | ||
21 | </html> | ||
22 | {{ end }} | ||