diff options
author | Michal Hrusecky <michal@hrusecky.net> | 2020-10-28 21:48:19 +0300 |
---|---|---|
committer | Michal Hrusecky <michal@hrusecky.net> | 2020-10-28 21:48:19 +0300 |
commit | a107e0da98f7e0bddf70099a1e7318290edaab91 (patch) | |
tree | fbedef228961bb42d7672bc23c6e2051fc6aabba | |
parent | 5b9197f08c452c41d399adcbda394b78ac3308ac (diff) |
Do not show comments if not defined
Disable showing comments icon and link if there is no defined way how
to actually handle comments. To make blog work and look nicely even
without comments.
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/partials/article.html | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/layouts/index.html b/layouts/index.html index 6cd7fd6..35481f0 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -29,7 +29,9 @@ {{- partial "post/date.html" . }} {{- partial "post/category.html" . }} {{- partial "post/tag.html" . }} + {{- if .Site.Params.comment.type }} <span class="post-comment"><i class="icon icon-comment"></i> <a href="{{- .RelPermalink }}#comments" class="article-comment-link">{{- T "article_comments" }}</a></span> + {{- end }} {{- partial "post/wc.html" . }} </p> </article> diff --git a/layouts/partials/article.html b/layouts/partials/article.html index ec979cf..ccbed3c 100644 --- a/layouts/partials/article.html +++ b/layouts/partials/article.html @@ -14,8 +14,10 @@ {{- partial "post/category.html" . }} {{- partial "post/tag.html" . }} {{- partial "post/pv.html" . }} + {{- if .Site.Params.comment.type }} <span class="post-comment"><i class="icon icon-comment"></i> <a href="{{ .RelPermalink }}#comments" class="article-comment-link">{{T "article_comments" }}</a></span> + {{- end }} {{- partial "post/wc.html" . }} </div> </div> @@ -26,7 +28,9 @@ {{- partial "post/copyright.html" . }} </div> </article> + {{- if (.Site.Params.comment.type) }} {{- partial "post/comment.html" . }} + {{- end }} </div> {{- partial "post/nav.html" . }} -{{- partial "post/donate.html" . }}
\ No newline at end of file +{{- partial "post/donate.html" . }} |