Skip to content

Commit

Permalink
Improvement for #1497
Browse files Browse the repository at this point in the history
  • Loading branch information
iissnan committed Mar 13, 2017
1 parent dc1f7c1 commit 072c1fc
Show file tree
Hide file tree
Showing 19 changed files with 152 additions and 12 deletions.
12 changes: 6 additions & 6 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ authoricon: heart
# Footer `powered-by` and `theme-info` copyright
copyright: true

# Declare license on posts
post_copyright:
enable: false
license: CC BY-NC-SA 3.0 CN
license_url: http://creativecommons.org/licenses/by-nc-sa/3.0/cn/


# Canonical, set a canonical link tag in your hexo, you could use it for your SEO of blog.
# See: https://support.google.com/webmasters/answer/139066
Expand Down Expand Up @@ -248,6 +242,12 @@ post_wordcount:
#qcode: /path/to/your/wechatqcode ex. /uploads/wechat-qcode.jpg
#description: ex. subscribe to my blog by scanning my public wechat account

# Declare license on posts
post_copyright:
enable: false
license: CC BY-NC-SA 3.0 CN
license_url: http://creativecommons.org/licenses/by-nc-sa/3.0/cn/



# ---------------------------------------------------------------
Expand Down
12 changes: 12 additions & 0 deletions languages/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,23 @@ sidebar:
toc: Inhaltsverzeichnis

post:
created: Post created
sticky: Sticky
posted: Veröffentlicht am
modified: Updated at
in: in
read_more: Weiterlesen
untitled: Unbenannt
toc_empty: Dieser Artikel hat kein Inhaltsverzeichnis
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'

page:
totally: Gesamt
Expand Down Expand Up @@ -69,3 +80,4 @@ keep_on: Bleib dran.
symbol:
comma: '. '
period: ', '
colon: ':'
9 changes: 9 additions & 0 deletions languages/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ post:
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'



page:
totally: Totally
Expand Down Expand Up @@ -81,3 +89,4 @@ keep_on: Keep on posting.
symbol:
comma: ', '
period: '. '
colon: ':'
7 changes: 7 additions & 0 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ post:
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'

page:
totally: Totally
Expand Down Expand Up @@ -81,3 +87,4 @@ keep_on: Keep on posting.
symbol:
comma: ', '
period: '. '
colon: ':'
10 changes: 10 additions & 0 deletions languages/fr-FR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ post:
read_more: Lire la suite
untitled: Non titré
toc_empty: This post does not have a Table of Contents
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'

page:
totally: Total
Expand Down Expand Up @@ -69,3 +78,4 @@ keep_on: Et ca ne fait que commencer.
symbol:
comma: ', '
period: '. '
colon: ':'
9 changes: 9 additions & 0 deletions languages/id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ post:
untitled: Tidak ada title
toc_empty: Posting ini tidak memiliki Daftar Isi
visitors: Pengunjung
wordcount: Words count in article
min2read: Reading time
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'

page:
totally: Total
Expand Down Expand Up @@ -70,3 +78,4 @@ keep_on: Terus Posting.
symbol:
comma: ', '
period: '. '
colon: ':'
10 changes: 10 additions & 0 deletions languages/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ post:
read_more: 続きを読む
untitled: 無題
toc_empty: 見出しがありません
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'

page:
totally: 全ページ
Expand Down Expand Up @@ -69,3 +78,4 @@ keep_on: もっと書こう!
symbol:
comma: ', '
period: '. '
colon: ':'
9 changes: 9 additions & 0 deletions languages/ko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ post:
untitled: 제목 없음
toc_empty: 목차 없음
visitors: 방문객
wordcount: Words count in article
min2read: Reading time
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'

page:
totally: 모두
Expand Down Expand Up @@ -70,3 +78,4 @@ keep_on: 포스트를 마저 작성하세요
symbol:
comma: ', '
period: '. '
colon: ':'
9 changes: 9 additions & 0 deletions languages/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ post:
untitled: Sem título
toc_empty: Este post não possui tabela de conteúdo
visitors: Visitantes
wordcount: Words count in article
min2read: Reading time
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'

page:
totally: Totalmente
Expand Down Expand Up @@ -70,3 +78,4 @@ keep_on: Continuar no post.
symbol:
comma: '. '
period: ', '
colon: ':'
10 changes: 10 additions & 0 deletions languages/pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ post:
read_more: Ler mais
untitled: Sem título
toc_empty: Esta publicação não possui uma tabela de conteúdo
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'

