惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
H
Help Net Security
V
Visual Studio Blog
J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
MyScale Blog
MyScale Blog
The Cloudflare Blog
Martin Fowler
Martin Fowler
D
Docker
腾讯CDC
F
Fortinet All Blogs
雷峰网
雷峰网
GbyAI
GbyAI
G
Google Developers Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recent Announcements
Recent Announcements
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Blog — PlanetScale
Blog — PlanetScale
Engineering at Meta
Engineering at Meta
博客园 - 聂微东
博客园 - 叶小钗

噜啦 - 折腾日记

博客启用全新域名 coding.lula.fun - 噜啦 博客启用全新域名 coding.lula.fun - 噜啦 sublime 修改新标签页默认语法 - 噜啦 sublime 修改新标签页默认语法 - 噜啦 小米降噪耳机 开箱|测评 - 噜啦 小米降噪耳机 开箱|测评 - 噜啦 Handsome主题魔改 - 噜啦 CentOS 7 搭建私聊 Telegram Bot CentOS 7 搭建私聊 Telegram Bot 运营商浏览器插入广告,如何解决? - 噜啦 运营商浏览器插入广告,如何解决? - 噜啦 Sublime配置C/C++ - 噜啦 Sublime配置C/C++ - 噜啦 NAT VPS配置DDNS - 噜啦 NAT VPS配置DDNS - 噜啦
Handsome主题魔改 - 噜啦
博主: 噜啦 · 2019-05-11 · via 噜啦 - 折腾日记

记录一下魔改步骤,不然主题一更新就打回原型了

底部运行时间

打开 handsome\component\footer.php,将

<div class="wrapper b-t bg-light">
      <span class="pull-right hidden-xs text-ellipsis">
      <?php $this->options->BottomInfo(); ?>
      Powered by <a target="blank" href="http://www.typecho.org">Typecho</a>&nbsp;|&nbsp;Theme by <a target="blank" href="https://www.ihewro.com/archives/489/">handsome</a>
      </span>
        <span class="text-ellipsis">&copy;&nbsp;<?php echo date("Y");?> Copyright&nbsp;<?php $this->options->BottomleftInfo(); ?></span>
    </div>

改为

<div class="wrapper b-t bg-light">
      <span class="pull-right hidden-xs">
      <?php $this->options->BottomInfo(); ?>
      See <a target="blank" href="https://coding.lula.fun/baidu_sitemap.xml">SiteMap</a>&nbsp;|&nbsp;Theme by <a target="blank" href="https://www.ihewro.com/archives/489/">handsome</a>
      </span>
      [已稳定运行<?php echo floor((time()-strtotime('2017-4-15'))/86400);?>天]
      <a target="blank" href="https://imoe.ink">&nbsp由&nbspiMoe&nbsp强力驱动</a>
    </div>

截图



去掉首页的标题

修改文件为/handsomeindex.php,大约33行左右
删除

<h1 class="m-n font-thin h3 text-black l-h"><?php $this->options->title(); ?></h1>

 截图



文章底部版权以及转载说明

修改文件/handsome/post.php,约62

截图

代码

<blockquote>
    <div>
        <div>
            <?php _e('文章名:'); ?> 《<?php $this->title() ?>》
            <br>
            <br>
            本文链接:<a href="<?php $this->permalink() ?>"><?php $this->permalink() ?></a>
            <br>
            <br>
            除特别注明外,文章均由&nbsp<strong>Neworld</strong>&nbsp原创
            <br>
            <br>
            &nbsp<strong>原创文章</strong>&nbsp转载时请注明 <strong>出处</strong> 以及<strong>文章链接</strong>
        </div>
    </div>
</blockquote>

效果



评论区表情包修改

本项修改评论表情,将原始表情替换成泡泡和阿鲁,只需要替换主题文件里的OwO.min.jsOwO.json文件就可以了。文件下载:HS_OwO.zip

OwO.min.jshandsome/assets/js/features文件夹,OwO.jsonhandsome/usr文件夹。

效果



修复Gravatar头像不显示问题

在更新主题后出现了这个问题,查了下源码,这里使用v2ex的cdn,暂时没有防盗链2333

编辑/handsome/libs/Utils.php,94行左右

$host . $url修改为'https://cdn.v2ex.com/gravatar/'

顶部导航栏添加心知天气

打开
/usr/themes/handsome/component/headnav.php文件,在50行左右添加代码

<!-- 天气 --> 
        <div id="tp-weather-widget" class="navbar-form navbar-form-sm navbar-left shift"></div>
        <div id="tp-weather-widget"></div>
        <script>(function(T,h,i,n,k,P,a,g,e){g=function(){P=h.createElement(i);a=h.getElementsByTagName(i)[0];P.src=k;P.charset="utf-8";P.async=1;a.parentNode.insertBefore(P,a)};T["ThinkPageWeatherWidgetObject"]=n;T[n]||(T[n]=function(){(T[n].q=T[n].q||[]).push(arguments)});T[n].l=+new Date();if(T.attachEvent){T.attachEvent("onload",g)}else{T.addEventListener("load",g,false)}}(window,document,"script"    ,"tpwidget","//widget.seniverse.com/widget/chameleon.js"))</script>
        <script>tpwidget("init", {
            "flavor": "slim",
            "location": "WX4FBXXFKE4F",
            "geolocation": "enabled",
            "language": "auto",
            "unit": "c",
            "theme": "chameleon",
            "container": "tp-weather-widget",
            "bubble": "enabled",
            "alarmType": "badge",
            "color": "#C6C6C6",
            "uid": "UBBB8DBE07",
            "hash": "6dda6603c46080d47f2c51d061c86bba"
        });
        tpwidget("show");</script>

官网的代码生成器已经404,,博主直接网上找的别人分享的,但是免费产品api调用频率比较低,暂时用着吧

赞赏作者

如果觉得我的文章对你有用,请随意赞赏