本教程均在handsome 3.3.1中测试通过,不保证兼容其他版本,请自行修改相应步骤。

handsome主题的一些自定义的地方,随时修改。

文章右下角版权信息修改

libs/Content.php第391行左右自行修改字符串即可

文章右上角分享到信息修改

libs/Content.php第51行左右,可能需要少量html知识。

主题颜色自定义修改

component/headnav.php修改上方的颜色:简单的做法是直接把自己主题用的div替换成要用的颜色的div(小学英语都能看的懂颜色吧……)至于themetype则是从左到右,从上到下编号为0-13
libs/Content.php105行左右修改左边的颜色,同理替换即可。

导航栏自定义

component/aside.php86行之后是导航栏的代码,推荐有少量html、Php经验的童鞋修改。
添加大分类(浅色字体的):

<li class="hidden-folded padder m-t m-b-sm text-muted text-xs">
    <span><?php _me("大分类") ?></span>
</li>

注意如果不是第一个的话要在前面加一句<li class="line dk"></li>分隔
添加组(可以展开的,自行改图标):

<li>
    <a data-no-instant class="auto">
        <span class="pull-right text-muted">
            <i class="fa icon-fw fa-angle-right text"></i>
            <i class="fa icon-fw fa-angle-down text-active"></i>
        </span>
        <i class="iconfont icon-c-classification"></i>
        <span><?php _me("组名") ?></span>
    </a>
    <ul class="nav nav-sub dk">
        <li><a href="地址"><span>名字</span></a></li>
    </ul>
</li>

导航置顶后失效按钮的删除

如果在设置里设置了导航置顶的功能,那么第二个折叠头像的按钮将会失效,如果想要去掉的话需要打开component/headnav.php,将85行左右的

<a href="#" class="btn no-shadow navbar-btn" ui-toggle-class="show" target="#aside-user">
    <i class="iconfont icon-user icon-fw"></i>
</a>

这段去掉就行了

    • *

主题文件概述

由于本人并非作者,水平关系部分文件可能解释不对,仅供参考

component/aside.php        左边导航栏
component/comments.php     评论区
component/footer.php       底部版权、音乐播放器之类
component/header.php       页面头,没啥要改的
component/headnav.php      顶部导航
component/say.php          时光机动态
component/sidebar.php      右侧栏目
component/third_party_comments.php    3.3.0新增,第三方评论
css/        博客CSS,一般不要改
fonts/      博客字体,一般不要改
img/        图像,一般不要改
js/         js文件,一般不要改
lang/       语言文件
libs/Content.php    文章内容
libs/...    一般不要改
usr/        另一个语言文件?
404.php     404界面
archive.php    整合
booklist.php   书单
cross.php      时光机
files.php      归档
functions.php  配置界面的东西
guestbook.php  留言板
index.php      首页
links.php      友链
page.php       文章页面整合
post.php       文章输出

文章来源:https://www.imwxz.com/guide_handsome/48.html

Last modification:February 15th, 2019 at 05:39 pm
If you think my article is useful to you, please feel free to appreciate