mirror of
https://github.com/mashirozx/sakura.git
synced 2024-11-21 22:38:12 +08:00
Fix share plugin
This commit is contained in:
parent
844d4ae0f8
commit
5394907cfb
28
footer.php
28
footer.php
@ -139,33 +139,5 @@
|
||||
</div>
|
||||
<style>.skin-menu{left:auto;right:10px;}.changeSkin-gear{left:auto;right:5px;}</style>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if (akina_option('adobe_id_1', '')) {
|
||||
$adobe = rand(0,2);
|
||||
switch ($adobe) {
|
||||
case 0:
|
||||
$adobe_id = akina_option('adobe_id_1', '');
|
||||
break;
|
||||
case 1:
|
||||
if (akina_option('adobe_id_2', '')) {
|
||||
$adobe_id = akina_option('adobe_id_2', '');
|
||||
} else {
|
||||
$adobe_id = akina_option('adobe_id_1', '');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (akina_option('adobe_id_3', '')) {
|
||||
$adobe_id = akina_option('adobe_id_3', '');
|
||||
} else {
|
||||
$adobe_id = akina_option('adobe_id_1', '');
|
||||
}
|
||||
}
|
||||
if(!wp_is_mobile()):
|
||||
?>
|
||||
<script src="https://use.typekit.net/<?php echo $adobe_id; ?>.js"></script>
|
||||
<script>try{Typekit.load({ async: true });}catch(e){}</script>
|
||||
<?php
|
||||
endif;
|
||||
} ?>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -169,6 +169,7 @@ add_action( 'after_setup_theme', 'akina_content_width', 0 );
|
||||
* Enqueue scripts and styles.
|
||||
*/
|
||||
function sakura_scripts() {
|
||||
wp_enqueue_script( 'share-js', 'https://cdn.jsdelivr.net/gh/moezx/cdn@3.5.7/js/src/13.social-share.min.js', array(), SAKURA_VERSION, true );
|
||||
if(akina_option('jsdelivr_cdn_test')){
|
||||
wp_enqueue_script( 'js_lab', 'https://pages.shino.cc/cdn/js/lib.js', array(), SAKURA_VERSION, true );
|
||||
} else {
|
||||
|
@ -12,10 +12,12 @@ mashiro_global.variables = new function () {
|
||||
mashiro_global.ini = new function () {
|
||||
this.normalize = function () {
|
||||
lazyload();
|
||||
social_share();
|
||||
mashiro_global.post_list_show_animation.ini();
|
||||
}
|
||||
this.pjax = function () {
|
||||
pjaxInit();
|
||||
social_share();
|
||||
mashiro_global.post_list_show_animation.ini();
|
||||
}
|
||||
}
|
||||
@ -985,7 +987,8 @@ mashiro_global.ini.normalize();
|
||||
loadCSS(mashiro_option.jsdelivr_css_src);
|
||||
loadCSS("https://at.alicdn.com/t/font_679578_qyt5qzzavdo39pb9.css");
|
||||
loadCSS("https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css");
|
||||
loadCSS("https://fonts.googleapis.com/css?family=Noto+SerifMerriweather|Merriweather+Sans|Source+Code+Pro|Ubuntu:400,700");
|
||||
loadCSS("https://fonts.googleapis.com/css?family=Noto+SerifMerriweather|Merriweather+Sans|Source+Code+Pro|Ubuntu:400,700|Noto+Serif+SC");
|
||||
loadCSS("https://cdn.jsdelivr.net/gh/moezx/cdn@3.3.9/css/sharejs.css");
|
||||
(function webpackUniversalModuleDefinition(b, a) {
|
||||
if (typeof exports === "object" && typeof module === "object") {
|
||||
module.exports = a()
|
||||
|
@ -20,12 +20,7 @@
|
||||
<?php } ?>
|
||||
<?php if ( akina_option('post_share') == 'yes') { ?>
|
||||
<div class="post-share">
|
||||
<ul class="sharehidden">
|
||||
<li><a href="http://www.jiathis.com/send/?webid=weixin&url=<?php the_permalink(); ?>&title=<?php the_title(''); ?>" onclick="window.open(this.href, 'renren-share', 'width=490,height=700');return false;" class="s-weixin"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.3.1/img/Sakura/images/sns/wechat.png"/></a></li>
|
||||
<li><a href="http://www.jiathis.com/send/?webid=qzone&url=<?php the_permalink(); ?>&title=<?php the_title(''); ?>" onclick="window.open(this.href, 'weibo-share', 'width=730,height=500');return false;" class="s-qq"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.3.1/img/Sakura/images/sns/qzone.png"/></a></li>
|
||||
<li><a href="http://www.jiathis.com/send/?webid=tsina&url=<?php the_permalink(); ?>&title=<?php the_title(''); ?>" onclick="window.open(this.href, 'weibo-share', 'width=550,height=235');return false;" class="s-sina"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.3.1/img/Sakura/images/sns/sina.png"/></a></li>
|
||||
<li><a href="http://www.jiathis.com/send/?webid=douban&url=<?php the_permalink(); ?>&title=<?php the_title(''); ?>" onclick="window.open(this.href, 'renren-share', 'width=490,height=600');return false;" class="s-douban"><img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.3.1/img/Sakura/images/sns/douban.png"/></a></li>
|
||||
</ul>
|
||||
<div class="social-share sharehidden"></div>
|
||||
<i class="iconfont show-share icon-forward"></i>
|
||||
</div>
|
||||
<?php } ?>
|
@ -714,7 +714,7 @@ function optionsframework_options() {
|
||||
'id' => 'qiniu_cdn',
|
||||
'std' => '',
|
||||
'type' => 'text');
|
||||
|
||||
/*
|
||||
$options[] = array(
|
||||
'name' => __('Adobe Typekit ID 1', 'options_framework_theme'),
|
||||
'desc' => __('加载 Adobe 字体,填写的是 js 文件名,请把<a href="https://typekit.com/fonts/source-han-serif-simplified-chinese">这页</a>七个字体都加入到你的 kit。免费账号有每月 2,5000 PV 的使用限制,可注册多个ID,每次随机选择一个调用,如果访问量没那么高,那么填这里第一个就OK了', 'options_framework_theme'),
|
||||
@ -735,7 +735,7 @@ function optionsframework_options() {
|
||||
'id' => 'adobe_id_3',
|
||||
'std' => '',
|
||||
'type' => 'text');
|
||||
|
||||
*/
|
||||
$options[] = array(
|
||||
'name' => __('开启 jsDelivr 测试?', 'options_framework_theme'),
|
||||
'desc' => __('如不清楚什么意思切勿勾选!', 'options_framework_theme'),
|
||||
|
21
style.css
21
style.css
@ -2072,7 +2072,7 @@ h1.page-title.mb- {
|
||||
.post-share {
|
||||
float: right;
|
||||
list-style: none;
|
||||
margin-right: 20px
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.post-share img:hover {
|
||||
@ -2093,15 +2093,20 @@ h1.page-title.mb- {
|
||||
transition: opacity .4s ease-out
|
||||
}
|
||||
|
||||
.post-share .social-share {
|
||||
opacity: 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.post-share li {
|
||||
float: left;
|
||||
margin-right: 20px
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.post-share li img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
padding: 7px
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
.post-share ul li i {
|
||||
@ -2110,7 +2115,7 @@ h1.page-title.mb- {
|
||||
|
||||
.post-share span {
|
||||
float: left;
|
||||
margin-right: 10px
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.post-share ul li a:hover {
|
||||
@ -2128,10 +2133,10 @@ h1.page-title.mb- {
|
||||
transition: opacity .1s ease-out
|
||||
}
|
||||
|
||||
.post-share:hover .sharehidden,
|
||||
.post-share:hover .show-share {
|
||||
.post-share:hover .show-share,
|
||||
.post-share:hover .sharehidden {
|
||||
opacity: 1;
|
||||
display: inline-block
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.post-squares {
|
||||
@ -8228,7 +8233,7 @@ td.hljs-ln-numbers {
|
||||
}
|
||||
|
||||
.serif {
|
||||
font-family: 'Source Han Serif SC', 'Source Han Serif', source-han-serif-sc, 'PT Serif', 'SongTi SC', 'MicroSoft Yahei', Georgia, serif
|
||||
font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Source Han Serif', source-han-serif-sc, 'PT Serif', 'SongTi SC', 'MicroSoft Yahei', Georgia, serif
|
||||
}
|
||||
|
||||
@media (max-width:860px) {
|
||||
|
Loading…
Reference in New Issue
Block a user