[opt] search css

This commit is contained in:
xaoxuu 2022-11-27 20:42:30 +08:00
parent 232aa4322e
commit 01aacad761
4 changed files with 29 additions and 9 deletions

View File

@ -25,7 +25,7 @@ sidebar:
# about: '[关于](/about/)'
# Sidebar widgets
widgets:
index: welcome, search, recent, timeline # for home/wiki/categories/tags/archives/404 pages
index: welcome, recent, search, timeline # for home/wiki/categories/tags/archives/404 pages
page: welcome, toc # for pages using 'layout:page'
post: toc, ghrepo, search, ghissues # for pages using 'layout:post'
wiki: search, ghrepo, toc, ghissues, related # for pages using 'layout:wiki'

View File

@ -1,5 +1,6 @@
.l_left nav.menu
margin-bottom: 1.5rem
.l_left
nav.menu
margin-bottom: 0
nav.menu
margin: 1rem 0

View File

@ -57,4 +57,4 @@
.widget-wrapper
display: block
margin: 1rem 0 2rem
margin: 2rem 0

View File

@ -14,10 +14,15 @@
box-shadow: $boxshadow-button
trans1 box-shadow
&:hover
box-shadow: 0 0 2px 0px alpha($color-theme, 0.2), 0 0 8px 0px alpha($color-theme, 0.2)
&:focus
box-shadow: 0 0 2px 0px alpha($color-theme, 0.4), 0 0 8px 0px alpha($color-theme, 0.4)
box-shadow: 0 0 2px 0px rgba(0, 0, 0, 0.16), 0 0 8px 0px rgba(0, 0, 0, 0.08)
&.noresult
.search-input
&:hover
box-shadow: 0 0 2px 0px alpha($c-red, 0.2), 0 0 8px 0px alpha($c-red, 0.2)
&:focus
box-shadow: 0 0 2px 0px alpha($c-red, 0.5), 0 0 8px 0px alpha($c-red, 0.4)
.search-no-result
display: none
margin: 1em auto
@ -67,4 +72,18 @@
.search-wrapper.noresult
.search-no-result
display: block
display: block
.widget-wrapper
.search-form
top: 0
background: var(--site-bg)
.search-input
margin-top: 1rem
margin-bottom: -1rem
#search-result,.search-no-result
margin-top: 2rem
.widget-wrapper:not(:first-child)
.search-wrapper
margin-top: -1rem