好久不见之网站底部样式

好久不见之网站底部样式

罗小黑
2021-08-05 / 101 评论 / 2,300 阅读 / 正在检测是否收录...
广告
温馨提示:
本文最后更新于2021年11月03日,已超过876天没有更新,若内容或图片失效,请留言反馈。

好久不见之本站同款网站底部样式,效果见本站。

Test

1.修改footer.php首先,在页脚文件footer.php文件的最下面放入以下代码:

2.修改include.php

新增CSS样式,在/usr/themes/Joe/public/include.php的19-29行之间新增如下代码:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/cy-j/chenyu@1.6.0/css/cydibu.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/cy-j/chenyu/css/bootstrap-grid.min.css">

ks37axfn.png

3.备注

风风雨雨1年266天3小时23分,你是第45,355位相遇的小伙伴……这里的实现看这里:
在core.php最下面添加

//门前大路上,走过一群小伙伴,快来数一数:2,4,6,7,8……
    function theAllViews()
        {
            $db = Typecho_Db::get();
            $row = $db->fetchAll('SELECT SUM(VIEWS) FROM `typecho_contents`');
                echo number_format($row[0]['SUM(VIEWS)']);
        }

4.Joe主题

Joe主题开启显示建站时间后,并配置好“网站访问量暨与小伙伴们的N次相遇”小伙伴。

<p><a href="javascript:;" id="chenyutime">风风雨雨N年,你是第N位相遇的小伙伴</a></p>

修改为:

              <p><?php if ($this->options->JBirthDay) : ?>
            <div class="item run">
                <span>风风雨雨 <strong class="joe_run__day">00</strong> 天 <strong class="joe_run__hour">00</strong> 时 <strong class="joe_run__minute">00</strong> 分,你是第<?php echo theAllViews();?>位相遇的小伙伴</span>
            </div>
        <?php endif; ?> </p>

修改好后,请删除原有的建站时间显示(第六行到第十行),不然会重复显示。

            <?php if ($this->options->JBirthDay) : ?>
            <div class="item run">
                <span>已运行 <strong class="joe_run__day">00</strong> 天 <strong class="joe_run__hour">00</strong> 时 <strong class="joe_run__minute">00</strong> 分 <strong class="joe_run__second">00</strong> 秒</span>
            </div>
        <?php endif; ?>

8

打赏


评论 (101)

取消
  1. 头像
    好了
    Windows 10 · FireFox
    沙发

    哈喽的

    回复 删除 垃圾
  2. 头像
    jixu
    Windows 10 · Google Chrome
    板凳

    来看看

    回复 删除 垃圾
  3. 头像
    发士大夫
    Windows 10 · Google Chrome
    地毯

    看看

    回复 删除 垃圾
  4. 头像
    ty
    Windows 10 · Google Chrome
    第4楼

    画图

    回复 删除 垃圾
  5. 头像
    123
    Windows 10 · Google Chrome
    第5楼

    好喜欢

    回复 删除 垃圾
  6. 头像
    icrkio
    Windows 10 · Google Chrome
    第6楼

    表情

    回复 删除 垃圾
  7. 头像
    ur
    Windows 10 · Google Chrome
    第7楼

    看看

    回复 删除 垃圾
  8. 头像
    peanut
    Windows 10 · Google Chrome
    第8楼

    画图

    回复 删除 垃圾
  9. 头像
    氢云
    Windows 10 · Google Chrome
    第9楼

    瞅一眼

    回复 删除 垃圾
  10. 头像
    uu
    Windows 10 · Google Chrome
    第10楼

    看看

    回复 删除 垃圾
  11. 头像
    Demon
    Windows 10 · Google Chrome
    第11楼

    啦啦

    回复 删除 垃圾
  12. 头像
    阿里将
    Windows 10 · Google Chrome
    第12楼

    谢谢分享

    回复 删除 垃圾
  13. 头像
    111
    Windows 10 · QQ Browser
    第13楼

    表情

    回复 删除 垃圾
  14. 头像
    海伦泽
    Windows 10 · Google Chrome
    第14楼

    画图

    回复 删除 垃圾
  15. 头像
    1111
    Windows 10 · Google Chrome
    第15楼

    闲的

    回复 删除 垃圾
  16. 头像
    阿紫酱
    Windows 10 · Google Chrome
    第16楼

    谢谢分享

    回复 删除 垃圾
  17. 头像
    daoke
    Windows 10 · Google Chrome
    第17楼

    表情

    回复 删除 垃圾
  18. 头像
    易玩
    Windows 10 · Google Chrome
    第18楼

    看看卡

    回复 删除 垃圾
  19. 头像
    看啊看
    Windows 10 · FireFox
    第19楼

    上次

    回复 删除 垃圾
  20. 头像
    哈喽的
    Windows 10 · Google Chrome
    第20楼

    哈喽的

    回复 删除 垃圾