typecho+joe主题-好久不见之底部网站样式

typecho+joe主题-好久不见之底部网站样式

admin
2022-11-28 / 0 评论 / 48 阅读 / 正在检测是否收录...

1.修改footer.php首先,在页脚文件(usr/themes/Joe/public/footer.php)footer.php文件的最下面放入以下代码:


<!-- 好久不见 -->
<div class="chenyuyc">
   <div class="footer-fav">
     <div class="container">
       <div class="fl site-info">
         <h2><a href="https://www.richerdyoung.com/" target="_blank">Joshua</a></h2>
         <div class="site-p">
             <p>Josh【白茶清欢无别事,我在等风也等你】</p>
             <p  id="chenyutime">风风雨雨 <strong class="joe_run__day">00</strong> 天 <strong class="joe_run__hour">00</strong> 时 <strong class="joe_run__minute">00</strong> 分,你是第<?php echo theAllViews();?>位相遇的小伙伴</p>
        
         </div>
       </div>
       <div class="fr site-fav">
         <a href="https://www.richerdyoung.com/" 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://jsd.ucbk.cn/gh/cy-j/chenyu/img/cyxy.png);"></i> </div>
           <div class="girl-info hide_md">
             <h4>绿水本无忧,因风皱面</h4>
             <h4>青山原不老,为雪白头</h4>
           </div>
       </div>
     </div>
   </div>
</div>

2.修改include.php ,文件路径 usr/themes/Joe/public/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">

https://m.360buyimg.com/babel/jfs/t1/186924/17/29579/775792/6384bba0Ef010722c/dc2a11b653b3e092.png

3.备注

文件路径usr/themes/Joe/core/core.php
风风雨雨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; ?>

转载来源: 醉书生

0

评论 (0)

取消