diff options
author | jan <jan@ruken.pw> | 2016-11-14 15:55:50 (UTC) |
---|---|---|
committer | jan <jan@ruken.pw> | 2016-11-14 15:55:50 (UTC) |
commit | c735553214400f3af69e516ff41a6da9214449a7 (patch) | |
tree | c9a8e8fc84fdbaffb3a3fa318453b36270550ebb /views | |
parent | 9832cd28de49421021ed7c1f3caa7fdda7bc4372 (diff) |
likes und so.
Diffstat (limited to 'views')
-rw-r--r-- | views/includes/js.html | 3 | ||||
-rw-r--r-- | views/includes/like.html | 3 | ||||
-rw-r--r-- | views/pages/list.html | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/views/includes/js.html b/views/includes/js.html new file mode 100644 index 0000000..784c3b6 --- /dev/null +++ b/views/includes/js.html | |||
@@ -0,0 +1,3 @@ | |||
1 | {{ define "js" }} | ||
2 | <script src="/assets/js/{{ . }}.js"></script> | ||
3 | {{ end }} | ||
diff --git a/views/includes/like.html b/views/includes/like.html new file mode 100644 index 0000000..226aaff --- /dev/null +++ b/views/includes/like.html | |||
@@ -0,0 +1,3 @@ | |||
1 | {{ define "like" }} | ||
2 | <span class="like-count" content-type={{ .ContentType }} content-id={{ .ContentID }}></span> Likes | ||
3 | {{ end }} | ||
diff --git a/views/pages/list.html b/views/pages/list.html index f3c652b..f884a63 100644 --- a/views/pages/list.html +++ b/views/pages/list.html | |||
@@ -4,6 +4,7 @@ | |||
4 | <html> | 4 | <html> |
5 | <head> | 5 | <head> |
6 | {{ template "materialize" }} | 6 | {{ template "materialize" }} |
7 | {{ template "js" "like" }} | ||
7 | <title>grilist</title> | 8 | <title>grilist</title> |
8 | <link rel="stylesheet" href="/assets/css/list.css" /> | 9 | <link rel="stylesheet" href="/assets/css/list.css" /> |
9 | <link rel="stylesheet" href="/assets/css/search.css" /> | 10 | <link rel="stylesheet" href="/assets/css/search.css" /> |
@@ -24,6 +25,7 @@ | |||
24 | </div> | 25 | </div> |
25 | </div>{{ end }} | 26 | </div>{{ end }} |
26 | <blockquote>{{ $list.Description }}</blockquote><br /> | 27 | <blockquote>{{ $list.Description }}</blockquote><br /> |
28 | {{ template "like" (map "ContentType" 0 "ContentID" $list.ID) }} | ||
27 | <div class="row"> | 29 | <div class="row"> |
28 | <div class="col s12 {{ if ($user) and eq $user.ID $list.Owner.ID }}l8{{ end }}"> | 30 | <div class="col s12 {{ if ($user) and eq $user.ID $list.Owner.ID }}l8{{ end }}"> |
29 | <ul id="gril-list" class="gril-list"> | 31 | <ul id="gril-list" class="gril-list"> |