Merge branch 'base'

This commit is contained in:
Daniil Krymov
2021-12-30 11:30:11 +04:00
11 changed files with 88 additions and 10 deletions

View File

@ -59,6 +59,7 @@ pre {
border-radius: var(--radius);
padding: 0 5px;
font-size: 14px;
user-select: none;
}
div.highlight:hover .copy-code,

View File

@ -366,6 +366,7 @@ h6:hover .anchor {
color: var(--secondary);
margin-inline-start: 8px;
font-weight: 500;
user-select: none;
}
.post-content :not(table) ::-webkit-scrollbar-thumb {

View File

@ -26,7 +26,21 @@ window.onload = function () {
'content'
]
};
if (params.fuseOpts) options = params.fuseOpts;
if (params.fuseOpts) {
options = {
isCaseSensitive: params.fuseOpts.iscasesensitive ? params.fuseOpts.iscasesensitive : false,
includeScore: params.fuseOpts.includescore ? params.fuseOpts.includescore : false,
includeMatches: params.fuseOpts.includematches ? params.fuseOpts.includematches : false,
minMatchCharLength: params.fuseOpts.minmatchcharlength ? params.fuseOpts.minmatchcharlength : 1,
shouldSort: params.fuseOpts.shouldsort ? params.fuseOpts.shouldsort : true,
findAllMatches: params.fuseOpts.findallmatches ? params.fuseOpts.findallmatches : false,
keys: params.fuseOpts.keys ? params.fuseOpts.keys : ['title', 'permalink', 'summary', 'content'],
location: params.fuseOpts.location ? params.fuseOpts.location : 0,
threshold: params.fuseOpts.threshold ? params.fuseOpts.threshold : 0.4,
distance: params.fuseOpts.distance ? params.fuseOpts.distance : 100,
ignoreLocation: params.fuseOpts.ignorelocation ? params.fuseOpts.ignorelocation : true
}
}
fuse = new Fuse(data, options); // build the index from the json file
}
} else {