diff --git a/_config.yml b/_config.yml index cd7d8c21d..7c629e5f9 100644 --- a/_config.yml +++ b/_config.yml @@ -11,6 +11,7 @@ baidu_analytics: ## Your Baidu Analytics tracking id, e.g. 8006843039519956000 show_category_count: false ## If you want to show the count of categories in the sidebar widget please set the value to true. shareto: true ## If you want to use the share button please set the value to true. busuanzi: true ## If you want to use Busuanzi page views please set the value to true. +total_visit_busuanzi: true ## First,you must set busuanzi true, then you can show total count about site views and user views widgets_on_small_screens: false ## Set to true to enable widgets on small screens. menu: diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml index 479825c21..a9cea299f 100644 --- a/languages/zh-CN.yml +++ b/languages/zh-CN.yml @@ -20,3 +20,6 @@ Readmore: 阅读更多 belongsto: 分类于 contents: 文章目录 shareto: 分享到 +Hits: 次浏览 +Total: 本站共 +Visitors: 位来访者 \ No newline at end of file diff --git a/layout/_partial/after_footer.jade b/layout/_partial/after_footer.jade index 6adeef4fa..3230051fc 100644 --- a/layout/_partial/after_footer.jade +++ b/layout/_partial/after_footer.jade @@ -77,3 +77,6 @@ if page.mathjax2 script(type='text/javascript', src=url_for(theme.js) + '/codeblock-resizer.js' + '?v=' + theme.version) script(type='text/javascript', src=url_for(theme.js) + '/smartresize.js' + '?v=' + theme.version) + +if theme.busuanzi == true + script(src='https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js', async) diff --git a/layout/_partial/comments.jade b/layout/_partial/comments.jade index 43d5afe36..1259d60a5 100644 --- a/layout/_partial/comments.jade +++ b/layout/_partial/comments.jade @@ -1,4 +1,5 @@ if theme.duoshuo + #comments .ds-thread(data-thread-key=page.path, data-title=page.title, data-url=page.permalink, data-author-key='1') if theme.disqus diff --git a/layout/_partial/footer.jade b/layout/_partial/footer.jade index 635cadf2c..654b91fbf 100644 --- a/layout/_partial/footer.jade +++ b/layout/_partial/footer.jade @@ -1,4 +1,16 @@ -#footer= '© ' +#footer + if theme.busuanzi == true + if theme.total_visit_busuanzi == true + div + | + span#busuanzi_container_site_pv + span= __('Total')+'(' + span#busuanzi_value_site_pv + span(rel='nofollow')= ')' + __('Hits')+',(' + span#busuanzi_container_site_uv + span#busuanzi_value_site_uv + span(rel='nofollow')= ')' + __('Visitors')+'。' + = '© ' a(href=url_for('.'), rel='nofollow')= config.title + '.' | Powered by a(rel='nofollow', target='_blank', href='https://hexo.io') Hexo. diff --git a/layout/_widget/tag.jade b/layout/_widget/tag.jade index dd44371e8..ab8c7bb62 100644 --- a/layout/_widget/tag.jade +++ b/layout/_widget/tag.jade @@ -2,4 +2,4 @@ .widget-title i(class='fa fa-star-o')= ' ' + __('tags') .tagcloud - != tagcloud({min_font: 15, max_font: 15, amount: 100, orderby: 'count'}) + != tagcloud({min_font: 10, max_font: 25, amount: 100, orderby: 'count'}) diff --git a/layout/index.jade b/layout/index.jade index b7e696bed..ccfbea1d3 100644 --- a/layout/index.jade +++ b/layout/index.jade @@ -15,6 +15,11 @@ block content a(href=url_for(post.path)) +title(post) .post-meta= post.date.format(config.date_format) + if post.categories.length > 0 + span= ' | ' + span.category + for category in post.categories.toArray() + a(href=url_for(category.path))= category.name if theme.duoshuo a.ds-thread-count(data-thread-key=post.path, href=url_for(post.path) + '#comments') if theme.disqus @@ -36,6 +41,8 @@ block content p(class='readmore') a(href=url_for(post.path))= __('Readmore') + hr.hrtest + include _partial/paginator if theme.disqus script(id='dsq-count-scr', src='//#{theme.disqus}.disqus.com/count.js', async) diff --git a/layout/post.jade b/layout/post.jade index 6ff56532f..b6cfb5e68 100644 --- a/layout/post.jade +++ b/layout/post.jade @@ -6,14 +6,13 @@ block title block content .post h1.post-title= page.title - .post-meta= page.date.format('ll') + .post-meta= page.date.format(config.date_format) if page.categories.length > 0 span= ' | ' span.category for category in page.categories.toArray() a(href=url_for(category.path))= category.name if theme.busuanzi == true - script(src='https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js', async) span#busuanzi_container_page_pv= ' | ' span#busuanzi_value_page_pv span= ' ' + __('Hits') diff --git a/source/css/style.scss b/source/css/style.scss index 56f85d633..ddb6e2722 100644 --- a/source/css/style.scss +++ b/source/css/style.scss @@ -1831,3 +1831,44 @@ em.search-keyword { font-style: normal; color: #01579f; } + +code { + padding: 2px 4px; + color: #c7254e; + background: #f9f2f4; + border-radius: 3px; + font-size: 13px; +} + +code, pre { + font-family: consolas,Menlo,"PingFang SC","Microsoft YaHei",monospace; +} + +.ds-thread-title { + margin: 10px 0px !important; +} + +.ds-thread-title a { + color: #01579f; +} + +.hrtest { + height: 1px; + border: none; + border-top: 1px dashed #a99e9e; + width: 80px; + margin: 30px auto; +} + +.readmore { + margin-top: 35px; + text-align: center; +} + +.readmore a { + float: none; +} + +.description { + margin-top: 20px !important; +} \ No newline at end of file