1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-23 16:13:05 +00:00

refactor: simplify basic layout (#1039)

A dynamically expanding/collapsing topbar is difficult to maintain and not very useful.
This commit is contained in:
Cotes Chung
2023-05-17 01:59:34 +08:00
committed by GitHub
parent 52f5ee9cd3
commit d81f836b06
11 changed files with 26 additions and 294 deletions

View File

@@ -4,7 +4,7 @@
const $btnSbTrigger = $('#sidebar-trigger');
const $btnSearchTrigger = $('#search-trigger');
const $btnCancel = $('#search-cancel');
const $main = $('#main');
const $content = $('#main>.row');
const $topbarTitle = $('#topbar-title');
const $searchWrapper = $('#search-wrapper');
const $resultWrapper = $('#search-result-wrapper');
@@ -58,7 +58,7 @@ class ResultSwitch {
// the block method must be called before $(#main) unloaded.
ScrollBlocker.on();
$resultWrapper.removeClass(C_UNLOADED);
$main.addClass(C_UNLOADED);
$content.addClass(C_UNLOADED);
ScrollBlocker.resultVisible = true;
}
}
@@ -70,7 +70,7 @@ class ResultSwitch {
$hints.removeClass(C_UNLOADED);
}
$resultWrapper.addClass(C_UNLOADED);
$main.removeClass(C_UNLOADED);
$content.removeClass(C_UNLOADED);
// now the release method must be called after $(#main) display
ScrollBlocker.off();