未优化之前友链的图片是方方正正的,不太好看,优化一下之后顺眼很多
/*友链头像圆角*/
/*by:乐乐资源 - www.llsns.com*/
.link-only-img img{border-radius: var(--main-radius);}
.link-img img{border-radius: var(--main-radius);}
效果演示:

社长已经添加判断代码,添加之后只会在首页显示,其他页面不显示
1.将下面的 PHP 代码加入到主题目录下:themes/zibll/footer.php 文件中。
有两个版本,一个是精简代码版,一个是全 js 代码版,都是一样的,只不过社长有强迫症,代码太多看的很累
<!-- 进入网站提醒来源地址和问候语客户端信息开始精简版 -->
<?php if (is_home ()) : ?>
<div id="fps" style="z-index:5;position:fixed;bottom:3px;left:3px;color:#2196F3;font-size:10px;">
</div>
<script type="text/javascript" src="https://98dou-cn.vercel.app/jsheji/fangwentishi/fetch.min.js">
</script>
<script src="https://cdn.gmit.vip/layer/3.1.1/layer.js" type="text/javascript"
charset="utf-8">
</script>
<script src="https://98dou-cn.vercel.app/jsheji/fangwentishi/ts.js" type="text/javascript"
charset="utf-8">
</script>
<?php endif; ?>
<!--by:乐乐资源 - www.llsns.com-->
<!-- 进入网站提醒来源地址和问候语客户端信息开始 -->
<!-- 进入网站提醒来源地址和问候语客户端信息开始代码版 -->
<?php if (is_home ()) : ?>
<div id="fps" style="z-index:5;position:fixed;bottom:3px;left:3px;color:#2196F3;font-size:10px;">
</div>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/kaliisra/myblogstatic/kehuduan-js/fetch.min.js">
</script>
<script src="https://cdn.gmit.vip/layer/3.1.1/layer.js" type="text/javascript"
charset="utf-8">
</script>
<script>
/*网站打开提醒代码开始*/
$(function() {
if (
/*getCookie('msg') !=*/
1) {
var t = document.createElement("a");
t.href = document.referrer;
var msgTitle = t.hostname;
var name = t.hostname.split(".")[1];
if ("" !== document.referrer) {
switch (name) {
case 'bing':
msgTitle = '必应搜索';
break;
case 'baidu':
msgTitle = '百度搜索';
break;
case 'so':
msgTitle = '360 搜索';
break;
case 'google':
msgTitle = '谷歌搜索';
break;
case 'sm':
msgTitle = '神马搜索';
break;
case 'sogou':
msgTitle = '搜狗搜索';
break;
default:
msgTitle = t.hostname;
};
};
var time = (new Date).getHours();
var msg = '';
23 < time || time <= 5 ? msg = "你是夜猫子呀?这么晚还不睡觉,明天起的来嘛?": 5 < time && time <= 7 ? msg = "早上好!一日之计在于晨,美好的一天就要开始了!": 7 < time && time <= 11 ? msg = "上午好!工作顺利嘛,不要久坐,多起来走动走动哦!": 11 < time && time <= 14 ? msg = "中午了,工作了一个上午,现在是午餐时间!": 14 < time && time <= 17 ? msg = "午后很容易犯困呢,今天的运动目标完成了吗?": 17 < time && time <= 19 ? msg = "傍晚了!窗外夕阳的景色很美丽呢,最美不过夕阳红~": 19 < time && time <= 21 ? msg = "晚上好,今天过得怎么样?": 21 < time && time <= 23 && (msg = "已经这么晚了呀,早点休息吧,晚安~");
$.ajax({
type: "get",
url: "https://api.gmit.vip/Api/UserInfo/",
async: true,
success: function(data) {
window.info = data;
layer.msg("Hi~ 来自" + data.data.location + '~<br/>通过 ' + msgTitle + ' 进来的朋友!<br/>使用 ' + data.data.os + "<br/>" + data.data.browser + ' 访问本站!' + '<br/>' + msg);
var showFPS = (function() {
var requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ||
function(callback) {
window.setTimeout(callback, 1000 / 60);
};
var e, pe, pid, fps, last, offset, step, appendFps;
fps = 0;
last = Date.now();
step = function() {
offset = Date.now() - last;
fps += 1;
if (offset >= 1000) {
last += offset;
appendFps(fps);
fps = 0;
};
requestAnimationFrame(step);
};
appendFps = function(fps) {
var settings = {
timeout: 5000,
logError: true
};
//$('#fps').html('<span style="float:left;">' + fps + 'FPS</span><br/><span style="float:left">' + window.info.data.os + '</span><br/><span style="float:left;margin-top:1px;">' + window.info.data.browser + '</span><br/><span style="float:left;margin-top:1px;">' + window.info.data.location + '</span><br/><span style="float:left;margin-top:1px;"></span>');
};
step();
})();
}
});
};
});
</script>
<?php endif; ?>
<!--by:乐乐资源 - www.llsns.com-->
<!-- 进入网站提醒来源地址和问候语客户端信息开始 -->
效果预览:

