图片展示
操作教程
在子比主题的主题目录下,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
/*底部全宽度统计样式代码*/
.wiiuii-info-item{display:grid;grid-gap:15px;grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(2,1fr);width:100%;height:280px}
.wiiuii-llzs-item,.wiiuii-sjcs-item,.wiiuii-yhzs-item,.wiiuii-yxsj-item{width:100%;height:100%;border-radius:8px;text-align:center;box-shadow:0 2px 4px 0 rgba(0,0%,0%,5%);background-color:var(--main-bg-color);overflow:hidden;padding:5px;box-sizing:border-box}
.wiiuii-i-num{font-size:30px;font-weight:700}
.wiiuii-yxsj-item{display:flex;align-items:center;justify-content:center;flex-direction:column}
.wiiuii-yhzs-item{display:flex;align-items:center;justify-content:center;flex-direction:column}
.wiiuii-llzs-item{display:flex;align-items:center;justify-content:center;flex-direction:column}
.wiiuii-wz-item{display:grid;grid-gap:20px;grid-template-columns:repeat(2,1fr);grid-column:1/4;grid-row:1/2;overflow:unset!important;box-shadow:none!important;padding:0!important}
.wiiuii-wz-sty{width:100%;height:100%;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-direction:column;background-color:var(--main-bg-color);box-shadow:0 2px 4px 0 rgba(0,0%,0%,5%)}
.wiiuii-sjcs-item{grid-row:1/3;grid-column:4/6}
.wiiuii-sjcj-m{position:relative;font-size:20px;font-weight:700;text-align:left;width:100%;height:100%;padding:10px;box-sizing:border-box}
.wiiuii-sjcj-content{text-align:center;margin-top:10px}
.wiiuii-meo-item{width:100px;height:100px;margin:0 auto}
.wiiuii-meo-item>img{width:100%;height:100%;background-size:cover;background-repeat:no-repeat;background-position:center center;cursor:pointer}
@media screen and (max-width:959px){.wiiuii-info-item{grid-gap:10px;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(4,1fr);height:500px}
.wiiuii-sjcs-item{grid-row:3/5;grid-column:1/4}
.wiiuii-i-num{font-size:20px}
.wiiuii-sjcj-m{font-size:16px}
}