Initial website
This commit is contained in:
52
themes/hueman/layout/share/addtoany.ejs
Normal file
52
themes/hueman/layout/share/addtoany.ejs
Normal file
@@ -0,0 +1,52 @@
|
||||
<div class="a2a_kit a2a_default_style">
|
||||
<a class="a2a_dd" href="https://www.addtoany.com/share">Share</a>
|
||||
<span class="a2a_divider"></span>
|
||||
<a class="a2a_button_facebook"></a>
|
||||
<a class="a2a_button_twitter"></a>
|
||||
<a class="a2a_button_google_plus"></a>
|
||||
<a class="a2a_button_pinterest"></a>
|
||||
<a class="a2a_button_tumblr"></a>
|
||||
</div>
|
||||
<script type="text/javascript" src="//static.addtoany.com/menu/page.js"></script>
|
||||
<style>
|
||||
.a2a_menu {
|
||||
border-radius: 4px;
|
||||
}
|
||||
.a2a_menu a {
|
||||
margin: 2px 0;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
border-radius: 4px;
|
||||
color: inherit !important;
|
||||
font-family: 'Microsoft Yahei';
|
||||
}
|
||||
#a2apage_dropdown {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.a2a_mini_services {
|
||||
padding: 10px;
|
||||
}
|
||||
a.a2a_i,
|
||||
i.a2a_i {
|
||||
width: 122px;
|
||||
line-height: 16px;
|
||||
}
|
||||
a.a2a_i .a2a_svg,
|
||||
a.a2a_more .a2a_svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
vertical-align: top;
|
||||
background-size: 16px;
|
||||
}
|
||||
a.a2a_i {
|
||||
border: none !important;
|
||||
}
|
||||
a.a2a_menu_show_more_less {
|
||||
margin: 0;
|
||||
padding: 10px 0;
|
||||
line-height: 16px;
|
||||
}
|
||||
.a2a_mini_services:after{content:".";display:block;height:0;clear:both;visibility:hidden}
|
||||
.a2a_mini_services{*+height:1%;}
|
||||
</style>
|
34
themes/hueman/layout/share/bdshare.ejs
Normal file
34
themes/hueman/layout/share/bdshare.ejs
Normal file
@@ -0,0 +1,34 @@
|
||||
<div class="bdsharebuttonbox">
|
||||
<a href="#" class="bds_more" data-cmd="more">分享到:</a>
|
||||
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间">QQ空间</a>
|
||||
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博">新浪微博</a>
|
||||
<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博">腾讯微博</a>
|
||||
<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网">人人网</a>
|
||||
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信">微信</a>
|
||||
</div>
|
||||
<script>
|
||||
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{"bdSize":16}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='//bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
|
||||
</script>
|
||||
<style>
|
||||
.bdshare_popup_box {
|
||||
border-radius: 4px;
|
||||
border: #e1e1e1 solid 1px;
|
||||
}
|
||||
.bdshare-button-style0-16 a,
|
||||
.bdshare-button-style0-16 .bds_more {
|
||||
padding-left: 20px;
|
||||
margin: 6px 10px 6px 0;
|
||||
}
|
||||
.bdshare_dialog_list a,
|
||||
.bdshare_popup_list a,
|
||||
.bdshare_popup_bottom a {
|
||||
font-family: 'Microsoft Yahei';
|
||||
}
|
||||
.bdshare_popup_top {
|
||||
display: none;
|
||||
}
|
||||
.bdshare_popup_bottom {
|
||||
height: auto;
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
59
themes/hueman/layout/share/default.ejs
Normal file
59
themes/hueman/layout/share/default.ejs
Normal file
@@ -0,0 +1,59 @@
|
||||
<a data-url="<%- post.permalink %>" data-id="<%= post._id %>" class="article-share-link"><i class="fa fa-share"></i><%=__('article.share')%></a>
|
||||
<script>
|
||||
(function ($) {
|
||||
$('body').on('click', function() {
|
||||
$('.article-share-box.on').removeClass('on');
|
||||
}).on('click', '.article-share-link', function(e) {
|
||||
e.stopPropagation();
|
||||
|
||||
var $this = $(this),
|
||||
url = $this.attr('data-url'),
|
||||
encodedUrl = encodeURIComponent(url),
|
||||
id = 'article-share-box-' + $this.attr('data-id'),
|
||||
offset = $this.offset(),
|
||||
box;
|
||||
|
||||
if ($('#' + id).length) {
|
||||
box = $('#' + id);
|
||||
|
||||
if (box.hasClass('on')){
|
||||
box.removeClass('on');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
var html = [
|
||||
'<div id="' + id + '" class="article-share-box">',
|
||||
'<input class="article-share-input" value="' + url + '">',
|
||||
'<div class="article-share-links">',
|
||||
'<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="article-share-twitter" target="_blank" title="Twitter"></a>',
|
||||
'<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="article-share-facebook" target="_blank" title="Facebook"></a>',
|
||||
'<a href="http://pinterest.com/pin/create/button/?url=' + encodedUrl + '" class="article-share-pinterest" target="_blank" title="Pinterest"></a>',
|
||||
'<a href="https://plus.google.com/share?url=' + encodedUrl + '" class="article-share-google" target="_blank" title="Google+"></a>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join('');
|
||||
|
||||
box = $(html);
|
||||
|
||||
$('body').append(box);
|
||||
}
|
||||
|
||||
$('.article-share-box.on').hide();
|
||||
|
||||
box.css({
|
||||
top: offset.top + 25,
|
||||
left: offset.left
|
||||
}).addClass('on');
|
||||
|
||||
}).on('click', '.article-share-box', function (e) {
|
||||
e.stopPropagation();
|
||||
}).on('click', '.article-share-box-input', function () {
|
||||
$(this).select();
|
||||
}).on('click', '.article-share-box-link', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
12
themes/hueman/layout/share/index.ejs
Normal file
12
themes/hueman/layout/share/index.ejs
Normal file
@@ -0,0 +1,12 @@
|
||||
<% if (theme.share === 'jiathis') { %>
|
||||
<%- partial('jiathis') %>
|
||||
<% } %>
|
||||
<% if (theme.share === 'bdshare') { %>
|
||||
<%- partial('bdshare') %>
|
||||
<% } %>
|
||||
<% if (theme.share === 'addtoany') { %>
|
||||
<%- partial('addtoany') %>
|
||||
<% } %>
|
||||
<% if (!theme.share || theme.share === 'default') { %>
|
||||
<%- partial('default', { post: post }) %>
|
||||
<% } %>
|
50
themes/hueman/layout/share/jiathis.ejs
Normal file
50
themes/hueman/layout/share/jiathis.ejs
Normal file
@@ -0,0 +1,50 @@
|
||||
<div class="jiathis_style">
|
||||
<span class="jiathis_txt">分享到:</span>
|
||||
<a class="jiathis_button_qzone">QQ空间</a>
|
||||
<a class="jiathis_button_tsina">新浪微博</a>
|
||||
<a class="jiathis_button_tqq">腾讯微博</a>
|
||||
<a class="jiathis_button_weixin">微信</a>
|
||||
<a href="//www.jiathis.com/share" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank">更多</a>
|
||||
<a class="jiathis_counter_style"></a>
|
||||
</div>
|
||||
<script type="text/javascript" src="//v3.jiathis.com/code/jia.js" charset="utf-8"></script>
|
||||
<style>
|
||||
.jiathis_style div:first-child:not(.jiadiv_01) {
|
||||
width: auto !important;
|
||||
border: none !important;
|
||||
}
|
||||
.jiathis_style .jiadiv_01 {
|
||||
margin: 10px 0;
|
||||
border-radius: 4px;
|
||||
border: #e1e1e1 solid 1px;
|
||||
}
|
||||
.jiathis_style .jiadiv_01 div:first-child {
|
||||
display: none;
|
||||
}
|
||||
.jiathis_style .jiadiv_02 {
|
||||
padding: 7px 0 !important;
|
||||
}
|
||||
.jiathis_style .jiadiv_02 .jiatitle {
|
||||
width: 85px;
|
||||
border: none;
|
||||
height: auto;
|
||||
margin: 3px 10px;
|
||||
padding: 6px 10px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.jiathis_style .jiadiv_02 .jiatitle:hover {
|
||||
border: none;
|
||||
}
|
||||
.jiathis_style .jiadiv_02 .jiatitle:nth-child(even) {
|
||||
margin-left: 0;
|
||||
}
|
||||
.jiathis_style .jtico:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
.jiathis_style .ckepopBottom,
|
||||
.jiathis_style .centerBottom {
|
||||
width: auto !important;
|
||||
padding: 5px;
|
||||
background: #f7f7f7;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user