fix: search

This commit is contained in:
shenyu 2019-12-19 21:20:41 +08:00
parent 951d8585d1
commit 3e1c63f5bd
3 changed files with 9 additions and 12 deletions

View File

@ -30,12 +30,4 @@
img img
width logo-size width logo-size
// Media Query
@media (max-width: 768px)
.navbar
.nav
.nav-item-link
&.nav-item-search
display: none

View File

@ -16,7 +16,7 @@
position relative position relative
margin 0 auto margin 0 auto
padding 1rem 3rem padding 1rem 3rem
background-color rgba(255,255,255,.5) background-color rgba(body-color,.9)
box-shadow 0 1rem 3rem rgba(sea, .05) box-shadow 0 1rem 3rem rgba(sea, .05)
max-height 100vh max-height 100vh
overflow-y auto overflow-y auto
@ -65,12 +65,17 @@
font-size 1.6rem font-size 1.6rem
font-weight bold font-weight bold
.search-result .search-result
color white
padding-top .5rem padding-top .5rem
margin 0 margin 0
max-height 12rem max-height 12rem
overflow hidden overflow hidden
em.search-keyword em.search-keyword
color sand font-style normal
color link-color
.search-result-empty .search-result-empty
padding 3rem 0 0 padding 2.6rem 0 0
color white
p
text-align center

View File

@ -57,7 +57,7 @@
// //
// 建议在移动端不初始化,其实 /search.xml 文件还挺大的, // 建议在移动端不初始化,其实 /search.xml 文件还挺大的,
if ($('.local-search').size() && !isMobile.any()) { if ($('.local-search').size()) {
$.getScript('/js/search.js', function () { $.getScript('/js/search.js', function () {
searchFunc("/search.xml", 'local-search-input', 'local-search-result'); searchFunc("/search.xml", 'local-search-input', 'local-search-result');
}); });