fix: 回滚博客头部collapse结构

This commit is contained in:
sunlei 2026-07-01 14:51:01 +08:00
parent ce4a35dbd4
commit bc261f56b8
3 changed files with 68 additions and 48 deletions

View File

@ -126,7 +126,7 @@ describe('App', () => {
expect(wrapper.text()).toContain('KwiTsukasa的小站'); expect(wrapper.text()).toContain('KwiTsukasa的小站');
}); });
it('renders Argon header without the old collapse container', async () => { it('renders Argon header with the WordPress Argon collapse container', async () => {
await router.push('/'); await router.push('/');
await router.isReady(); await router.isReady();
@ -136,7 +136,7 @@ describe('App', () => {
}, },
}); });
expect(wrapper.find('.kt-blog__header-collapse').exists()).toBe(false); expect(wrapper.find('.kt-blog__header-collapse').exists()).toBe(true);
expect(wrapper.find('.kt-blog__header-nav').exists()).toBe(true); expect(wrapper.find('.kt-blog__header-nav').exists()).toBe(true);
}); });

View File

@ -88,6 +88,24 @@ export default defineComponent({
</RouterLink> </RouterLink>
</div> </div>
<div class="kt-blog__header-collapse">
<div class="kt-blog__header-collapse-head">
<div class="kt-blog__header-mobile-search">
<div class="kt-blog__input-group">
<div class="kt-blog__input-addon-wrap">
<span class="kt-blog__input-addon">
<SearchOutlined />
</span>
</div>
<BlogInput
class="kt-blog__header-mobile-search-input kt-blog__input"
placeholder="搜索什么..."
autocomplete="off"
/>
</div>
</div>
</div>
<ul class="kt-blog__header-nav kt-blog__header-nav--hover"> <ul class="kt-blog__header-nav kt-blog__header-nav--hover">
{siteConfig.value.headerMenu.map((item) => ( {siteConfig.value.headerMenu.map((item) => (
<li key={item.label} class="kt-blog__header-nav-item"> <li key={item.label} class="kt-blog__header-nav-item">
@ -145,6 +163,7 @@ export default defineComponent({
</div> </div>
</li> </li>
</ul> </ul>
</div>
<div class="kt-blog__header-menu-mask" /> <div class="kt-blog__header-menu-mask" />
<BlogButton <BlogButton

View File

@ -46,10 +46,11 @@
font-weight: 700; font-weight: 700;
} }
&__header-nav--hover { &__header-collapse {
display: flex; display: flex;
flex: 1; flex: 1;
align-items: center; align-items: center;
justify-content: space-between;
} }
&__header-nav { &__header-nav {