Skip to content

Commit

Permalink
fix:example 搜索
Browse files Browse the repository at this point in the history
  • Loading branch information
Liboq committed Aug 4, 2023
1 parent f075677 commit c8ba70f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions themes/example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,14 @@ const LayoutIndex = props => {
const LayoutPostList = props => {
const { category, tag } = props
// 顶部如果是按照分类或标签查看文章列表,列表顶部嵌入一个横幅
// 如果是搜索,则列表顶部嵌入 搜索框
let slotTop = null
if (category) {
slotTop = <div className='pb-12'><i className="mr-1 fas fa-folder-open" />{category}</div>
} else if (tag) {
slotTop = <div className='pb-12'>#{tag}</div>
}else if(props.slotTop){
slotTop = props.slotTop
}
return (
<LayoutBase {...props} slotTop={slotTop}>
Expand Down

0 comments on commit c8ba70f

Please sign in to comment.