Upgrade Notes
- The theme configuration file does not change: its version is still
5.1.0. The new options below are off by default, so sites look and behave as before until they turn them on - If you have customized copies of these files, apply the changes of this release to them:
layout/common/navbar.jsx(sticky navbar),layout/common/article.jsx(outdated post notice, cover loading),layout/index.jsx(cover loading),layout/common/head.jsx(web fonts and preconnect hints) andlayout/common/scripts.jsx(folded code block preview) - The post thumbnails of the archives and the recent posts widget are loaded lazily from hexo-component-inferno 4.2.2, which new installs get. Sites with 4.2.1 installed keep working, with thumbnails that load right away, until they update it with
npm update hexo-component-inferno
New Features
- Sticky navbar:
navbar.stickykeeps the navbar at the top of the window:trueat all widths,mobileon screens narrower than 769px only. Anchors, table of contents jumps and PJAX navigations land below it, the sticky columns stick below it, and pages can set it in their front-matter 26b7f24 #1401 - Outdated post notice:
article.outdated_notice(enable,days, 365 by default) shows a warning at the top of posts last updated at least that many days ago. The browser computes the age again from the current time, so the notice does not go stale on a static site. Posts can turn it off withoutdated_notice: falsein their front-matter. It is translated into all the languages of the theme 246aa11 c78c1d0 c075c75 #1401 - Folded code block preview:
article.highlight.fold_previewis the number of lines that a folded code block still shows, fading out. Clicking the preview unfolds the block.0, the default, keeps hiding the whole block 9aa69ad #1401 - Prefetch plugin:
plugins.prefetchprefetches the page of a link of the site when the pointer rests on it (delay, 65 ms by default) or when it is touched, so that the page opens faster. It works with PJAX, and does nothing when the visitor asks to save data 9d3372f #1401
Improvements
- Pages load with less blocking (part of #1269) #1402:
- Text shows in a fallback font while the web fonts load, instead of staying invisible (
display=swap, also with custom font CDN templates) 9d0748c - The browser connects in advance to the origins of the icon and web font files 702dd4e
- The cover at the top of a post, and the first cover of an index page, are loaded first. The covers after it are loaded when they are about to be scrolled to 3a9cdd0
- The thumbnails of the archives and the recent posts widget are loaded when they are about to be scrolled to 5901a54 ff20c7d
- Text shows in a fallback font while the web fonts load, instead of staying invisible (
- Tests: the browser tests show the real Font Awesome icons, and the test of the back to top button with a sticky navbar no longer depends on the speed of its animation e9352ef 2d81945
Bug Fixes
- Dark appearance: fix the active boxed tab keeping its white background, toggle tabs keeping their light borders, and both turning light when hovered 56de414 ec3802d #1400
- Dark appearance: fix the border of dark message blocks being hard to see, and give their header the same lighter grey 8bcf549 ec3802d #1400
- Dark appearance: fix the article licensing block having a card shadow 130996c #1401