diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2019-07-17 14:43:30 +0200 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2019-08-06 11:33:42 +0200 |
commit | f56f2bf04dd6cd69e95304d5926c1229f2064d3a (patch) | |
tree | 16e07e3da6307baf570b2bfea26c41aa7fc0071d /assets | |
parent | a3f7d8b9484d14f36e34ce77d5f4b25405bcc01f (diff) |
Block serach bar untill index is loaded
Diffstat (limited to 'assets')
-rw-r--r-- | assets/book.scss | 10 | ||||
-rw-r--r-- | assets/search.js | 5 |
2 files changed, 8 insertions, 7 deletions
diff --git a/assets/book.scss b/assets/book.scss index 86bcf84..3ef2294 100644 --- a/assets/book.scss +++ b/assets/book.scss @@ -139,18 +139,17 @@ ul.pagination { .book-search { #book-search-input { - opacity: .33; - border: 0; border-bottom: $padding-1 solid $body-font-color; outline: none; - padding: $padding-4 $padding-8 $padding-4 $padding-16 + $padding-4; - width: 85%; - + padding: $padding-4 $padding-4 $padding-4 $padding-16 + $padding-4; + width: 100%; + background: url("svg/search.svg") left center no-repeat; background-size: $padding-16; + opacity: 0.33; &:focus { opacity: 1; } @@ -161,7 +160,6 @@ ul.pagination { } } - .book-toc { flex: 0 0 $toc-width; font-size: $font-size-12; diff --git a/assets/search.js b/assets/search.js index edb81e9..eb38c1d 100644 --- a/assets/search.js +++ b/assets/search.js @@ -10,7 +10,10 @@ function init() { loadScript("{{ "lunr.min.js" | relURL }}") - loadScript("{{ $searchData.RelPermalink }}", search); + loadScript("{{ $searchData.RelPermalink }}", function() { + input.readOnly = false; + search(); + }); input.removeEventListener("focus", init); } |