Hexo及icarus主题定制

Hexo及icarus主题定制

icarus个性定制配置修改的一些内容。为了防止Onedrive再把我的配置文件吞了或者还原成半年前的,把修改之处列出以绝后患。

增加文章字间距

icarus中文显示字体有点挤。
icarus/source/css/style.styl
.article .content的部分加上letter-spacing: 0.04rem

将“阅读更多”直接跳转至文章页,而非#more断点

/themes/icarus/layout/common/article.ejs:第68行删除#more

1
2
3
4
5
66              <div class="level-start">
67 <div class="level-item">
68: <a class="button is-size-7 is-light" href="<%- url_for(post.path) %>#more"><%= __('article.more') %></a>
69 </div>
70 </div>

share.js插件屏蔽不用的分享图标

/themes/icarus/layout/share/sharejs.ejs:中加入data-disableddata-sites

1
<div class="social-share" data-disabled="tencent,linkedin,douban,diandian,google"></div>

CSS修改

/themes/source/css/style.styl中进行修改

突出标题:

1
2
3
4
.title
border-left: #0085e2a1 6px solid
margin-left: -1.5rem
padding-left: 1rem

修正手机视图下标题比h1小的问题:

(虽然不提倡直接用!important提高优先级,不过改动只有这几处改动,应该也不会翻车。)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
@media screen and (max-width: screen-tablet - 1)
.has-text-centered-mobile
text-align: center !important
.is-flex-center-mobile
justify-content: center !important
.has-mt-5-mobile
margin-top: 1em !important
.content
h1
font-size: 1.25em !important
h2
font-size: 1.2em !important
.article
.title
font-weight: 430 !important

修改介绍栏关于我大小:

1
2
3
.button.is-rounded 
margin-left: 3em
margin-right: 3em

参考:Jingjing’s Blog

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×