feat: Copyright

This commit is contained in:
shenyu 2020-02-07 12:42:33 +08:00
parent ad93a588f7
commit 14f1f432c9
7 changed files with 56 additions and 10 deletions

View File

@ -141,6 +141,10 @@ alipay: /images/alipay.jpg
# qrcode image path # qrcode image path
weixin: /images/wechat.jpg weixin: /images/wechat.jpg
# Copyright
# type0-close all 1-only display in article which you have configured copyright: true 2-all articles
copyright_type: 2
# Search # Search
search: true search: true

View File

@ -77,6 +77,10 @@ alipay: /images/alipay.jpg
# 微信二维码图片地址 # 微信二维码图片地址
weixin: /images/wechat.jpg weixin: /images/wechat.jpg
# 版权声明
# 版权声明type设定0-关闭版权声明; 1-文章对应的md文件里有copyright: true属性才有版权声明 2-所有文章均有版权声明
copyright_type: 2
# 是否启用搜索 # 是否启用搜索
search: true search: true
@ -110,7 +114,7 @@ gitalk:
# GitHub Ribbons(https://github.blog/2008-12-19-github-ribbons/) # GitHub Ribbons(https://github.blog/2008-12-19-github-ribbons/)
github: github:
# (关闭请设置为false) # (关闭请设置为false)
url: https://github.com/Shen-Yu/hexo-theme-ayer url: false
# fancybox(仅用于相册展示若需要可配置albums) # fancybox(仅用于相册展示若需要可配置albums)
fancybox: true fancybox: true

View File

@ -33,18 +33,32 @@
<% } else { %> <% } else { %>
<%- post.content %> <%- post.content %>
<% } %> <% } %>
<!-- 打赏 --> <!-- reward -->
<% if ((theme.reward_type === 2 || (theme.reward_type === 1 && post.reward)) && !index && !post.no_reward){ %> <% if ((theme.reward_type === 2 || (theme.reward_type === 1 && post.reward)) && !index && !post.no_reward){ %>
<div id="reward-btn"> <div id="reward-btn">
打赏 打赏
</div> </div>
<% } %> <% } %>
</div> </div>
<!-- copyright -->
<% if (((theme.copyright_type === 2) || (theme.copyright_type === 1 && post.copyright)) && !index){ %>
<div class="declare">
<ul class="post-copyright">
<li>
<i class="ri-copyright-line"></i>
<strong>版权声明: </strong s>
本博客所有文章除特别声明外,均采用 <a href="https://www.apache.org/licenses/LICENSE-2.0.html" rel="external nofollow"
target="_blank">Apache License 2.0</a> 许可协议。转载请注明出处!
</li>
</ul>
</div>
<% } %>
<footer class="article-footer"> <footer class="article-footer">
<% if (!index && theme.share_enable){ %> <% if (!index && theme.share_enable){ %>
<%- partial('post/share') %> <%- partial('post/share') %>
<% } %> <% } %>
<%- partial('post/tag') %> <%- partial('post/tag') %>
</footer> </footer>
</div> </div>

View File

@ -8,6 +8,7 @@
<%- theme.share_text %> <%- theme.share_text %>
</span> </span>
<div class="share-wrap"> <div class="share-wrap">
<i class="arrow"></i>
<div class="share-icons"> <div class="share-icons">
<% if( theme.share_china ){ %> <% if( theme.share_china ){ %>
<a class="weibo share-sns" href="javascript:;" data-type="weibo"> <a class="weibo share-sns" href="javascript:;" data-type="weibo">

View File

@ -104,7 +104,15 @@
.article-footer .article-footer
clearfix() clearfix()
margin-top 3rem
.declare
margin 0 0 1rem
padding-bottom 1rem
border-bottom 1px solid #eee
ul
list-style none
li
list-style none
// Tags // Tags
.article-tag-list .article-tag-list
@ -151,8 +159,8 @@
.article-nav .article-nav
clearfix() clearfix()
position relative position relative
padding-top 3rem padding-top 1.5rem
margin-top 5rem margin 1rem 0 2rem
border-top border-width border-color solid border-top border-width border-color solid
.article-nav-link .article-nav-link

View File

@ -3,7 +3,7 @@
display inline-block display inline-block
height 36px height 36px
line-height 36px line-height 36px
margin-top 3rem margin 60px 0
padding 0 20px padding 0 20px
font-size 18px font-size 18px
color #fff color #fff

View File

@ -1,10 +1,24 @@
.share-wrap { .share-wrap {
min-height: 20px; min-height: 20px;
display: none; display: none;
position: absolute; position: relative;
z-index: 1;
right: 0; right: 0;
bottom: -32px; bottom: 0;
width: 250px; width: 250px;
background-color #f5f5f5;
border-radius: 2px;
.arrow {
position: absolute;
z-index: -1;
top: -3px;
right:20px;
display: block;
width 10px;
height 10px;
transform: rotate(45deg);
background-color #f5f5f5;
}
} }
.share-btn { .share-btn {
@ -12,7 +26,8 @@
position: relative; position: relative;
} }
.share-outer { .share-outer {
display inline-flex; display: flex;
justify-content: flex-end;
border: none; border: none;
text-shadow: none; text-shadow: none;
text-decoration: none; text-decoration: none;
@ -28,7 +43,7 @@
transform: none; transform: none;
cursor: pointer; cursor: pointer;
} }
} }
.share-icons { .share-icons {
display: flex; display: flex;