Permalink
Browse files

feat: copy path 地址复制

  • Loading branch information...
MOxFIVE committed Oct 25, 2015
1 parent 94a8be4 commit 8f656e29d2c83016c5a5fc019509f121d0f23fe2
Showing with 32 additions and 6 deletions.
  1. +25 −6 layout/_partial/post/nav.ejs
  2. +7 −0 source/js/clipboard.min.js
@@ -1,12 +1,31 @@
<% 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="访问 <%=theme.author%> 的个人博客"><%=theme.author%></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><i class="fa fa-creative-commons"></i> <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>
<p><span>本文标题:</span><a href="<%- url_for(post.path) %>"><%= post.title %></a></p>
<p><span>文章作者:</span><a href="/" title="访问 <%=theme.author%> 的个人博客"><%=theme.author%></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>
<span class="btn" data-clipboard-text="原文: <%= post.permalink %>  作者: <%=theme.author%>" title="点击复制文章链接">
<i class="fa fa-clipboard"></i>
</span>
</p>
<p><span>许可协议:</span><i class="fa fa-creative-commons"></i> <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>
<script src="/js/clipboard.min.js"></script>
<script> var clipboard = new Clipboard('.btn'); </script>
</div>
<style type="text/css">
.copyright p .btn {
margin-left: 1em;
}
.copyright:hover p .btn::after {
content: "复制"
}
.copyright p .btn:hover {
color: gray;
cursor: pointer;
};
</style>
<% } else { %>
<% } %>

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 8f656e2

Please sign in to comment.