Skip to content

Commit 4c04876

Browse files
committed
Update docs
1 parent 06754c9 commit 4c04876

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+292
-87
lines changed

docs/404.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/LICENSE-text.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/LICENSE.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/brokenstick-article.html

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* Styles for section anchors */
2+
a.anchor-section {margin-left: 10px; visibility: hidden; color: inherit;}
3+
a.anchor-section::before {content: '#';}
4+
.hasAnchor:hover a.anchor-section {visibility: visible;}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Anchor sections v1.0 written by Atsushi Yasumoto on Oct 3rd, 2020.
2+
document.addEventListener('DOMContentLoaded', function() {
3+
// Do nothing if AnchorJS is used
4+
if (typeof window.anchors === 'object' && anchors.hasOwnProperty('hasAnchorJSLink')) {
5+
return;
6+
}
7+
8+
const h = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
9+
10+
// Do nothing if sections are already anchored
11+
if (Array.from(h).some(x => x.classList.contains('hasAnchor'))) {
12+
return null;
13+
}
14+
15+
// Use section id when pandoc runs with --section-divs
16+
const section_id = function(x) {
17+
return ((x.classList.contains('section') || (x.tagName === 'SECTION'))
18+
? x.id : '');
19+
};
20+
21+
// Add anchors
22+
h.forEach(function(x) {
23+
const id = x.id || section_id(x.parentElement);
24+
if (id === '') {
25+
return null;
26+
}
27+
let anchor = document.createElement('a');
28+
anchor.href = '#' + id;
29+
anchor.classList = ['anchor-section'];
30+
x.classList.add('hasAnchor');
31+
x.appendChild(anchor);
32+
});
33+
});

docs/articles/brokenstick.html

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* Styles for section anchors */
2+
a.anchor-section {margin-left: 10px; visibility: hidden; color: inherit;}
3+
a.anchor-section::before {content: '#';}
4+
.hasAnchor:hover a.anchor-section {visibility: visible;}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Anchor sections v1.0 written by Atsushi Yasumoto on Oct 3rd, 2020.
2+
document.addEventListener('DOMContentLoaded', function() {
3+
// Do nothing if AnchorJS is used
4+
if (typeof window.anchors === 'object' && anchors.hasOwnProperty('hasAnchorJSLink')) {
5+
return;
6+
}
7+
8+
const h = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
9+
10+
// Do nothing if sections are already anchored
11+
if (Array.from(h).some(x => x.classList.contains('hasAnchor'))) {
12+
return null;
13+
}
14+
15+
// Use section id when pandoc runs with --section-divs
16+
const section_id = function(x) {
17+
return ((x.classList.contains('section') || (x.tagName === 'SECTION'))
18+
? x.id : '');
19+
};
20+
21+
// Add anchors
22+
h.forEach(function(x) {
23+
const id = x.id || section_id(x.parentElement);
24+
if (id === '') {
25+
return null;
26+
}
27+
let anchor = document.createElement('a');
28+
anchor.href = '#' + id;
29+
anchor.classList = ['anchor-section'];
30+
x.classList.add('hasAnchor');
31+
x.appendChild(anchor);
32+
});
33+
});

docs/articles/index.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)