2015-09-25 07:09:43 -04:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
2021-03-11 06:21:44 -05:00
|
|
|
<html>
|
2015-09-25 07:09:43 -04:00
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
|
|
<title>
|
|
|
|
{{title}}
|
|
|
|
</title>
|
2020-11-27 05:29:34 -05:00
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="{{{url}}}/icons/apple-touch-icon.png">
|
|
|
|
<link rel="icon" type="image/png" sizes="32x32" href="{{{url}}}/icons/favicon-32x32.png">
|
|
|
|
<link rel="icon" type="image/png" sizes="16x16" href="{{{url}}}/icons/favicon-16x16.png">
|
|
|
|
<link rel="manifest" href="{{{url}}}/icons/site.webmanifest">
|
|
|
|
<link rel="mask-icon" href="{{{url}}}/icons/safari-pinned-tab.svg" color="#b51f08">
|
|
|
|
<link rel="shortcut icon" href="{{{url}}}/icons/favicon.ico">
|
2015-09-25 07:09:43 -04:00
|
|
|
|
2021-06-21 14:14:29 -04:00
|
|
|
<% _.forEach(htmlWebpackPlugin.files.css, function(cssFile) { %><style><%= compilation.assets[cssFile.substr(htmlWebpackPlugin.files.publicPath.length)].source() %></style><% }); %>
|
2015-09-25 07:09:43 -04:00
|
|
|
</head>
|
|
|
|
|
2021-03-11 06:21:44 -05:00
|
|
|
<body translate="no">
|
2015-09-25 07:09:43 -04:00
|
|
|
{{{html}}}
|
|
|
|
<div class="ui-toc dropup unselectable hidden-print" style="display:none;">
|
|
|
|
<div class="pull-right dropdown">
|
2016-07-30 00:19:42 -04:00
|
|
|
<a id="tocLabel" class="ui-toc-label btn btn-default" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false" title="Table of content">
|
2015-09-25 07:09:43 -04:00
|
|
|
<i class="fa fa-bars"></i>
|
|
|
|
</a>
|
2016-08-14 23:27:32 -04:00
|
|
|
<ul id="ui-toc" class="ui-toc-dropdown dropdown-menu" aria-labelledby="tocLabel">
|
|
|
|
{{{ui-toc}}}
|
2015-09-25 07:09:43 -04:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-08-14 23:27:32 -04:00
|
|
|
<div id="ui-toc-affix" class="ui-affix-toc ui-toc-dropdown unselectable hidden-print" data-spy="affix" style="top:17px;display:none;" {{{lang}}} {{{dir}}}>
|
|
|
|
{{{ui-toc-affix}}}
|
2015-09-25 07:09:43 -04:00
|
|
|
</div>
|
2021-06-21 14:14:29 -04:00
|
|
|
<% _.forEach(htmlWebpackPlugin.files.js, function(jsFile) { %><script><%= compilation.assets[jsFile.substr(htmlWebpackPlugin.files.publicPath.length)].source() %></script><% }); %>
|
2015-09-25 07:09:43 -04:00
|
|
|
<script>
|
|
|
|
var markdown = $(".markdown-body");
|
|
|
|
//smooth all hash trigger scrolling
|
|
|
|
function smoothHashScroll() {
|
|
|
|
var hashElements = $("a[href^='#']").toArray();
|
|
|
|
for (var i = 0; i < hashElements.length; i++) {
|
|
|
|
var element = hashElements[i];
|
|
|
|
var $element = $(element);
|
|
|
|
var hash = element.hash;
|
|
|
|
if (hash) {
|
|
|
|
$element.on('click', function (e) {
|
|
|
|
// store hash
|
|
|
|
var hash = this.hash;
|
|
|
|
if ($(hash).length <= 0) return;
|
|
|
|
// prevent default anchor click behavior
|
|
|
|
e.preventDefault();
|
|
|
|
// animate
|
|
|
|
$('body, html').stop(true, true).animate({
|
|
|
|
scrollTop: $(hash).offset().top
|
|
|
|
}, 100, "linear", function () {
|
|
|
|
// when done, add hash to url
|
|
|
|
// (default click behaviour)
|
|
|
|
window.location.hash = hash;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
smoothHashScroll();
|
|
|
|
var toc = $('.ui-toc');
|
|
|
|
var tocAffix = $('.ui-affix-toc');
|
|
|
|
var tocDropdown = $('.ui-toc-dropdown');
|
|
|
|
//toc
|
|
|
|
tocDropdown.click(function (e) {
|
|
|
|
e.stopPropagation();
|
|
|
|
});
|
|
|
|
|
|
|
|
var enoughForAffixToc = true;
|
|
|
|
|
|
|
|
function generateScrollspy() {
|
|
|
|
$(document.body).scrollspy({
|
|
|
|
target: ''
|
|
|
|
});
|
|
|
|
$(document.body).scrollspy('refresh');
|
|
|
|
if (enoughForAffixToc) {
|
|
|
|
toc.hide();
|
|
|
|
tocAffix.show();
|
|
|
|
} else {
|
|
|
|
tocAffix.hide();
|
|
|
|
toc.show();
|
|
|
|
}
|
|
|
|
$(document.body).scroll();
|
|
|
|
}
|
|
|
|
|
|
|
|
function windowResize() {
|
|
|
|
//toc right
|
|
|
|
var paddingRight = parseFloat(markdown.css('padding-right'));
|
|
|
|
var right = ($(window).width() - (markdown.offset().left + markdown.outerWidth() - paddingRight));
|
|
|
|
toc.css('right', right + 'px');
|
|
|
|
//affix toc left
|
|
|
|
var newbool;
|
|
|
|
var rightMargin = (markdown.parent().outerWidth() - markdown.outerWidth()) / 2;
|
|
|
|
//for ipad or wider device
|
|
|
|
if (rightMargin >= 133) {
|
|
|
|
newbool = true;
|
|
|
|
var affixLeftMargin = (tocAffix.outerWidth() - tocAffix.width()) / 2;
|
|
|
|
var left = markdown.offset().left + markdown.outerWidth() - affixLeftMargin;
|
|
|
|
tocAffix.css('left', left + 'px');
|
|
|
|
} else {
|
|
|
|
newbool = false;
|
|
|
|
}
|
|
|
|
if (newbool != enoughForAffixToc) {
|
|
|
|
enoughForAffixToc = newbool;
|
|
|
|
generateScrollspy();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$(window).resize(function () {
|
|
|
|
windowResize();
|
|
|
|
});
|
|
|
|
$(document).ready(function () {
|
|
|
|
windowResize();
|
|
|
|
generateScrollspy();
|
|
|
|
});
|
|
|
|
|
|
|
|
//remove hash
|
|
|
|
function removeHash() {
|
|
|
|
window.location.hash = '';
|
|
|
|
}
|
|
|
|
|
|
|
|
var backtotop = $('.back-to-top');
|
|
|
|
var gotobottom = $('.go-to-bottom');
|
|
|
|
|
|
|
|
backtotop.click(function (e) {
|
|
|
|
e.preventDefault();
|
|
|
|
e.stopPropagation();
|
|
|
|
if (scrollToTop)
|
|
|
|
scrollToTop();
|
|
|
|
removeHash();
|
|
|
|
});
|
|
|
|
gotobottom.click(function (e) {
|
|
|
|
e.preventDefault();
|
|
|
|
e.stopPropagation();
|
|
|
|
if (scrollToBottom)
|
|
|
|
scrollToBottom();
|
|
|
|
removeHash();
|
|
|
|
});
|
|
|
|
|
2017-05-09 10:11:57 -04:00
|
|
|
var toggle = $('.expand-toggle');
|
|
|
|
var tocExpand = false;
|
|
|
|
|
|
|
|
checkExpandToggle();
|
|
|
|
toggle.click(function (e) {
|
|
|
|
e.preventDefault();
|
|
|
|
e.stopPropagation();
|
|
|
|
tocExpand = !tocExpand;
|
|
|
|
checkExpandToggle();
|
|
|
|
})
|
|
|
|
|
|
|
|
function checkExpandToggle () {
|
|
|
|
var toc = $('.ui-toc-dropdown .toc');
|
|
|
|
var toggle = $('.expand-toggle');
|
|
|
|
if (!tocExpand) {
|
|
|
|
toc.removeClass('expand');
|
|
|
|
toggle.text('Expand all');
|
|
|
|
} else {
|
|
|
|
toc.addClass('expand');
|
|
|
|
toggle.text('Collapse all');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-09-25 07:09:43 -04:00
|
|
|
function scrollToTop() {
|
|
|
|
$('body, html').stop(true, true).animate({
|
|
|
|
scrollTop: 0
|
|
|
|
}, 100, "linear");
|
|
|
|
}
|
|
|
|
|
|
|
|
function scrollToBottom() {
|
|
|
|
$('body, html').stop(true, true).animate({
|
|
|
|
scrollTop: $(document.body)[0].scrollHeight
|
|
|
|
}, 100, "linear");
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
|
2016-10-23 01:27:02 -04:00
|
|
|
</html>
|