【Joe】好久不见,你是第N位遇到的小伙伴——底部样式
侧边栏壁纸
  • 累计撰写 75 篇文章
  • 累计收到 21 条评论

【Joe】好久不见,你是第N位遇到的小伙伴——底部样式

逍遥博客
2021-11-11 / 0 评论 / 6 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2023年09月22日,已超过308天没有更新,若内容或图片失效,请留言反馈。

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

<!-- 好久不见 -->
<br><br>
<div class="chenyuyc">
    <div class="footer-fav">
      <div class="container">
        <div class="fl site-info">
          <h2><a href="https://xyg0.cn/" target="_blank">ImZMR</a></h2>
          <div class="site-p">
              <p>XYG0.CN【新的起点新的开始,我在等风也在等你】</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>
          </div>
        </div>
        <div class="fr site-fav">
          <a href="https://xyg0.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(https://cdn.jsdelivr.net/gh/cy-j/chenyu/img/cyxy.png);"></i> </div>
            <div class="girl-info hide_md">
              <h4>绿水本无忧,因风皱面</h4>
              <h4>青山原不老,为雪白头</h4>
            </div>
        </div>
      </div>
    </div>
</div>

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

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

Test

备注

风风雨雨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)']);
        }

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; ?>
0

评论 (0)

取消
Blog逍遥阁博客