From 83581c60b48535cd576bafc3c0828daa684576ab Mon Sep 17 00:00:00 2001 From: Pl4gue Date: Sat, 23 Dec 2017 00:48:17 +0100 Subject: [PATCH 1/5] Fix "last category stays visible even if empty" issue --- static-parts/index-start.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/static-parts/index-start.html b/static-parts/index-start.html index f6c71b064..85453e042 100644 --- a/static-parts/index-start.html +++ b/static-parts/index-start.html @@ -17,9 +17,16 @@ From 95e5181b2dfeb45f958468cdaf122727cf2397cf Mon Sep 17 00:00:00 2001 From: Pl4gue Date: Sat, 23 Dec 2017 00:50:21 +0100 Subject: [PATCH 2/5] build --- docs/index.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/index.html b/docs/index.html index dc8296a8e..376e2e906 100644 --- a/docs/index.html +++ b/docs/index.html @@ -17,9 +17,16 @@ From 71b42ba401fa123f34f3949ad11594e848c35e08 Mon Sep 17 00:00:00 2001 From: Pl4gue Date: Sat, 23 Dec 2017 15:39:38 +0100 Subject: [PATCH 3/5] Shorten js --- static-parts/index-start.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static-parts/index-start.html b/static-parts/index-start.html index 85453e042..af187b141 100644 --- a/static-parts/index-start.html +++ b/static-parts/index-start.html @@ -20,9 +20,9 @@ Array.from(node.parentElement.parentElement.getElementsByTagName('a')).forEach(x => { x.style.display = x.getAttribute("href").toUpperCase().indexOf(node.value.toUpperCase()) + 1 ? '' : 'none' }); - var remove = false, childs = Array.from(node.parentElement.parentElement.children), toRemove = childs[0]; - Array.from(node.parentElement.parentElement.children).forEach((x, idx) => { - idx === Array.from(node.parentElement.parentElement.children).length -1 ? + var remove = false, toRemove = Array.from(node.parentElement.parentElement.children)[0]; + Array.from(node.parentElement.parentElement.children).forEach((x, idx, array) => { + idx === array.length -1 ? toRemove.style.display = (remove ? 'none' : '') : x.tagName == 'H3' ? (toRemove.style.display = (remove ? 'none' : ''), toRemove = x, remove = true) : (x.style.display == '' ? remove = false : remove=remove) From 8586e6ef7d92303d421b40914a7e6dc8c98efb9f Mon Sep 17 00:00:00 2001 From: Pl4gue Date: Sat, 23 Dec 2017 15:48:20 +0100 Subject: [PATCH 4/5] optimize search & hiding category headers --- static-parts/index-start.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/static-parts/index-start.html b/static-parts/index-start.html index af187b141..f76b1d2af 100644 --- a/static-parts/index-start.html +++ b/static-parts/index-start.html @@ -17,16 +17,20 @@ From bbd5b986f8c5bec4fb0bb57f9e9e9df5c549c830 Mon Sep 17 00:00:00 2001 From: Pl4gue Date: Sat, 23 Dec 2017 15:52:11 +0100 Subject: [PATCH 5/5] build --- docs/index.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/index.html b/docs/index.html index 7b3a62728..ee176bf7d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -17,16 +17,20 @@