diff options
author | WayJam So <imsuwj@gmail.com> | 2020-05-10 12:15:51 +0300 |
---|---|---|
committer | WayJam So <imsuwj@gmail.com> | 2020-05-10 12:15:51 +0300 |
commit | 36aba0c11a16c845f598908e6225472b5649d780 (patch) | |
tree | c2771d1858a70ac506866953ce3cfe6bf6d1de8f /layouts | |
parent | b8a76222ff4134864976a03c061407e9a599ef97 (diff) |
update: comment style
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 20 | ||||
-rw-r--r-- | layouts/partials/comments.html | 8 |
2 files changed, 15 insertions, 13 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index fbdd719..687a0e1 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -22,14 +22,16 @@ </div> <div class="clearfix"></div> </article> - <div class="other_posts"> - {{ if .PrevInSection }} - <a href="{{.PrevInSection.Permalink}}" class="prev">{{ .PrevInSection.LinkTitle }}</a> - {{ end }} - {{ if .NextInSection }} - <a href="{{.NextInSection.Permalink}}" class="next">{{ .NextInSection.LinkTitle }}</a> - {{ end }} - </div> - {{ partial "comments.html" . }} + {{ if not (eq .Type "section") }} + <div class="other_posts"> + {{ if .PrevInSection }} + <a href="{{.PrevInSection.Permalink}}" class="prev">{{ .PrevInSection.LinkTitle }}</a> + {{ end }} + {{ if .NextInSection }} + <a href="{{.NextInSection.Permalink}}" class="next">{{ .NextInSection.LinkTitle }}</a> + {{ end }} + </div> + {{ partial "comments.html" . }} + {{ end }} </section> {{ end }} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index e7cc87b..363d4f2 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -1,12 +1,12 @@ <aside id="comments"> {{- $comment := .Site.Params.comment}} - {{- if eq $comment.type "none" }} + {{- if or (eq $comment.type "none") (.Params.noComment) (eq .Type "section") }} {{- else if eq $comment.type "valine"}} {{- if $comment.valine.visitor -}} <span id="{{ .RelPermalink | relURL }}" class="leancloud_visitors" data-flag-title="{{ .Title }}"> - <span class="post-meta-item-text">文章阅读量 </span> - <span class="leancloud-visitors-count">0</span> - </span> + <span class="post-meta-item-text">文章阅读量</span> + <span class="leancloud-visitors-count">0</span> + </span> {{- end }} <div id="vcomments"></div> <script src="//unpkg.com/valine@latest/dist/Valine.min.js"></script> |