Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新主题,修复bug #180

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ Readmore: 阅读更多
belongsto: 分类于
contents: 文章目录
shareto: 分享到
Hits: 次浏览
Total: 本站共
Visitors: 位来访者
3 changes: 3 additions & 0 deletions layout/_partial/after_footer.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions layout/_partial/comments.jade
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 13 additions & 1 deletion layout/_partial/footer.jade
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion layout/_widget/tag.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
7 changes: 7 additions & 0 deletions layout/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
3 changes: 1 addition & 2 deletions layout/post.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
41 changes: 41 additions & 0 deletions source/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}