mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 05:27:37 +08:00
4d905cc4fa
* docs: update docsearch 3 * fix hit conent style
51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
<header id="header" class="clearfix @(IsHome?"home-header":"")">
|
|
<Row Style="flex-flow: nowrap; height: 64px;" OnBreakpoint="OnBreakpoint">
|
|
<GridCol Xs="24" Sm="24" Md="6" Lg="6" Xl="5" Xxl="4">
|
|
<h1>
|
|
<a id="logo" href="/">
|
|
<img alt="logo" src="/docs/assets/logo.svg">Ant Design Blazor
|
|
</a>
|
|
</h1>
|
|
</GridCol>
|
|
@if (_isMobile)
|
|
{
|
|
<Dropdown Placement="Placement.BottomRight" Trigger="new[] { Trigger.Click }">
|
|
<Overlay>
|
|
<HeaderMenu IsMobile />
|
|
</Overlay>
|
|
<ChildContent>
|
|
<Icon Type="unordered-list" Class="nav-phone-icon" />
|
|
</ChildContent>
|
|
</Dropdown>
|
|
}
|
|
@if (!_isMobile)
|
|
{
|
|
<GridCol Class="menu-row" Xs="0" Sm="0" Md="18" Lg="18" Xl="19" Xxl="20">
|
|
<HeaderMenu IsMobile="false" />
|
|
</GridCol>
|
|
}
|
|
</Row>
|
|
</header>
|
|
|
|
@code {
|
|
public bool _isMobile;
|
|
|
|
[Parameter] public bool IsHome { get; set; }
|
|
|
|
[Parameter] public EventCallback<bool> OnMobileModeChanged { get; set; }
|
|
|
|
private void OnBreakpoint(BreakpointType breakpoint)
|
|
{
|
|
_isMobile = breakpoint.IsIn(BreakpointType.Sm, BreakpointType.Xs, BreakpointType.Md);
|
|
if (OnMobileModeChanged.HasDelegate)
|
|
{
|
|
OnMobileModeChanged.InvokeAsync(_isMobile);
|
|
}
|
|
}
|
|
}
|
|
|
|
<style>
|
|
.DocSearch-Hit-content-wrapper {
|
|
overflow: hidden;
|
|
}
|
|
</style> |