Permalink
Browse files

feat: copyright info 文末添加版权等信息

Add a division to show copyright info at the bottom of article
automatically.
Hide the copyright info via putting “original: false” to post’s
front-matter.

Closes #13
  • Loading branch information...
MOxFIVE committed Sep 21, 2015
1 parent af1cb85 commit 79b0f4419adb908924f674b3626ad433aabf329a
@@ -1,3 +1,16 @@
<% if (post.original != false){ %>
<div class="copyright">
<p><span>本文标题:</span><a href="<%- url_for(post.path) %>"><%= post.title %></a></p>
<p><span>文章作者:</span><a href="/" title="访问 MOxFIVE 的个人博客">MOxFIVE</a></p>
<p><span>发布时间:</span><%= post.date.format("YYYY年M月D日 - hh时mm分") %></p>
<p><span>最后更新:</span><%= post.updated.format("YYYY年M月D日 - hh时mm分") %></p>
<p><span>原始链接:</span><a href="<%- url_for(post.path) %>" title="<%= post.title %>"><%= post.permalink %></a></p>
<p><span>许可协议:</span><a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/cn/" title="中国大陆 (CC BY-NC-SA 3.0 CN)">"署名-非商用-相同方式共享 3.0"</a> 转载请保留以上信息。</p>
</div>
<% } else { %>
<% } %>
<% if (post.prev || post.next){ %>
<nav id="article-nav">
<% if (post.prev){ %>
@@ -549,4 +549,25 @@ li:hover {
&::before, &::after {
content: none;
};
}
.copyright {
font-size: .93em;
line-height: 1.6em;
margin: 0px 24px;
padding: .5em 2em;
border: 1px solid lightgray;
span {
color: #B5B5B5;
font-weight: bold;
margin-right: 1em;
}
a {
color: gray;
&:hover {
font-weight: bold;
color: #a3d2a3;
text-decoration: underline;
};
}
}
@@ -319,4 +319,9 @@
color: none;
opacity: 1;
}
}
.copyright {
margin: 0 0.5em;
padding: .5em 1.3em;
}

0 comments on commit 79b0f44

Please sign in to comment.