-
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.
- Loading branch information
1 parent
a4e2195
commit 2e43a50
Showing
27 changed files
with
529 additions
and
109 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
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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
section.section | ||
header.section__header | ||
h3#option-print.section__h3 print | ||
div.section__content | ||
h4.section__h4 Description | ||
dl.section__dl | ||
dt.section__dt Type: | ||
dd.section__dd Object | ||
dl.section__dl | ||
dt.section__dt Default: | ||
dd.section__dd {element: '', title: ''} | ||
p 可选,自定义的是否自动为文章页面创建打印样式。 | ||
dl.section__dl | ||
dt.section__dt element: | ||
dd.section__dd (必须)要打印的文章区域,DOM 元素或者选择器字符串。 | ||
dl.section__dl | ||
dt.section__dt title: | ||
dd.section__dd (可选)要打印的文章标题。如果 element 区域有 h1 标签则无需设置。 | ||
pre.section__pre | ||
code.section__code. | ||
const defaults = Outline.DEFAULTS | ||
let outline | ||
|
||
defaults.position = 'sticky' | ||
defaults.stickyHeight = 86 | ||
defaults.parentElement = '#aside' | ||
defaults.scrollElement = '#main' | ||
defaults.homepage = './index.html' | ||
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: 'Outline.js 自动生成文章导读(Table of Contents)导航的 JavaScript 工具' | ||
} | ||
outline = new Outline(Outline.DEFAULTS) | ||
p 演示地址: | ||
a(target="_blank" href="https://yaohaixiao.github.io/outline.js/flex.html") https://yaohaixiao.github.io/outline.js/flex.html |
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
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.