Merge pull request #507 from weilining/dev

Improvement valine visitor
This commit is contained in:
Jerry Wong 2021-02-22 15:59:15 +08:00 committed by GitHub
commit 2dbf4561bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,23 +53,23 @@
span= min2read(page.content, {cn: 350, en: 160}) + _p('post.min2read_unit') span= min2read(page.content, {cn: 350, en: 160}) + _p('post.min2read_unit')
//- for pv and count //- for pv and count
mixin pvBlock(parent_id,parent_class) mixin pvBlock(parent_id,parent_class,parent_title)
span.post-meta-separator | span.post-meta-separator |
span(class=parent_class id=parent_id) span(class=parent_class id=parent_id data-flag-title=page.title)
i.far.fa-eye.fa-fw.post-meta-icon i.far.fa-eye.fa-fw.post-meta-icon
span.post-meta-label=_p('post.page_pv') + ':' span.post-meta-label=_p('post.page_pv') + ':'
if block if block
block block
if theme.busuanzi.page_pv if theme.busuanzi.page_pv
+pvBlock('','post-meta-pv-cv') +pvBlock('','post-meta-pv-cv','')
span#busuanzi_value_page_pv span#busuanzi_value_page_pv
else if comments.use && !comments.lazyload else if comments.use && !comments.lazyload
if (comments.use.includes('Valine') && theme.valine.visitor) || (comments.use.includes('Waline') && theme.waline.visitor) if (comments.use.includes('Valine') && theme.valine.visitor) || (comments.use.includes('Waline') && theme.waline.visitor)
+pvBlock(url_for(page.path),'leancloud_visitors') +pvBlock(url_for(page.path),'leancloud_visitors',page.title)
span.leancloud-visitors-count span.leancloud-visitors-count
else if (comments.use.includes('Twikoo') && theme.twikoo.visitor) else if (comments.use.includes('Twikoo') && theme.twikoo.visitor)
+pvBlock('','') +pvBlock('','','')
span#twikoo_visitors span#twikoo_visitors
if comments.count && !comments.lazyload && page.comments !== false && comments.use if comments.count && !comments.lazyload && page.comments !== false && comments.use