-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 修复 sticky 定位,窗口调整大小,chapters 导航栏高度没有自适应窗口大小变化的问题
- Loading branch information
1 parent
35dd1e9
commit 4694b3c
Showing
23 changed files
with
220 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
script(src="js/outline.min.js") | ||
script. | ||
(function(){ | ||
const defaults = Outline.DEFAULTS | ||
let outline | ||
const defaults = Outline.DEFAULTS | ||
let outline | ||
|
||
defaults.selector = 'h2,h3' | ||
defaults.title = false | ||
defaults.showCode = false | ||
defaults.position = 'sticky' | ||
defaults.parentElement = '#aside' | ||
defaults.scrollElement = '#main' | ||
defaults.articleElement = '#article' | ||
defaults.git = 'https://github.com/yaohaixiao/outline.js' | ||
defaults.tags = 'https://github.com/yaohaixiao/outline.js/tags' | ||
defaults.issues = 'https://github.com/yaohaixiao/outline.js/issues' | ||
defaults.print = { | ||
element: '#article', | ||
title: document.querySelector('.main__h1') | ||
} | ||
defaults.chapterTextFilter = (text) => { | ||
return text.replace(/\s*\(.*?\)/, '()') | ||
} | ||
outline = new Outline(Outline.DEFAULTS) | ||
})() | ||
defaults.selector = 'h2,h3' | ||
defaults.title = false | ||
defaults.showCode = false | ||
defaults.position = 'sticky' | ||
defaults.parentElement = '#aside' | ||
defaults.scrollElement = '#main' | ||
defaults.articleElement = '#article' | ||
defaults.git = 'https://github.com/yaohaixiao/outline.js' | ||
defaults.tags = 'https://github.com/yaohaixiao/outline.js/tags' | ||
defaults.issues = 'https://github.com/yaohaixiao/outline.js/issues' | ||
defaults.print = { | ||
element: '#article', | ||
title: document.querySelector('.main__h1') | ||
} | ||
defaults.chapterTextFilter = (text) => { | ||
return text.replace(/\s*\(.*?\)/, '()') | ||
} | ||
outline = new Outline(Outline.DEFAULTS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.