Skip to content

Commit fdf8a5c

Browse files
author
github-actions[bot]
committed
Built docs from v2.0.1
1 parent 5ddb601 commit fdf8a5c

20 files changed

+1149
-0
lines changed

docs/v2.0.1/css/default.css

Lines changed: 551 additions & 0 deletions
Large diffs are not rendered by default.

docs/v2.0.1/css/highlight.css

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/*
2+
github.com style (c) Vasily Polovnyov <[email protected]>
3+
*/
4+
5+
.hljs {
6+
display: block;
7+
overflow-x: auto;
8+
padding: 0.5em;
9+
color: #333;
10+
background: #f8f8f8;
11+
}
12+
13+
.hljs-comment,
14+
.hljs-quote {
15+
color: #998;
16+
font-style: italic;
17+
}
18+
19+
.hljs-keyword,
20+
.hljs-selector-tag,
21+
.hljs-subst {
22+
color: #333;
23+
font-weight: bold;
24+
}
25+
26+
.hljs-number,
27+
.hljs-literal,
28+
.hljs-variable,
29+
.hljs-template-variable,
30+
.hljs-tag .hljs-attr {
31+
color: #008080;
32+
}
33+
34+
.hljs-string,
35+
.hljs-doctag {
36+
color: #d14;
37+
}
38+
39+
.hljs-title,
40+
.hljs-section,
41+
.hljs-selector-id {
42+
color: #900;
43+
font-weight: bold;
44+
}
45+
46+
.hljs-subst {
47+
font-weight: normal;
48+
}
49+
50+
.hljs-type,
51+
.hljs-class .hljs-title {
52+
color: #458;
53+
font-weight: bold;
54+
}
55+
56+
.hljs-tag,
57+
.hljs-name,
58+
.hljs-attribute {
59+
color: #000080;
60+
font-weight: normal;
61+
}
62+
63+
.hljs-regexp,
64+
.hljs-link {
65+
color: #009926;
66+
}
67+
68+
.hljs-symbol,
69+
.hljs-bullet {
70+
color: #990073;
71+
}
72+
73+
.hljs-built_in,
74+
.hljs-builtin-name {
75+
color: #0086b3;
76+
}
77+
78+
.hljs-meta {
79+
color: #999;
80+
font-weight: bold;
81+
}
82+
83+
.hljs-deletion {
84+
background: #fdd;
85+
}
86+
87+
.hljs-addition {
88+
background: #dfd;
89+
}
90+
91+
.hljs-emphasis {
92+
font-style: italic;
93+
}
94+
95+
.hljs-strong {
96+
font-weight: bold;
97+
}

docs/v2.0.1/index.html

Lines changed: 3 additions & 0 deletions
Large diffs are not rendered by default.

docs/v2.0.1/js/highlight.min.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v2.0.1/js/jquery.min.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v2.0.1/js/page_effects.js

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
function visibleInParent(element) {
2+
var position = $(element).position().top
3+
return position > -50 && position < ($(element).offsetParent().height() - 50)
4+
}
5+
6+
function hasFragment(link, fragment) {
7+
return $(link).attr("href").indexOf("#" + fragment) != -1
8+
}
9+
10+
function findLinkByFragment(elements, fragment) {
11+
return $(elements).filter(function(i, e) { return hasFragment(e, fragment)}).first()
12+
}
13+
14+
function scrollToCurrentVarLink(elements) {
15+
var elements = $(elements);
16+
var parent = elements.offsetParent();
17+
18+
if (elements.length == 0) return;
19+
20+
var top = elements.first().position().top;
21+
var bottom = elements.last().position().top + elements.last().height();
22+
23+
if (top >= 0 && bottom <= parent.height()) return;
24+
25+
if (top < 0) {
26+
parent.scrollTop(parent.scrollTop() + top);
27+
}
28+
else if (bottom > parent.height()) {
29+
parent.scrollTop(parent.scrollTop() + bottom - parent.height());
30+
}
31+
}
32+
33+
function setCurrentVarLink() {
34+
$('.secondary a').parent().removeClass('current')
35+
$('.anchor').
36+
filter(function(index) { return visibleInParent(this) }).
37+
each(function(index, element) {
38+
findLinkByFragment(".secondary a", element.id).
39+
parent().
40+
addClass('current')
41+
});
42+
scrollToCurrentVarLink('.secondary .current');
43+
}
44+
45+
var hasStorage = (function() { try { return localStorage.getItem } catch(e) {} }())
46+
47+
function scrollPositionId(element) {
48+
var directory = window.location.href.replace(/[^\/]+\.html$/, '')
49+
return 'scroll::' + $(element).attr('id') + '::' + directory
50+
}
51+
52+
function storeScrollPosition(element) {
53+
if (!hasStorage) return;
54+
localStorage.setItem(scrollPositionId(element) + "::x", $(element).scrollLeft())
55+
localStorage.setItem(scrollPositionId(element) + "::y", $(element).scrollTop())
56+
}
57+
58+
function recallScrollPosition(element) {
59+
if (!hasStorage) return;
60+
$(element).scrollLeft(localStorage.getItem(scrollPositionId(element) + "::x"))
61+
$(element).scrollTop(localStorage.getItem(scrollPositionId(element) + "::y"))
62+
}
63+
64+
function persistScrollPosition(element) {
65+
recallScrollPosition(element)
66+
$(element).scroll(function() { storeScrollPosition(element) })
67+
}
68+
69+
function sidebarContentWidth(element) {
70+
var widths = $(element).find('.inner').map(function() { return $(this).innerWidth() })
71+
return Math.max.apply(Math, widths)
72+
}
73+
74+
function calculateSize(width, snap, margin, minimum) {
75+
if (width == 0) {
76+
return 0
77+
}
78+
else {
79+
return Math.max(minimum, (Math.ceil(width / snap) * snap) + (margin * 2))
80+
}
81+
}
82+
83+
function resizeSidebars() {
84+
var primaryWidth = sidebarContentWidth('.primary')
85+
var secondaryWidth = 0
86+
87+
if ($('.secondary').length != 0) {
88+
secondaryWidth = sidebarContentWidth('.secondary')
89+
}
90+
91+
// snap to grid
92+
primaryWidth = calculateSize(primaryWidth, 32, 13, 160)
93+
secondaryWidth = calculateSize(secondaryWidth, 32, 13, 160)
94+
95+
$('.primary').css('width', primaryWidth)
96+
$('.secondary').css('width', secondaryWidth).css('left', primaryWidth + 1)
97+
98+
if (secondaryWidth > 0) {
99+
$('#content').css('left', primaryWidth + secondaryWidth + 2)
100+
}
101+
else {
102+
$('#content').css('left', primaryWidth + 1)
103+
}
104+
}
105+
106+
$(window).ready(resizeSidebars)
107+
$(window).ready(setCurrentVarLink)
108+
$(window).ready(function() { persistScrollPosition('.primary')})
109+
$(window).ready(function() {
110+
$('#content').scroll(setCurrentVarLink)
111+
$(window).resize(setCurrentVarLink)
112+
})

0 commit comments

Comments
 (0)