docs: regenerate

This commit is contained in:
goat 2021-08-21 22:57:51 +02:00
parent c864cae087
commit 1eb35f29eb
No known key found for this signature in database
GPG key ID: F18F057873895461
935 changed files with 148201 additions and 35402 deletions

View file

@ -42,7 +42,11 @@ h6 mark {
.inheritance .level2:before,
.inheritance .level3:before,
.inheritance .level4:before,
.inheritance .level5:before {
.inheritance .level5:before,
.inheritance .level6:before,
.inheritance .level7:before,
.inheritance .level8:before,
.inheritance .level9:before {
content: '↳';
margin-right: 5px;
}
@ -71,6 +75,22 @@ h6 mark {
margin-left: 5em;
}
.inheritance .level6 {
margin-left: 6em;
}
.inheritance .level7 {
margin-left: 7em;
}
.inheritance .level8 {
margin-left: 8em;
}
.inheritance .level9 {
margin-left: 9em;
}
.level0.summary {
margin: 2em 0 2em 0;
}

View file

@ -65,7 +65,7 @@ $(function () {
(function () {
anchors.options = {
placement: 'left',
visible: 'touch'
visible: 'hover'
};
anchors.add('article h2:not(.no-anchor), article h3:not(.no-anchor), article h4:not(.no-anchor)');
})();
@ -232,7 +232,7 @@ $(function () {
// Highlight the searching keywords
function highlightKeywords() {
var q = url('?q');
if (q !== null) {
if (q) {
var keywords = q.split("%20");
keywords.forEach(function (keyword) {
if (keyword !== "") {
@ -326,7 +326,7 @@ $(function () {
var itemBrief = extractContentBrief(hit.keywords);
var itemNode = $('<div>').attr('class', 'sr-item');
var itemTitleNode = $('<div>').attr('class', 'item-title').append($('<a>').attr('href', itemHref).attr("target", "_blank").text(itemTitle));
var itemTitleNode = $('<div>').attr('class', 'item-title').append($('<a>').attr('href', itemHref).attr("target", "_blank").attr("rel", "noopener noreferrer").text(itemTitle));
var itemHrefNode = $('<div>').attr('class', 'item-href').text(itemRawHref);
var itemBriefNode = $('<div>').attr('class', 'item-brief').text(itemBrief);
itemNode.append(itemTitleNode).append(itemHrefNode).append(itemBriefNode);
@ -379,7 +379,7 @@ $(function () {
navrel = navbarPath.substr(0, index + 1);
}
$('#navbar>ul').addClass('navbar-nav');
var currentAbsPath = util.getAbsolutePath(window.location.pathname);
var currentAbsPath = util.getCurrentWindowAbsolutePath();
// set active item
$('#navbar').find('a[href]').each(function (i, e) {
var href = $(e).attr("href");
@ -556,7 +556,10 @@ $(function () {
if (index > -1) {
tocrel = tocPath.substr(0, index + 1);
}
var currentHref = util.getAbsolutePath(window.location.pathname);
var currentHref = util.getCurrentWindowAbsolutePath();
if(!currentHref.endsWith('.html')) {
currentHref += '.html';
}
$('#sidetoc').find('a[href]').each(function (i, e) {
var href = $(e).attr("href");
if (util.isRelativePath(href)) {
@ -1054,14 +1057,25 @@ $(function () {
this.getAbsolutePath = getAbsolutePath;
this.isRelativePath = isRelativePath;
this.isAbsolutePath = isAbsolutePath;
this.getCurrentWindowAbsolutePath = getCurrentWindowAbsolutePath;
this.getDirectory = getDirectory;
this.formList = formList;
function getAbsolutePath(href) {
// Use anchor to normalize href
var anchor = $('<a href="' + href + '"></a>')[0];
// Ignore protocal, remove search and query
return anchor.host + anchor.pathname;
if (isAbsolutePath(href)) return href;
var currentAbsPath = getCurrentWindowAbsolutePath();
var stack = currentAbsPath.split("/");
stack.pop();
var parts = href.split("/");
for (var i=0; i< parts.length; i++) {
if (parts[i] == ".") continue;
if (parts[i] == ".." && stack.length > 0)
stack.pop();
else
stack.push(parts[i]);
}
var p = stack.join("/");
return p;
}
function isRelativePath(href) {
@ -1075,6 +1089,9 @@ $(function () {
return (/^(?:[a-z]+:)?\/\//i).test(href);
}
function getCurrentWindowAbsolutePath() {
return window.location.origin + window.location.pathname;
}
function getDirectory(href) {
if (!href) return '';
var index = href.lastIndexOf('/');

File diff suppressed because one or more lines are too long