page:
totally: Totalmente
Expand Down Expand Up @@ -69,3 +78,4 @@ keep_on: Mantenha-se publicando!
symbol:
comma: ', '
period: '. '
colon: ':'
7 changes: 7 additions & 0 deletions languages/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ post:
visitors: Просмотров
wordcount: Кол-во слов в статье
min2read: Время чтения в минутах
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'

page:
totally: Всего
Expand Down Expand Up @@ -89,3 +95,4 @@ keep_on: Продолжаю писать.
symbol:
comma: ', '
period: '. '
colon: ':'
7 changes: 7 additions & 0 deletions languages/zh-Hans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ post:
visitors: 阅读次数
wordcount: 字数统计
min2read: 阅读时长
copyright:
author: 本文作者
link: 本文链接
license_title: 版权声明
license_content: '本博客所有文章除特别声明外,均采用
<a href="%s" rel="external nofollow" target="_blank">%s</a> 许可协议。转载请注明出处!'

page:
totally: 共有
Expand Down Expand Up @@ -80,3 +86,4 @@ keep_on: 继续努力。
symbol:
comma: ''
period: ''
colon: ''
7 changes: 7 additions & 0 deletions languages/zh-hk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ post:
visitors: 閱讀次數
wordcount: 字數統計
min2read: 閱讀時長
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'

page:
totally: 共有
Expand Down Expand Up @@ -80,3 +86,4 @@ keep_on: 繼續努力。
symbol:
comma: ''
period: ''
colon: ''
7 changes: 7 additions & 0 deletions languages/zh-tw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ post:
visitors: 閱讀次數
wordcount: 字數統計
min2read: 閱讀時長
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
<a href="%s" rel="external nofollow" target="_blank">%s</a> unless stating additionally.'

page:
totally: 共有
Expand Down Expand Up @@ -80,3 +86,4 @@ keep_on: 繼續努力。
symbol:
comma: ''
period: ''
colon: ''
19 changes: 14 additions & 5 deletions layout/_macro/post-copyright.swig
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{% if theme.post_copyright.enable %}
<div style="background-color: #f9f9f9; margin-top: 2em; border-left:3px solid #ff1700; padding:.5em 1em;">
<strong>本文链接:</strong> <a href="{{ config.url }}{{ url_for(path) }}" title="{{ title }}">{{ config.url }}{{ url_for(path) }}</a>
<br>
<strong>版权声明:</strong>本博客所有文章除特别声明外,均采用<a href="{{ theme.post_copyright.license_url }}" rel="external nofollow" target="_blank">{{ theme.post_copyright.license }}</a>许可协议。转载请注明出处!<br>
</div>
<ul class="post-copyright">
<li class="post-copyright-author">
<strong>{{ __('post.copyright.author') + __('symbol.colon') }}</strong>
{{ config.author }}
</li>
<li class="post-copyright-link">
<strong>{{ __('post.copyright.link') + __('symbol.colon') }}</strong>
<a href="{{ post.permalink }}" title="{{ post.title }}">{{ post.permalink }}</a>
</li>
<li class="post-copyright-license">
<strong>{{ __('post.copyright.license_title') + __('symbol.colon') }} </strong>
{{ __('post.copyright.license_content', theme.post_copyright.license_url, theme.post_copyright.license) }}
</li>
</ul>
{% endif %}
2 changes: 1 addition & 1 deletion layout/_macro/post.swig
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@

<div>
{% if not is_index %}
{% include 'post-copyright.swig' %}
{% include 'post-copyright.swig' with { post: post } %}
{% endif %}
</div>

Expand Down
7 changes: 7 additions & 0 deletions source/css/_common/components/post/post-copyright.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.post-copyright {
margin: $post-copyright.margin;
padding: $post-copyright.padding;
border-left: $post-copyright.border.width $post-copyright.border.style $post-copyright.border.color;
background-color: $post-copyright.bg;
list-style: none;
}
1 change: 1 addition & 0 deletions source/css/_common/components/post/post.styl
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@
@import "post-eof";
@import "post-gallery";
@import "post-reward" if hexo-config('alipay') or hexo-config('wechatpay');
@import "post-copyright.styl" if hexo-config('post_copyright.enable')
10 changes: 10 additions & 0 deletions source/css/_variables/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,16 @@ $menu-link-hover-border = $black-deep
// Posts Expand
// --------------------------------------------------
$posts-expand-title-font-weight = $font-weight-normal
$post-copyright = {
margin: 2em 0 0,
padding: .5em 1em,
bg: #f9f9f9,
border: {
width: 3px,
style: solid,
color: #ff1700
}
}


// Posts Collpase
Expand Down

0 comments on commit 072c1fc

Please sign in to comment.