Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 11 commits into from
Jun 25, 2021

Conversation

LolipopJ
Copy link
Collaborator

  1. 修复代码格式化工具 Prettier
    修复了 npm 脚本,现在可以使用 npm run prettier 来格式化 src 目录下的代码格式了。
  2. 修复了一些已知问题
  3. 添加了一些主题配置
    • 浮动按钮主题:rounded 使得按钮变圆,并去除边框
    • 博客阅读进度条颜色:feature 使用主题颜色
    • 博客 banner 主题:clean 去除底部边框,并使透明度降低
  4. 优化移动端样式表
  5. 包括修复动画兼容性在内的其它样式表修改

Also fix the npm script. Now you can run `yarn prettier` to auto fix link problem.
1、顶部 header 元素不再遮挡点击事件
2、回到顶部按钮现在正确配合侧边栏动画移动
3、博文的列表间距现在更加合理
4、修复博文的超链接,和 banner 博客名的间距样式表
5、包括动画兼容性在内的一些其他样式表修复
6、为滚动事件添加函数节流,优化性能
7、现在博文页面向上滚动更容易触发 banner
8、现在鼠标悬浮在主页的'友链'和'关于我'处会显示主题色
1. float_button_theme: theme for float buttons, including back-top button and header-menu button
2. read_progress_color: color for blog post's header read progress
3. post_banner_theme: theme for blog post banner
Now overflow toc will be scrollable
@LolipopJ
Copy link
Collaborator Author

LolipopJ commented Jun 5, 2021

  1. 修复 Toc 过长时隐藏的问题(「反馈 Bug」TOC 目录无法显示过长内容 #296

@LolipopJ
Copy link
Collaborator Author

LolipopJ commented Jun 6, 2021

  1. 添加了 postcss autoprefixer 支持

@LolipopJ
Copy link
Collaborator Author

LolipopJ commented Jun 6, 2021

我注意到博文页面的标题前方会自动生成一个 <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 预览器对它的处理一样),我将提交这个修改。

& remove block before md doc titles
1. 更新了一些依赖。
2. Webpack 5.x 已经集成了 terser-webpack-plugin,因此在依赖中去掉它。
3. 编译 search.js 文件时需要 algoliasearch 依赖,否则无法编译成功,故在依赖中添加它。
@LolipopJ
Copy link
Collaborator Author

  1. 移除了博客章节标题前面占位的 headerlink
  2. 更新了评论组件 Gitalk,并添加 CSS 支持,与主题颜色适配

Copy link
Owner

@fi3ework fi3ework left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work

remove instantsearch.js dependency from package.json as it is already loaded with cdn.
@LolipopJ
Copy link
Collaborator Author

  1. 添加了备案信息配置项(适用于中国大陆建站用户),如何添加备案信息 #271

@LolipopJ LolipopJ merged commit dc53228 into master Jun 25, 2021
@LolipopJ LolipopJ deleted the dev-1.6.2 branch June 29, 2021 09:05
Stark-X pushed a commit to Stark-X/hexo-theme-archer that referenced this pull request Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants