Joe主题添加 好久不见之网站底部样式 - 筱铭云博客
侧边栏壁纸
  • QQ
  • WeChat
    WeChat
  • BiliBili
  • WeiBo
    • love love love

    • 累计撰写 37 篇文章
    • 累计收到 4 条评论
    Joe主题添加 好久不见之网站底部样式 - 筱铭云博客
    2021-09-01 2,678 阅读 0 评论 108 点赞

    Joe主题添加 好久不见之网站底部样式 - 筱铭云博客

    筱铭云
    2021-09-01 0 评论 2,678 阅读 正在检测是否收录...

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

    licur2vn.png


    1、修改footer.php
    • 首先,在页脚文件/usr/themes/Joe/public/footer.php文件的最下面放入以下代码:
    <!-- 好久不见 -->
    <div class="chenyuyc">
        <div class="footer-fav">
          <div class="container">
            <div class="fl site-info">
              <h2><a href="https://www.50dg.cn/" target="_blank">筱铭云博客</a></h2>
              <div class="site-p">
                  <p>筱铭云【白茶清欢无别事,我在等风也等你】</p>
                  <p><a href="javascript:;" id="chenyutime">风风雨雨N年,你是第N位相遇的小伙伴</a></p>
              </div>
            </div>
            <div class="fr site-fav">
              <a href="ttps://www.50dg.cn/" class="btn btn-fav btn-orange">Ctrl+D收藏本站</a></div>
            <div class="site-girl">
                <div class="girl fl"> <i class="thumb " style="background-image:url(/cyxy.png);"></i> </div>
                <div class="girl-info hide_md">
                  <h4>绿水本无忧,因风皱面</h4>
                  <h4>青山原不老,为雪白头</h4>
                </div>
            </div>
          </div>
        </div>
    </div>
    
    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; ?>

    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">

    Test

    3.备注
    • 风风雨雨1年266天3小时23分,你是第45,355位相遇的小伙伴……这里的实现看这里:
    • 在 /usr/themes/Joe/core/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)']);
            }
    108

    打赏


    评论

    博主关闭了当前页面的评论