Skip to content

Commit

Permalink
update: instance search page add common navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
shanjingheng committed Sep 5, 2024
1 parent 176b5f3 commit e25626e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/.vuepress/components/Navbar.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup>
import Sidebar from 'vuepress-theme-hope/modules/navbar/components/Navbar.js'
import Navbar from 'vuepress-theme-hope/modules/navbar/components/Navbar.js'
import { useThemeLocaleData } from 'vuepress-theme-hope/composables/index'
const themeData = useThemeLocaleData()
const extraNavList = themeData.value.extra_nav || []
</script>

<template>
<Sidebar>
<Navbar>
<template #endBefore>
<Docsearch />
<el-link
Expand All @@ -19,7 +19,7 @@ const extraNavList = themeData.value.extra_nav || []
>{{ item.text }}
</el-link>
</template>
</Sidebar>
</Navbar>
</template>

<style scope></style>
15 changes: 11 additions & 4 deletions docs/.vuepress/layouts/InstanceSearchLayout.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<template>
<navbar />
<ClientOnly>
<ais-instant-search
index-name="im-beta-easemob"
:search-client="searchClient"
:initial-ui-state="initialUiState"
>
<ais-configure
:hitsPerPage="8"
:hitsPerPage="6"
:maxValuesPerFacet="22"
:attributesToSnippet="[
'hierarchy.lvl1:20',
Expand Down Expand Up @@ -62,12 +63,15 @@
</template>

<script>
import Navbar from '../components/Navbar.vue'
import { liteClient } from 'algoliasearch/lite'
import { useRoute } from 'vue-router'
export default {
name: 'InstanceSearchLayout',
components: {
Navbar
},
data() {
return {
searchClient: liteClient(
Expand All @@ -94,9 +98,12 @@ export default {
</script>

<style>
body {
height: 100%;
}
.searchBoxContainer {
max-width: 1280px;
margin: 1em auto;
max-width: 1080px;
margin: 75px auto 20px;
display: flex;
font-family: sans-serif;
padding: 1em;
Expand Down

0 comments on commit e25626e

Please sign in to comment.