#59, Allow customize SASS vars, add example of dark theme

This commit is contained in:
Alex Shpak
2019-10-03 15:07:38 +02:00
parent 77255304f3
commit 3e3a3346e1
7 changed files with 47 additions and 41 deletions
+1
View File
@@ -1 +1,2 @@
@import "variables";
// You can add custom styles here.
+13
View File
@@ -0,0 +1,13 @@
// You can override SASS variables here. Below example of simple dark theme.
/*
$gray-100: rgba(255, 255, 255, 0.1);
$gray-200: rgba(255, 255, 255, 0.2);
$body-background: #343a40;
$body-font-color: #e9ecef;
$color-link: #84b2ff;
$color-visited-link: #b88dff;
$color-dark-link: $body-font-color;
*/
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
{"Target":"search-data.min.d8cb1397d75559602eb3c92473e1c14b41f6d6198ea34823cb48fc4298b46ee8.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-2MsTl9dVWWAus8kkc+HBS0H21hmOo0gjy0j8Qpi0bug="}}
@@ -1,5 +0,0 @@
(function(){const input=document.querySelector("#book-search-input");const results=document.querySelector("#book-search-results");input.addEventListener("focus",init);input.addEventListener("keyup",search);function init(){input.removeEventListener("focus",init);input.required=true;loadScript("/theme/hugo-book/lunr.min.js");loadScript("/theme/hugo-book/search-data.min.d8cb1397d75559602eb3c92473e1c14b41f6d6198ea34823cb48fc4298b46ee8.js",function(){input.readOnly=false;input.required=false;search();});}
function search(){while(results.firstChild){results.removeChild(results.firstChild);}
if(!input.value){return;}
const terms=lunr.tokenizer(input.value);const searchHits=window.bookSearch.idx.query(function(query){query.term(terms,{boost:100});query.term(terms,{boost:10,wildcard:lunr.Query.wildcard.LEADING|lunr.Query.wildcard.TRAILING});query.term(terms,{editDistance:2});});searchHits.slice(0,10).forEach(function(hit){const page=window.bookSearch.pages[hit.ref];const li=document.createElement("li"),a=li.appendChild(document.createElement("a"));a.href=page.href;a.textContent=page.title;results.appendChild(li);});}
function loadScript(src,callback){const script=document.createElement("script");script.defer=true;script.src=src;script.onload=callback;document.head.append(script);}})();
@@ -1 +0,0 @@
{"Target":"search.min.da4874ea4f4a57ac6e394d9c0e5d4c8a0aee75879f3d801250bf2fe7d72e1ff9.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-2kh06k9KV6xuOU2cDl1MigrudYefPYASUL8v59cuH/k="}}