🎨 Improved page & comment counter, Close #74.
This commit is contained in:
@@ -22,21 +22,19 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $.IsHome }} </h2> {{ else }} </h1> {{ end }}
|
||||
{{ $isComment := and (.Scratch.Get "isComment") .Site.Params.waline.comment }}
|
||||
{{ $comments := .Site.Params.postMeta.comments.enable }}
|
||||
<div class="post-meta-container">
|
||||
<div class="post-meta-items">
|
||||
{{ partial "post/header_meta/created_date.html" . }}
|
||||
{{ partial "post/header_meta/update_date.html" . }}
|
||||
{{ partial "post/header_meta/categories.html" . }}
|
||||
{{ if and $.IsHome (not (isset .Params "extlink")) }}
|
||||
<div class="post-meta-items">
|
||||
{{ if .Site.Params.waline.pageView }}
|
||||
{{ if and .Site.Params.postMeta.views.enable (ne .Site.Params.postMeta.views.plugin "busuanzi") }}
|
||||
{{ partial "post/header_meta/views.html" . }}
|
||||
{{ end }}
|
||||
{{ if $isComment }}
|
||||
{{ if $comments }}
|
||||
{{ partial "post/header_meta/comments.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if not $.IsHome }}
|
||||
@@ -44,7 +42,7 @@
|
||||
{{ partial "post/header_meta/words.html" . }}
|
||||
{{ partial "post/header_meta/readtime.html" . }}
|
||||
{{ partial "post/header_meta/views.html" . }}
|
||||
{{ if $isComment }}
|
||||
{{ if $comments }}
|
||||
{{ partial "post/header_meta/comments.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<span class="post-meta-item-text" title="{{ T "PostMeta.comments" }}">
|
||||
{{ print (T "PostMeta.comments") (T "Symbol.colon") }}
|
||||
</span>
|
||||
<span {{ with .Site.Params.waline.comment }}class="waline-comment-count"{{end}} data-path="{{ .RelPermalink | relLangURL }}">
|
||||
<span {{ if and .Site.Params.postMeta.comments.enable (eq .Site.Params.postMeta.comments.plugin "waline") }}class="waline-comment-count"{{end}} data-path="{{ .RelPermalink | relLangURL }}">
|
||||
<i class="fa fa-sync fa-spin"></i>
|
||||
</span>
|
||||
</span>
|
||||
@@ -1,8 +1,8 @@
|
||||
{{ if .Site.Params.postMeta.views.enable }}
|
||||
{{ $pageViewId := "" }}
|
||||
{{ if .Site.Params.leancloudVisitors.enable }}
|
||||
{{ if eq .Site.Params.postMeta.views.plugin "leancloud" }}
|
||||
{{ $pageViewId = "leancloud-visitors-count" }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.analytics.busuanzi.postViews }}
|
||||
{{ else if eq .Site.Params.postMeta.views.plugin "busuanzi" }}
|
||||
{{ $pageViewId = "busuanzi_value_page_pv" }}
|
||||
{{ end }}
|
||||
<span class="post-meta-item" title="{{ T "PostMeta.views" }}">
|
||||
@@ -12,7 +12,8 @@
|
||||
<span class="post-meta-item-text">
|
||||
{{ print (T "PostMeta.views") (T "Symbol.colon") }}
|
||||
</span>
|
||||
<span {{ with $pageViewId }}id="{{ . }}"{{end}} {{ with .Site.Params.waline.pageView }}class="waline-pageview-count"{{end}} data-path="{{ .RelPermalink | relLangURL }}">
|
||||
<span {{ with $pageViewId }}id="{{ . }}"{{end}} {{ if eq .Site.Params.postMeta.views.plugin "waline" }}class="waline-pageview-count"{{end}} data-path="{{ .RelPermalink | relLangURL }}">
|
||||
<i class="fa fa-sync fa-spin"></i>
|
||||
</span>
|
||||
</span>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user