2020-07-26 19:20:16 +08:00
|
|
|
|
|
2022-05-15 12:46:07 +08:00
|
|
|
|
<div id="search-box">
|
|
|
|
|
<div id="docsearch"></div>
|
2020-07-26 19:20:16 +08:00
|
|
|
|
</div>
|
2022-05-15 12:46:07 +08:00
|
|
|
|
|
2020-12-18 16:00:51 +08:00
|
|
|
|
<Menu Mode="@(IsMobile?MenuMode.Inline: MenuMode.Horizontal)" Id="nav" Class="menu-site">
|
|
|
|
|
@foreach (var item in _menuItems.OrderBy(x => x.Order))
|
2020-07-26 19:20:16 +08:00
|
|
|
|
{
|
|
|
|
|
<MenuItem Class="ant-menu-item-only-child" Key="@item.Url" RouterLink="@($"{CurrentLanguage}/{item.Url}")" RouterMatch="NavLinkMatch.Prefix">
|
|
|
|
|
<span>@item.Title</span>
|
|
|
|
|
</MenuItem>
|
2020-12-18 16:00:51 +08:00
|
|
|
|
}
|
|
|
|
|
@if (IsMobile)
|
|
|
|
|
{
|
|
|
|
|
<MenuItem><a href="https://github.com/ant-design-blazor/ant-design-blazor">Github</a></MenuItem>
|
|
|
|
|
|
|
|
|
|
@if (CurrentLanguage != "en-US")
|
|
|
|
|
{
|
|
|
|
|
<MenuItem Class="header-button header-lang-button" OnClick="@(_ => ChangeLanguage("en-US"))">English</MenuItem>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<MenuItem Class="header-button header-lang-button" OnClick="@(_ => ChangeLanguage("zh-CN"))">简体中文</MenuItem>
|
|
|
|
|
}
|
2021-03-12 17:02:11 +08:00
|
|
|
|
@if (Direction?.ToUpperInvariant() != "RTL")
|
|
|
|
|
{
|
|
|
|
|
<MenuItem Class="header-button" OnClick="@(()=>ConfigProvider?.ChangeDirection("rtl"))">RTL</MenuItem>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<MenuItem Class="header-button" OnClick="@(()=>ConfigProvider?.ChangeDirection("ltr"))">LTR</MenuItem>
|
|
|
|
|
}
|
2020-12-18 16:00:51 +08:00
|
|
|
|
}
|
2020-07-26 19:20:16 +08:00
|
|
|
|
</Menu>
|
|
|
|
|
|
2020-12-18 16:00:51 +08:00
|
|
|
|
@if (!IsMobile)
|
2020-07-26 19:20:16 +08:00
|
|
|
|
{
|
2021-02-06 19:27:48 +08:00
|
|
|
|
<Button Class="header-button" Size="small">{version}</Button>
|
|
|
|
|
|
2020-12-18 16:00:51 +08:00
|
|
|
|
@if (CurrentLanguage != "en-US")
|
|
|
|
|
{
|
|
|
|
|
<Button Class="header-button header-lang-button" Size="small" OnClick="@(_ => ChangeLanguage("en-US"))">English</Button>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<Button Class="header-button header-lang-button" Size="small" OnClick="@(_ => ChangeLanguage("zh-CN"))">简体中文</Button>
|
|
|
|
|
}
|
2020-07-26 19:20:16 +08:00
|
|
|
|
|
2021-03-12 17:02:11 +08:00
|
|
|
|
@if (Direction?.ToUpperInvariant() != "RTL")
|
|
|
|
|
{
|
|
|
|
|
<Button Class="header-button" Size="small" OnClick="@(()=>ConfigProvider?.ChangeDirection("rtl"))">RTL</Button>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<Button Class="header-button" Size="small" OnClick="@(()=>ConfigProvider?.ChangeDirection("ltr"))">LTR</Button>
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-18 16:00:51 +08:00
|
|
|
|
<GithubButton />
|
2020-07-26 19:20:16 +08:00
|
|
|
|
|
2020-12-18 16:00:51 +08:00
|
|
|
|
}
|