Skip to content

Commit

Permalink
style: corrected subheader display in search
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobinstein committed Apr 9, 2024
1 parent 08e86fd commit 04fa1ff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions docs/src/.vuepress/theme/components/SearchModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<a :href="s.path" @click.prevent>
<span class="page-title">{{ s.title || s.path }}</span>
<span v-if="s.header" class="header"
>&gt; {{ s.header.title }}</span
>&gt; {{ s.header }}</span
>
</a>
</li>
Expand Down Expand Up @@ -105,8 +105,8 @@ export default {
this.suggestions = results.map((result) => {
return {
title: result.title,
path: result.path,
header: result.header,
path: result.path + result.slug,
header: result.headingStr,
};
});
},
Expand Down Expand Up @@ -221,6 +221,13 @@ input:focus
outline none
.suggestion:hover
color: var(--AccentColor)
a
color: var(--AccentColor)
span
color: var(--AccentColor)
.search-modal
position fixed
top 0
Expand Down Expand Up @@ -274,6 +281,8 @@ input:focus
background-color var(--LineColor)
border 1px solid var(--AccentColor) !important
cursor pointer
span
color var(--AccentColor)
.search-modal-content li:last-child
border-bottom none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {
// here you choose the fields you want to index.
// for me I will search in the title and the content of each page.
// of course I stripped the content before so I use the plain text content not the markdown text
field: ['title', 'headersStr', 'content'],
field: ['title', 'header', 'headersStr', 'content'],
},
}
index = new Flexsearch(indexSettings)
Expand Down

0 comments on commit 04fa1ff

Please sign in to comment.