核心函数代码
- 在子比主题的主题目录下,
header.php 底部添加以下函数代码:
HTML页面展示代码
- HTML+JS代码,外观-小工具-自定义HTML-首页底部全宽度。
<div id="wiiuii-info-wg-mian">
<div class="wiiuii-info-item">
<div class="wiiuii-yxsj-item">
<i class="fa fa-hourglass-half" aria-hidden="true"></i>
<span class="wiiuii-i-num"
><script type="text/javascript">
document.write(tj_wdyx);
</script></span
>
<p>运行时间</p>
</div>
<div class="wiiuii-yhzs-item">
<i class="fa fa-user-circle" aria-hidden="true"></i>
<span class="wiiuii-i-num"
><script type="text/javascript">
document.write(tj_jstext);
</script></span
>
<p>用户总数</p>
</div>
<div class="wiiuii-llzs-item">
<i class="fa fa-eye" aria-hidden="true"></i>
<span class="wiiuii-i-num"
><script type="text/javascript">
document.write(tj_view);
</script></span
>
<p>浏览总数</p>
</div>
<div class="wiiuii-wz-item">
<div class="wiiuii-wz-sty wiiuii-wzzs-item">
<i class="fa fa-file-text" aria-hidden="true"></i>
<span class="wiiuii-i-num"
><script type="text/javascript">
document.write(tj_rzzs);
</script></span
>
<p>文章总数</p>
</div>
<div class="wiiuii-wz-sty wiiuii-jrfb-item">
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
<span class="wiiuii-i-num"
><script type="text/javascript">
document.write(tj_24h);
</script></span
>
<p>今日发布</p>
</div>
</div>
<div class="wiiuii-sjcs-item">
<div class="wiiuii-sjcj-m">
<span style="font-size: 30px">今日</span>
<div id="wiiuii-date-text"></div>
<div id="wiiuii-week-text"></div>
<div class="wiiuii-meo-item">
<img id="wiiuii-meos" src="https://img.wiiuii.cn/emo/expression-1.png" alt="emo" />
</div>
<div class="wiiuii-sjcj-content">
<span id="wiiuii-fatalism"></span>
</div>
</div>
</div>
</div>
</div>
<script>
$(function () {
var myDate = new Date();
var year = myDate.getFullYear(); //获取当前年
var mon = myDate.getMonth() + 1; //获取当前月
var date = myDate.getDate(); //获取当前日
var week = myDate.getDay();
var weeks = [
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六"
];
$("#wiiuii-date-text").html(year + "年" + mon + "月" + date + "日");
$("#wiiuii-week-text").html(weeks[week]);
if (week > 0 && week < 5) {
$("#wiiuii-fatalism").html("再坚持" + (5 - week) + "天就到周末啦!");
} else if (week === 5) {
$("#wiiuii-fatalism").html("啊啊啊,明天就是周末啦!");
} else {
$("#wiiuii-fatalism").html("今天是周末,好好休息一下吧!");
}
$("#wiiuii-meos").attr(
"src","https://img.wiiuii.cn/emo/expression-" + week + ".png"
);
});
$("#wiiuii-info-wg-mian").parents(".zib-widget").css({
padding: "0",
background: "none"
});
</script>
CSS样式代码
- CSS底部全宽度统计样式代码样式代码:主题后台-自定义CSS
🎉 恭喜你发现了宝藏!>>点此前往<<
👋 感谢您的观看,对您有用就分享出去吧 !
如您有好的资源/素材,可参与创作者激励计划享投稿分成。分成介绍 投稿成功收录,即可获得1-10 元/篇奖励。(重复内容无奖励)
本站代码模板仅供学习交流使用请勿商业运营,严禁从事违法,侵权等任何非法活动,否则后果自负!
© 版权声明
THE END
文章不错?点个赞呗
相关推荐
随机看看好帖需要善于发现
热门圈子总有聊不完的话题
- 最新
- 最热
只看作者