Skip to content

Commit

Permalink
🐛 Fix: can't keep the static table of the contents in front of the post
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Nov 17, 2022
1 parent 6c25237 commit 88ec9f6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file.
- :bug: Fix: remove the leading and trailing whitespace of the code string ([#205](https://github.com/hugo-fixit/FixIt/issues/205))
- :bento: Fix: update webfonts for fontawesome 6.2.0 (@NicoDreamzZ[#228](https://github.com/hugo-fixit/FixIt/pull/228))
- :bug: Fix: image shortcode/plugin lose the support for svg type files ([#210](https://github.com/hugo-fixit/FixIt/issues/210))
- :bug: Fix: can't keep the static table of the contents in front of the post
- :lipstick: Style: refactor css style
- :lipstick: Style: update home page stylesheet
- :wrench: Chore(deps-dev):
Expand Down
2 changes: 1 addition & 1 deletion assets/js/theme.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/theme.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ class FixIt {
if ($tocCore === null) {
return;
}
if (document.getElementById('toc-static').getAttribute('date-kept') === 'true' || this.util.isTocStatic()) {
if (document.getElementById('toc-static').getAttribute('data-kept') === 'true' || this.util.isTocStatic()) {
const $tocContentStatic = document.getElementById('toc-content-static');
if ($tocCore.parentElement !== $tocContentStatic) {
$tocCore.parentElement.removeChild($tocCore);
Expand Down

1 comment on commit 88ec9f6

@vercel
Copy link

@vercel vercel bot commented on 88ec9f6 Nov 17, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

fixit – ./

hugofixit.vercel.app
fixit-git-master-x-cell.vercel.app
fixit-x-cell.vercel.app
fixit.lruihao.cn

Please sign in to comment.