此功能暂不支持子比主题 6.0 以上版本,因我还未更新主题,后期更新之后修改
1.将下面的 PHP 代码加入到主题目录下:
/* 百度收录查询-乐乐博客子比主题美化版开始 */
function baidu_check($url){
global $wpdb;
$post_id = ( null === $post_id ) ? get_the_ID() : $post_id;
$baidu_record = get_post_meta($post_id,'baidu_record',true);
if( $baidu_record != 1){
$url='http://www.baidu.com/s?wd='.$url;
$curl=curl_init();
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
$rs=curl_exec($curl);
curl_close($curl);
if(!strpos($rs,'没有找到')){
if( $baidu_record == 0){
update_post_meta($post_id, 'baidu_record', 1);
} else {
add_post_meta($post_id, 'baidu_record', 1, true);
}
return 1;
} else {
if( $baidu_record == false){
add_post_meta($post_id, 'baidu_record', 0, true);
}
return 0;
}
} else {
return 1;
}
}
function baidu_record() {
if(baidu_check(get_permalink()) == 1) {
echo '<a target="_blank" title="点击查看" rel="external nofollow" href="http://www.baidu.com/s?wd='.get_the_title().'-乐乐博客"><span class="but c-yellow"><i class="fa fa-paw" aria-hidden="true"></i>百度已收录</span></a>';
} else {
echo '<a style="color:red;" rel="external nofollow" title="一键帮忙提交给百度,谢谢您!" target="_blank" href="http://zhanzhang.baidu.com/sitesubmit/index?sitename='.get_permalink().'"><span class="but c-grey"><svg class="icon" aria-hidden="true"><use xlink:href="#io-baidu1"></use></svg>百度未收录</span></a>';
}
}
/* 百度收录查询-乐乐博客子比<a target="_blank" href="https://www.llsns.com/tag/100/" title="View all posts in 主题美化">主题美化</a>版结束 */
2.最重要一步
将下面的 PHP 代码加入到主题目录下:
找不到的直接搜索私信字符-如下图
<!--百度检测收录按钮命令-乐乐博客-->
<?php echo ' '; baidu_record(); ?>
<!--百度检测收录按钮命令-乐乐博客-->

效果演示:

此教程是一位朋友在群内提出的,因为子比主题默认的是下图这个样式,不太好看,因此给大家共勉一下直接上教程

1、首先在子比主题后台->自定义代码->
<!--乐乐博客阿里图标库-->
<script src="//at.alicdn.com/t/font_2820512_sco5ucv703.js"></script>
<!--觅知乐乐阿里图标库-->
2、在后台 -> 外观 -> 小工具 -> Zibll 链接列表(新版) -> 选择你需要放的位置社长是放在 首页-底部全宽度
3、然后在下图的 -> 标题右侧按钮文案 这里添加以下代码,注意要勾选上(显示框架盒子)
美化效果:

美化效果:

39、无需插件给网站添加一个永久的 HTML5 悬浮音乐播放器
子比主题设置—>自定义代码—>自定义 CSS 样式:,添加以下 CSS 代码:
/*评论背景图*/
textarea#comment {background-color:transparent;background:linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05)),url(https://imgsa.baidu.com/forum/pic/item/d439b6003af33a871f7e3f0e9b5c10385343b597.jpg) right 10px bottom 10px no-repeat;-moz-transition:ease-in-out 0.45s;-webkit-transition:ease-in-out 0.45s;-o-transition:ease-in-out 0.45s;-ms-transition:ease-in-out 0.45s;transition:ease-in-out 0.45s;}
textarea#comment:focus {background-position-y:789px;-moz-transition:ease-in-out 0.45s;-webkit-transition:ease-in-out 0.45s;-o-transition:ease-in-out 0.45s;-ms-transition:ease-in-out 0.45s;transition:ease-in-out 0.45s;}
/*评论背景图*/
添加效果:

© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
- 最新
- 最热
只看作者