From 7aa3fb261bcf755f4f74f39c64eeb73cc543c57a Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Sat, 28 Nov 2020 01:49:52 +0900 Subject: [PATCH] refactor: asjust few styling of algolia search box --- docs/.vitepress/config.js | 11 +- src/client/theme-default/Layout.vue | 7 -- .../components/AlgoliaSearchBox.vue | 103 ++++++++++-------- src/client/theme-default/styles/layout.css | 4 + src/client/theme-default/styles/vars.css | 6 +- 5 files changed, 68 insertions(+), 63 deletions(-) diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 970cec81..16075dd0 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -11,18 +11,17 @@ module.exports = { editLinkText: 'Edit this page on GitHub', lastUpdated: 'Last Updated', + algolia: { + apiKey: 'c57105e511faa5558547599f120ceeba', + indexName: 'vitepress' + }, + carbonAds: { carbon: 'CEBDT27Y', custom: 'CKYD62QM', placement: 'vuejsorg' }, - algolia: { - apiKey: 'c57105e511faa5558547599f120ceeba', - indexName: 'vitepress' - // algoliaOptions: { facetFilters: ['tags:guide,api'] } - }, - nav: [ { text: 'Guide', link: '/' }, { text: 'Config Reference', link: '/config/basics' }, diff --git a/src/client/theme-default/Layout.vue b/src/client/theme-default/Layout.vue index f5a388e0..3aa7661c 100644 --- a/src/client/theme-default/Layout.vue +++ b/src/client/theme-default/Layout.vue @@ -131,10 +131,3 @@ watch(route, hideSidebar) // TODO: route only changes when the pathname changes // listening to hashchange does nothing because it's prevented in router - - diff --git a/src/client/theme-default/components/AlgoliaSearchBox.vue b/src/client/theme-default/components/AlgoliaSearchBox.vue index f63cd450..9d37cb1e 100644 --- a/src/client/theme-default/components/AlgoliaSearchBox.vue +++ b/src/client/theme-default/components/AlgoliaSearchBox.vue @@ -1,5 +1,5 @@ diff --git a/src/client/theme-default/styles/layout.css b/src/client/theme-default/styles/layout.css index 2c7c1743..e6eea406 100644 --- a/src/client/theme-default/styles/layout.css +++ b/src/client/theme-default/styles/layout.css @@ -195,6 +195,10 @@ blockquote > p { margin: 0; } +form { + margin: 0; +} + .theme { font-size: 16px; color: var(--c-text); diff --git a/src/client/theme-default/styles/vars.css b/src/client/theme-default/styles/vars.css index 0ab144c9..7ee3882a 100644 --- a/src/client/theme-default/styles/vars.css +++ b/src/client/theme-default/styles/vars.css @@ -26,8 +26,10 @@ --font-family-mono: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; /** - * Z Indexes Algolia SearchBox has a z-index of 200, so make sure not to go - * above that value. + * Z Indexes + * + * Algolia SearchBox has a z-index of 200, so make sure not to go above + * that value. * --------------------------------------------------------------------- */ --z-index-navbar: 10;