fi3ework / hexo-theme-archer

🎯 A smart and modern theme for Hexo.
https://fi3ework.github.io/hexo-theme-archer
MIT License
1.5k stars 274 forks source link

Dev 1.6.2: fix code lint, bugs and style & Add theme feature #299

Closed LolipopJ closed 3 years ago

LolipopJ commented 3 years ago
  1. 修复代码格式化工具 Prettier 修复了 npm 脚本,现在可以使用 npm run prettier 来格式化 src 目录下的代码格式了。
  2. 修复了一些已知问题
    • 顶部 header 元素不再遮挡点击事件(#292)
    • 回到顶部按钮现在正确配合侧边栏动画移动
    • 博文的列表间距现在更加合理(#287)
    • 修复博文的超链接,以及 banner 博客名的间距配置
  3. 添加了一些主题配置
    • 浮动按钮主题:rounded 使得按钮变圆,并去除边框
    • 博客阅读进度条颜色:feature 使用主题颜色
    • 博客 banner 主题:clean 去除底部边框,并使透明度降低
  4. 优化移动端样式表
  5. 包括修复动画兼容性在内的其它样式表修改
LolipopJ commented 3 years ago
  1. 修复 Toc 过长时隐藏的问题(#296)
LolipopJ commented 3 years ago
  1. 添加了 postcss autoprefixer 支持
LolipopJ commented 3 years ago

我注意到博文页面的标题前方会自动生成一个 \<a class="headerlink" />(大概是由 hexo-renderer-marked 自动生成的):

<h2 id="静态方法和属性">
    <a href="#静态方法和属性" class="headerlink" title="静态方法和属性"></a>
    静态方法和属性
    <a class="anchorjs-link anchorjs-archer" aria-label="Anchor" data-anchorjs-icon="" href="#静态方法和属性" style="font: 1em / 1 anchorjs-icons; padding-left: 0.375em;"></a>
</h2>

它可以点击,并会占用一定的位置。考虑到博客主题已经使用 anchor-js 生成锚点了,我认为这个自动生成的锚点是多余的。

h-with-headerlink

可以通过设置 .headerlink { display: none; } 来移除这个占用的位置:

h-without-headerlink

@fi3ework @Stark-X 我不确定有这个占用的位置比较好,还是没有比较好。

如果有这个缩进比较好看的话,我可以为标题前面添加一个 padding-left 属性。或者如果没有比较好看的话(正像大多数 md 预览器对它的处理一样),我将提交这个修改。

LolipopJ commented 3 years ago
  1. 移除了博客章节标题前面占位的 headerlink
  2. 更新了评论组件 Gitalk,并添加 CSS 支持,与主题颜色适配
LolipopJ commented 3 years ago
  1. 添加了备案信息配置项(适用于中国大陆建站用户),#271