hexo-theme-ayer/layout/_partial/post/share.ejs
alleks d67e7b66e4
Some checks failed
continuous-integration/drone/push Build is failing
update
2023-03-19 18:07:20 +03:00

53 lines
2.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%
var sUrl = url.replace(/index\.html$/, '');
sUrl = /^(http:|https:)\/\//.test(sUrl) ? sUrl : 'http:' + sUrl;
%>
<div class="share-btn">
<span class="share-sns share-outer">
<i class="ri-share-forward-line"></i>
<%- theme.share_text %>
</span>
<div class="share-wrap">
<i class="arrow"></i>
<div class="share-icons">
<% if( theme.share_china ){ %>
<a class="weibo share-sns" href="javascript:;" data-type="weibo">
<i class="ri-weibo-fill"></i>
</a>
<a class="weixin share-sns wxFab" href="javascript:;" data-type="weixin">
<i class="ri-wechat-fill"></i>
</a>
<a class="qq share-sns" href="javascript:;" data-type="qq">
<i class="ri-qq-fill"></i>
</a>
<a class="douban share-sns" href="javascript:;" data-type="douban">
<i class="ri-douban-line"></i>
</a>
<!-- <a class="qzone share-sns" href="javascript:;" data-type="qzone">
<i class="icon icon-qzone"></i>
</a> -->
<% } %>
<% if( theme.share_eng ) { %>
<a class="facebook share-sns" href="javascript:;" data-type="facebook">
<i class="ri-facebook-circle-fill"></i>
</a>
<a class="twitter share-sns" href="javascript:;" data-type="twitter">
<i class="ri-twitter-fill"></i>
</a>
<a class="google share-sns" href="javascript:;" data-type="google">
<i class="ri-google-fill"></i>
</a>
<% } %>
</div>
</div>
</div>
<div class="wx-share-modal">
<a class="modal-close" href="javascript:;"><i class="ri-close-circle-line"></i></a>
<p>扫一扫分享到微信</p>
<div class="wx-qrcode">
<img src="<%- 'qrcode' in locals ? qrcode(sUrl) : '//api.qrserver.com/v1/create-qr-code/?size=150x150&data=' + sUrl %>" alt="微信分享二维码">
</div>
</div>
<div id="share-mask"></div>