Typecho美化之网页底部增加好久不见的底部样式
好久不见之本站同款网站底部样式,效果见本站。
1.修改footer.php首先,在页脚文件footer.php文件的最下面放入以下代码:
{hide}
<!-- 好久不见 -->
<div class="chenyuyc">
<div class="footer-fav">
<div class="container">
<div class="fl site-info">
<h2><a href="https://blog.jichun29.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.aiyo99.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>{/hide}
2.修改include.php
新增CSS样式,在/usr/themes/Joe/public/include.php的19-29行之间新增如下代码:
<link rel="stylesheet" href="https://jsd.ucbk.cn/gh/cy-j/chenyu@1.6.0/css/cydibu.min.css"><link rel="stylesheet" href="https://jsd.ucbk.cn/gh/cy-j/chenyu/css/bootstrap-grid.min.css">

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)']);
}</code></pre><h2>4.Joe主题</h2><p>Joe主题开启显示建站时间后,并配置好“网站访问量暨与小伙伴们的N次相遇”小伙伴。</p><pre><code class="lang-php"><p><a href="javascript:;" id="chenyutime">风风雨雨N年,你是第N位相遇的小伙伴</a></p></code></pre><p>修改为:</p><pre><code class="lang-php"> <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></code></pre><p>修改好后,请删除原有的建站时间显示(第六行到第十行),不然会重复显示。</p><pre><code class="lang-php"> <?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; ?></code></pre>
版权申明
本文系作者 @jichun29 原创发布在季春二九站点。未经许可,禁止转载。
暂无评论数据