From 8d345d62cc0f7c230939d591b74a9f47969f3768 Mon Sep 17 00:00:00 2001 From: Oleg Belyaev Date: Sat, 22 Mar 2025 12:22:14 +0300 Subject: [PATCH 1/2] fixed sidebar collapse --- static/abaev.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/abaev.js b/static/abaev.js index 636c7d3..01cae1b 100644 --- a/static/abaev.js +++ b/static/abaev.js @@ -69,8 +69,8 @@ $( document ).ready(function() { // $("#leftbar")[0].style.paddingLeft = "10px"; $("main")[0].style.marginLeft = "250px"; - $("header")[0].style.marginLeft = "250px"; - $("footer")[0].style.marginLeft = "250px"; + $("header nav")[0].style.marginLeft = "250px"; + $("footer nav")[0].style.marginLeft = "250px"; $("#open-leftbar").hide(); $("#close-leftbar").show(); @@ -82,8 +82,8 @@ $( document ).ready(function() { $("#leftbar").hide(); // $("#leftbar")[0].style.paddingLeft = null; $("main")[0].style.marginLeft = null; - $("header")[0].style.marginLeft = null; - $("footer")[0].style.marginLeft = null; + $("header nav")[0].style.marginLeft = null; + $("footer nav")[0].style.marginLeft = null; $("#open-leftbar").show(); $("#close-leftbar").hide(); }) From d0da75869ed127738428e75d6f53250dbb098db2 Mon Sep 17 00:00:00 2001 From: Oleg Belyaev Date: Sat, 22 Mar 2025 15:27:47 +0300 Subject: [PATCH 2/2] optimize search --- static/abaev-html.css | 5 +++++ static/abaev.js | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/static/abaev-html.css b/static/abaev-html.css index 3ed2840..3de1717 100644 --- a/static/abaev-html.css +++ b/static/abaev-html.css @@ -115,6 +115,11 @@ nav#entrylist { padding-left: 10px; } +nav li.abv-menu-re { + filter: grayscale(100%); + filter: gray; +} + main {} article.abv-entry { diff --git a/static/abaev.js b/static/abaev.js index 01cae1b..405a589 100644 --- a/static/abaev.js +++ b/static/abaev.js @@ -91,11 +91,14 @@ $( document ).ready(function() { // Quick filter functionality $('#filter-entries').on("keyup", function () { var value = $(this).val().toLowerCase(); - if (value.length > 1) { - $("#entrylist > ul > li").filter(function () { - return $(this).toggle($(this).children('a').text().toLowerCase().indexOf(value) > -1) + if (value.length > 0) { + $("#entrylist > ul > li:not([hidden])").filter(function () { + return $(this).toggle($(this).children('a').text().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").startsWith(value)) }); } + else { + $("#entrylist > ul > li").show(); + } return false; });