add theme
This commit is contained in:
93
themes/butterfly/source/css/_search/algolia.styl
Normal file
93
themes/butterfly/source/css/_search/algolia.styl
Normal file
@@ -0,0 +1,93 @@
|
||||
#algolia-search
|
||||
.search-dialog
|
||||
.ais-SearchBox
|
||||
input
|
||||
padding: 5px 14px
|
||||
width: 100%
|
||||
outline: none
|
||||
border: 2px solid $search-color
|
||||
border-radius: 40px
|
||||
background: var(--search-bg)
|
||||
color: var(--search-input-color)
|
||||
|
||||
.ais-SearchBox-loadingIndicator
|
||||
position: absolute
|
||||
top: 18px
|
||||
left: 67px
|
||||
|
||||
.ais-Hits-list
|
||||
margin: 0
|
||||
padding: 0
|
||||
@extend .list-beauty
|
||||
|
||||
a
|
||||
color: var(--search-a-color)
|
||||
|
||||
&:hover
|
||||
color: $search-color
|
||||
|
||||
mark
|
||||
background: transparent
|
||||
color: $search-keyword-highlight
|
||||
font-weight: bold
|
||||
|
||||
.algolia-hits-item-title
|
||||
font-weight: 600
|
||||
|
||||
.algolia-hit-item-content
|
||||
margin: 0 0 8px
|
||||
word-break: break-word
|
||||
|
||||
.ais-Pagination
|
||||
margin: 15px 0 0
|
||||
padding: 0
|
||||
text-align: center
|
||||
|
||||
.ais-Pagination-list
|
||||
margin: 0
|
||||
padding: 0
|
||||
list-style: none
|
||||
|
||||
.ais-Pagination-item
|
||||
display: inline
|
||||
margin: 0 4px
|
||||
padding: 0
|
||||
|
||||
.ais-Pagination-link
|
||||
display: inline-block
|
||||
min-width: 24px
|
||||
height: 24px
|
||||
text-align: center
|
||||
line-height: 24px
|
||||
addBorderRadius()
|
||||
|
||||
.ais-Pagination-item--selected
|
||||
a
|
||||
background: $theme-paginator-color
|
||||
color: #eee
|
||||
cursor: default
|
||||
|
||||
.ais-Pagination-item--disabled
|
||||
visibility: hidden
|
||||
|
||||
#algolia-hits
|
||||
> div
|
||||
overflow-y: overlay
|
||||
margin: 0 -20px
|
||||
padding: 0 22px
|
||||
max-height: calc(80vh - 220px)
|
||||
|
||||
+maxWidth768()
|
||||
max-height: none
|
||||
height: calc(var(--search-height) - 235px)
|
||||
|
||||
#algolia-info
|
||||
div
|
||||
display: inline
|
||||
|
||||
.algolia-poweredBy
|
||||
float: right
|
||||
vertical-align: text-top
|
||||
|
||||
svg
|
||||
height: 1.1em
|
||||
56
themes/butterfly/source/css/_search/index.styl
Normal file
56
themes/butterfly/source/css/_search/index.styl
Normal file
@@ -0,0 +1,56 @@
|
||||
.search-dialog
|
||||
position: fixed
|
||||
top: 10%
|
||||
left: 50%
|
||||
z-index: 1001
|
||||
display: none
|
||||
margin-left: -300px
|
||||
padding: 20px
|
||||
width: 600px
|
||||
background: var(--search-bg)
|
||||
--search-height: 100vh
|
||||
addBorderRadius(8)
|
||||
|
||||
+maxWidth768()
|
||||
top: 0
|
||||
left: 0
|
||||
margin: 0
|
||||
width: 100%
|
||||
height: 100%
|
||||
border-radius: 0
|
||||
|
||||
.search-nav
|
||||
margin: 0 0 14px
|
||||
color: $search-color
|
||||
font-size: 1.4em
|
||||
line-height: 1
|
||||
|
||||
.search-dialog-title
|
||||
margin-right: 10px
|
||||
|
||||
.search-close-button
|
||||
float: right
|
||||
color: $grey
|
||||
transition: color .2s ease-in-out
|
||||
|
||||
&:hover
|
||||
color: $search-color
|
||||
|
||||
hr
|
||||
margin: 15px auto
|
||||
@extend .custom-hr
|
||||
|
||||
#search-mask
|
||||
position: fixed
|
||||
top: 0
|
||||
right: 0
|
||||
bottom: 0
|
||||
left: 0
|
||||
z-index: 1000
|
||||
display: none
|
||||
background: rgba($dark-black, .6)
|
||||
|
||||
if hexo-config('search.use') == 'algolia_search'
|
||||
@require 'algolia'
|
||||
else if hexo-config('search.use') == 'local_search'
|
||||
@require 'local-search'
|
||||
57
themes/butterfly/source/css/_search/local-search.styl
Normal file
57
themes/butterfly/source/css/_search/local-search.styl
Normal file
@@ -0,0 +1,57 @@
|
||||
#local-search
|
||||
.search-dialog
|
||||
.local-search-box
|
||||
margin: 0 auto
|
||||
max-width: 100%
|
||||
width: 100%
|
||||
|
||||
input
|
||||
padding: 5px 14px
|
||||
width: 100%
|
||||
outline: none
|
||||
border: 2px solid $search-color
|
||||
border-radius: 40px
|
||||
background: var(--search-bg)
|
||||
color: var(--search-input-color)
|
||||
-webkit-appearance: none
|
||||
|
||||
.search-wrap
|
||||
display: none
|
||||
|
||||
.local-search-hit-item
|
||||
margin-left: 24px
|
||||
padding-left: 3px
|
||||
line-height: 1.8
|
||||
|
||||
&::marker
|
||||
color: $search-color
|
||||
font-weight: bold
|
||||
font-style: italic
|
||||
|
||||
a
|
||||
color: var(--search-a-color)
|
||||
|
||||
&:hover
|
||||
color: $search-color
|
||||
|
||||
.search-result-title
|
||||
font-weight: 600
|
||||
|
||||
.search-result
|
||||
margin: 0 0 8px
|
||||
word-break: break-all
|
||||
font-size: .9em
|
||||
|
||||
.search-result-list
|
||||
overflow-y: overlay
|
||||
margin: 0 -20px
|
||||
padding: 0 22px
|
||||
max-height: calc(80vh - 180px)
|
||||
|
||||
+maxWidth768()
|
||||
max-height: calc(var(--search-height) - 190px) !important
|
||||
|
||||
.search-keyword
|
||||
background: transparent
|
||||
color: $search-keyword-highlight
|
||||
font-weight: 600
|
||||
Reference in New Issue
Block a user