Icarus主题更新至3.0版本
距离2.0版本更新已经有一年多的时间,前几天作者终于发布了3.0版本。对我来说,最大的改变在于主题结构重构以及语法切换,icarus3.0版本的代码从ejs变成了jsx,另外引入了hexo-component-inferno插件。但是,经过我不懈的努力,终于将主题修改成了2.0的模样…
themes/icarus/layout/common/footer.jsx
修改:去掉网站logo,另外调大了字体,添加了诗词一言。
1 | <div class="level"> |
themes/icarus/layout/common/scripts.jsx
修改:将main.js替换为cdn链接
1 | <Plugins site={site} config={config} page={page} helper={helper} head={false} /> |
themes/icarus/layout/common/head.jsx
修改:将default.css替换为cdn链接
1 | <link rel="stylesheet" href={fontCssUrl[variant]} /> |
themes/icarus/layout/common/article copy.jsx
修改:新增文件,移除about页面的标题(删除article.jsx下列代码)
1 | {/* Title */} |
themes/icarus/layout/page.jsx
修改:替换page引用模板
1 | const Article = require('./common/article copy'); |
themes/icarus/layout/comment/valine-admin.js
修改:新增文件,点击valine通知邮件跳转至评论位置
1 | if (window.location.hash) { |
themes/icarus/layout/comment/valine.js
修改:新增文件(复制node_modules/hexo-component-inferno/lib/view/comment/valine.js,并修改)
1 | var _require2 = require('hexo-component-inferno/lib/util/cache'), |
themes/icarus/scripts/index.js
修改:删除icarus提示字样
themes/icarus/layout/search/insight.js
修改:新增文件(复制node_modules/hexo-component-inferno/lib/view/search/insight.js,并修改),替换cdn链接
1 | var _require2 = require('hexo-component-inferno/lib/util/cache'), |
1 | contentUrl: helper.url_for('https://cdn.jsdelivr.net/gh/tiexo/tiexo.github.io/content.json'), |
themes/icarus/layout/plugin/animejs.jsx
修改:替换cdn链接
1 | jsUrl: helper.url_for('https://cdn.jsdelivr.net/gh/tiexo/tiexo.github.io/js/animation.js') |
themes/icarus/layout/plugin/back_to_top.jsx
修改:替换cdn链接
1 | jsUrl: helper.url_for('https://cdn.jsdelivr.net/gh/tiexo/tiexo.github.io/js/back_to_top.js') |
themes/icarus/include/style/base.styl
修改:调大、修改字体
1 | $body-size ?= 16px |
themes/icarus/include/style/navbar.styl
修改:调整m端导航栏样式
1 | .navbar-main |
node_modules/hexo-component-inferno/asset/js/insight.js
修改:调整搜索框显示数量
1 | return { |
source/about/index.md
修改:增加bgm
1 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css"> |
Icarus主题更新至3.0版本