diff --git a/README.md b/README.md index cc416e67..93bc15e9 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,10 @@ Argon 使用 [GPL V3.0](https://github.com/solstice23/argon-theme/blob/master/LI # 更新日志 +## 20200308 v0.873 ++ 优化侧栏的搜索体验 ++ 修复 Safari 上的渲染问题 + ## 20200306 v0.872 + 修复 Safari 上的一系列显示问题 + 修复点击导航栏时高度跳动的 BUG @@ -69,7 +73,7 @@ Argon 使用 [GPL V3.0](https://github.com/solstice23/argon-theme/blob/master/LI + BUG 修复 ## 20200306 v0.870 -+ 优化搜索体验,将搜索框嵌入导航栏中,同时搜索支持 Pjax ++ 优化顶栏搜索体验,将搜索框嵌入导航栏中,同时搜索支持 Pjax + 增加首页文章和说说同时显示的选项 + 修复 Safari 上的一个性能问题 + 增加评论禁用 Markdown 选项 diff --git a/argontheme.js b/argontheme.js index b2164520..17169dbe 100644 --- a/argontheme.js +++ b/argontheme.js @@ -77,11 +77,36 @@ $(document).on("keydown" , "#navbar_search_input_container #navbar_search_input" } let word = $(this).val(); if (word == ""){ + $("#navbar_search_input_container").blur(); return; } let scrolltop = $(document).scrollTop(); pjaxLoadUrl("/?s=" + encodeURI(word) , true , 0 , scrolltop); }); +/*侧栏搜索*/ +$(document).on("click" , "#leftbar_search_container" , function(){ + $(".leftbar-search-button").addClass("open"); + $("#leftbar_search_input").removeAttr("readonly").focus(); + $("#leftbar_search_input").focus(); + return false; +}); +$(document).on("blur" , "#leftbar_search_container" , function(){ + $(".leftbar-search-button").removeClass("open"); + $("#leftbar_search_input").attr("readonly", "readonly"); +}); +$(document).on("keydown" , "#leftbar_search_input" , function(e){ + if (e.keyCode != 13){ + return; + } + let word = $(this).val(); + if (word == ""){ + $("#leftbar_search_container").blur(); + return; + } + $("html").removeClass("leftbar-opened"); + let scrolltop = $(document).scrollTop(); + pjaxLoadUrl("/?s=" + encodeURI(word) , true , 0 , scrolltop); +}); /*左侧栏随页面滚动浮动*/ !function(){ diff --git a/header.php b/header.php index f4d39151..ffc82949 100644 --- a/header.php +++ b/header.php @@ -234,7 +234,7 @@ public function end_el( &$output, $object, $depth = 0, $args = array(), $current
- + diff --git a/info.json b/info.json index 661163c1..5c920eff 100644 --- a/info.json +++ b/info.json @@ -1,5 +1,5 @@ { - "version" : "0.872", + "version" : "0.873", "details_url" : "https://github.com/solstice23/argon-theme/releases", - "download_url" : "https://github.com/solstice23/argon-theme/releases/download/v0.872/argon.zip" + "download_url" : "https://github.com/solstice23/argon-theme/releases/download/v0.873/argon.zip" } diff --git a/sidebar.php b/sidebar.php index fe66e7c2..4db9eee0 100644 --- a/sidebar.php +++ b/sidebar.php @@ -47,7 +47,10 @@ public function end_el( &$output, $object, $depth = 0, $args = array(), $current echo ""; ?>
- +