Skip to content

Commit 4769b7b

Browse files
committed
chore: clean up css
1 parent b1d2d26 commit 4769b7b

File tree

2 files changed

+10
-24
lines changed

2 files changed

+10
-24
lines changed

lib/default-theme/AlgoliaSearchBox.vue

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@
88
export default {
99
props: ['options'],
1010
mounted () {
11+
console.log(this.options)
1112
Promise.all([
1213
import(/* webpackChunkName: "docsearch" */ 'docsearch.js/dist/cdn/docsearch.min.js'),
1314
import(/* webpackChunkName: "docsearch" */ 'docsearch.js/dist/cdn/docsearch.min.css')
1415
]).then(([docsearch]) => {
1516
docsearch = docsearch.default
1617
docsearch(Object.assign(this.options, {
17-
inputSelector: '#algolia-search-input',
18-
autocompleteOptions: {
19-
openOnFocus: true
20-
}
18+
inputSelector: '#algolia-search-input'
2119
}))
2220
})
2321
}
@@ -27,24 +25,11 @@ export default {
2725
<style lang="stylus">
2826
@import './styles/config.styl'
2927
30-
// TODO align with styles/config.styl
31-
$border = #ddd
32-
$dark = #2c3e50
33-
$medium = #34495e
34-
$light = #7f8c8d
35-
$green = #42b983
36-
$border = #dddddd
37-
$codebg = #f8f8f8
38-
$red = #ff6666
39-
$info = #1C90F3
40-
4128
.algolia-search-wrapper
4229
& > span
4330
vertical-align middle
4431
.algolia-autocomplete
4532
line-height normal
46-
& > input:first-child
47-
display none
4833
.ds-dropdown-menu
4934
background-color #fff
5035
border 1px solid #999
@@ -61,16 +46,16 @@ $info = #1C90F3
6146
.ds-suggestions
6247
margin-top 0
6348
.ds-suggestion
64-
border-bottom 1px solid $border
49+
border-bottom 1px solid $borderColor
6550
.algolia-docsearch-suggestion--highlight
6651
color #2c815b
6752
.algolia-docsearch-suggestion
68-
border-color $border
53+
border-color $borderColor
6954
padding 0
7055
.algolia-docsearch-suggestion--category-header
7156
padding 5px 10px
7257
margin-top 0
73-
background $green
58+
background $accentColor
7459
color #fff
7560
font-weight 600
7661
.algolia-docsearch-suggestion--highlight
@@ -80,21 +65,21 @@ $info = #1C90F3
8065
.algolia-docsearch-suggestion--title
8166
font-weight 600
8267
margin-bottom 0
83-
color $dark
68+
color $textColor
8469
.algolia-docsearch-suggestion--subcategory-column
8570
vertical-align top
8671
padding 5px 7px 5px 5px
87-
border-color $border
72+
border-color $borderColor
8873
background #f1f3f5
8974
&:after
9075
display none
9176
.algolia-docsearch-suggestion--subcategory-column-text
9277
color #555
9378
.algolia-docsearch-footer
94-
border-color $border
79+
border-color $borderColor
9580
.ds-cursor .algolia-docsearch-suggestion--content
9681
background-color #e7edf3!important
97-
color $dark
82+
color $textColor
9883
9984
@media (min-width: $MQMobile)
10085
.algolia-search-wrapper

lib/default-theme/Navbar.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default {
3333
return algolia && algolia.appId && algolia.apiKey && algolia.indexName
3434
},
3535
isSearch() {
36+
console.log(this.isAlgoliaSearch)
3637
return !this.isAlgoliaSearch && this.$site.themeConfig.search !== false
3738
}
3839
}

0 commit comments

Comments
 (0)