aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/card.html20
-rw-r--r--views/dashboard.html20
-rw-r--r--views/gril.html10
-rw-r--r--views/tag.html22
4 files changed, 51 insertions, 21 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 9768778..803cdde 100644
--- a/views/gril.html
+++ b/views/gril.html
@@ -18,9 +18,13 @@
18 </p> 18 </p>
19 {{ end }} 19 {{ end }}
20 {{ range $tag := $gril.Tags }} 20 {{ range $tag := $gril.Tags }}
21 <div class="chip"> 21 <a href="/tag/{{ $tag }}"
22 {{ $tag }} 22 alt="Mit &quot;{{ $tag }}&quot; getaggte Grils einsehen"
23 </div> 23 title="Mit &quot;{{ $tag }}&quot; getaggte Grils einsehen">
24 <div class="chip gril-tag">
25 {{ $tag }}
26 </div>
27 </a>
24 {{ end }} 28 {{ end }}
25 <br /> 29 <br />
26 <br /> 30 <br />
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 &quot;{{ .tag }}&quot;:</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 }}