Improve the post page view logic.

This commit is contained in:
凡梦星尘 2022-07-05 22:01:48 +08:00
parent fb441cb39e
commit ca709ba909
7 changed files with 16 additions and 19 deletions

View File

@ -114,7 +114,7 @@
height: 0; height: 0;
} }
@if $busuanzi_enable and $busuanzi_post_views { @if $busuanzi_post_views {
#busuanzi_container_page_pv { #busuanzi_container_page_pv {
display: inline-block; display: inline-block;
} }

View File

@ -98,7 +98,6 @@
} }
} }
@if $busuanzi_enable {
.busuanzi-count { .busuanzi-count {
@if $busuanzi_visitors { @if $busuanzi_visitors {
#busuanzi_container_site_uv { #busuanzi_container_site_uv {
@ -111,4 +110,3 @@
} }
} }
} }
}

View File

@ -34,7 +34,6 @@ $footer_vendors_enable : {{ isset $P.footer "vendors" }};
{{ end }} {{ end }}
// Counter // Counter
$busuanzi_enable : {{ $P.busuanzi.enable }};
$busuanzi_visitors : {{ $P.busuanzi.visitors }}; $busuanzi_visitors : {{ $P.busuanzi.visitors }};
$busuanzi_views : {{ $P.busuanzi.views }}; $busuanzi_views : {{ $P.busuanzi.views }};
$busuanzi_post_views : {{ $P.busuanzi.postViews }}; $busuanzi_post_views : {{ $P.busuanzi.postViews }};

View File

@ -753,6 +753,7 @@ params:
# Waline comments system # Waline comments system
# More info seee: https://waline.js.org/ # More info seee: https://waline.js.org/
waline: waline:
pageView: true
placeholder: "请文明发言" placeholder: "请文明发言"
emoji: false emoji: false
imgUploader: false imgUploader: false
@ -859,12 +860,11 @@ params:
# Show Views / Visitors of the website / page with busuanzi. # Show Views / Visitors of the website / page with busuanzi.
# For more information: http://ibruce.info/2015/04/04/busuanzi/ # For more information: http://ibruce.info/2015/04/04/busuanzi/
busuanzi: busuanzi:
enable: true visitors: false
visitors: true
visitorsIcon: fa fa-user visitorsIcon: fa fa-user
views: true views: false
viewsIcon: fa fa-eye viewsIcon: fa fa-eye
postViews: true postViews: false
postViewsIcon: far fa-eye postViewsIcon: far fa-eye
@ -968,7 +968,7 @@ params:
# Use Animate.css to animate everything. # Use Animate.css to animate everything.
# For more information: https://animate.style # For more information: https://animate.style
motion: motion:
enable: false enable: true
async: true async: true
transition: transition:
# All available transition variants: https://theme-next.js.org/animate/ # All available transition variants: https://theme-next.js.org/animate/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -2,10 +2,10 @@
{{- if .Site.Params.leancloudVisitors.enable }} {{- if .Site.Params.leancloudVisitors.enable }}
{{- $pageViewCls = "leancloud-visitors-count" }} {{- $pageViewCls = "leancloud-visitors-count" }}
{{- end }} {{- end }}
{{- if and .Site.Params.waline.enable .Site.Params.waline.pageView }} {{- if .Site.Params.waline.pageView }}
{{- $pageViewCls = "waline-pageview-count" }} {{- $pageViewCls = "waline-pageview-count" }}
{{- end }} {{- end }}
{{- if and .Site.Params.busuanzi.enable .Site.Params.busuanzi.postViews }} {{- if .Site.Params.busuanzi.postViews }}
{{- $pageViewCls = "busuanzi_value_page_pv" }} {{- $pageViewCls = "busuanzi_value_page_pv" }}
{{- end }} {{- end }}
<span class="post-meta-item" title="{{ T "PostViews" }}"> <span class="post-meta-item" title="{{ T "PostViews" }}">