feat: add page parameter geekdocNav to disable navigation sidebar (#129)
This commit is contained in:
parent
7938bc7d97
commit
cd0cfe37ae
6 changed files with 61 additions and 14 deletions
|
@ -8,8 +8,10 @@
|
|||
const results = document.querySelector('#gdoc-search-results');
|
||||
let showParent = {{ if .Site.Params.GeekdocSearchShowParent }}true{{ else }}false{{ end }}
|
||||
|
||||
input.addEventListener('focus', init);
|
||||
input.addEventListener('keyup', search);
|
||||
if (input) {
|
||||
input.addEventListener('focus', init);
|
||||
input.addEventListener('keyup', search);
|
||||
}
|
||||
|
||||
function init() {
|
||||
input.removeEventListener('focus', init); // init once
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue