mirror of
https://gitee.com/LongbowEnterprise/BootstrapBlazor.git
synced 2024-11-29 18:49:08 +08:00
!1629 doc(#I42B4N): refactor introduction page
* refactor: 增加 cs 文件 * doc: 更新资源文件内容
This commit is contained in:
parent
343a37e2e0
commit
53ecc3867d
@ -338,7 +338,7 @@
|
||||
"ProjectsShow": "Gllery",
|
||||
"P5": "The largest code hosting collaborative development platform in China <b><a href='https://gitee.com/LongbowEnterprise/BootstrapBlazor' target='_blank'>Gitee</a></b> C# The highest star in the sector <a href='https://gitee.com/dotnetchina/BootstrapAdmin/stargazers'><img src='https://gitee.com/dotnetchina/BootstrapAdmin/badge/star.svg?theme=gvp' alt='star' style='margin-bottom',: '1px;' ></a> Works <b><a href='https://gitee.com/dotnetchina/BootstrapAdmin' target=''_blank'>Universal background management system BootstrapAdmin</a></b> Ready to use this component to achieve all functions",
|
||||
"ShowWebSiteTitle": "Demo Site",
|
||||
"Getstarted": "Get Started",
|
||||
"GetStarted": "Get Started",
|
||||
"QuikStart": "Quick Start",
|
||||
"Features": "Features of Components",
|
||||
"P6": "The Bootstrap Blazor UI component library provides everything from basic <code>Button</code> components to advanced web-level <code>SmartPage</code> components",
|
||||
@ -348,7 +348,7 @@
|
||||
"AdvantageLi3": "The component supports two-way data binding",
|
||||
"AdvantageLi4": "Components support automatic client verification",
|
||||
"AdvantageLi5": "Component support combination",
|
||||
"ExchangeGroup": "Exchange group"
|
||||
"Community": "Community"
|
||||
},
|
||||
"BootstrapBlazor.Shared.Pages.Components.QQGroup": {
|
||||
"Group": "QQ Group",
|
||||
|
@ -338,7 +338,7 @@
|
||||
"ProjectsShow": "作品展示",
|
||||
"P5": "国内最大代码托管协作开发平台 <b><a href='https://gitee.com/LongbowEnterprise/BootstrapBlazor' target='_blank'>码云</a></b> C# 板块最高星 <a href='https://gitee.com/dotnetchina/BootstrapAdmin/stargazers'><img src='https://gitee.com/dotnetchina/BootstrapAdmin/badge/star.svg?theme=gvp' alt='star' style='margin-bottom',: '1px;' ></a> 作品 <b><a href='https://gitee.com/dotnetchina/BootstrapAdmin' target=''_blank'>通用后台管理系统 BootstrapAdmin</a></b> 准备使用本组件实现全部功能",
|
||||
"ShowWebSiteTitle": "演示网站",
|
||||
"Getstarted": "快速上手",
|
||||
"GetStarted": "快速上手",
|
||||
"QuikStart": "快速入门",
|
||||
"Features": "组件特色",
|
||||
"P6": "Bootstrap Blazor UI 组件库提供了从基本的 <code>Button</code> 组件到高级的网页级 <code>SmartPage</code> 组件",
|
||||
@ -348,7 +348,7 @@
|
||||
"AdvantageLi3": "组件支持数据双向绑定",
|
||||
"AdvantageLi4": "组件支持自动客户端验证",
|
||||
"AdvantageLi5": "组件支持组合",
|
||||
"ExchangeGroup": "交流群"
|
||||
"Community": "交流群"
|
||||
},
|
||||
"BootstrapBlazor.Shared.Pages.Components.QQGroup": {
|
||||
"Group": "QQ群",
|
||||
|
@ -1,97 +1,72 @@
|
||||
@page "/docs"
|
||||
@page "/introduction"
|
||||
@inject IOptions<WebsiteOptions> WebsiteOption
|
||||
@inject IStringLocalizer<Introduction> L
|
||||
@implements IAsyncDisposable
|
||||
|
||||
<h3>@L["Title"]</h3>
|
||||
<h3>@Localizer["Title"]</h3>
|
||||
|
||||
<p></p>
|
||||
|
||||
<p>@L["P1"]</p>
|
||||
<p>@Localizer["P1"]</p>
|
||||
|
||||
<p>@L["P2"]</p>
|
||||
<p>@Localizer["P2"]</p>
|
||||
|
||||
<p>@((MarkupString)L["P3"].Value)</p>
|
||||
<p>@((MarkupString)Localizer["P3"].Value)</p>
|
||||
|
||||
<h3>@L["UpdateTitle"]</h3>
|
||||
<h3>@Localizer["UpdateTitle"]</h3>
|
||||
|
||||
<p>@((MarkupString)L["P4"].Value)</p>
|
||||
<p>@((MarkupString)Localizer["P4"].Value)</p>
|
||||
|
||||
<h3>@L["LearnTitle"]</h3>
|
||||
<h3>@Localizer["LearnTitle"]</h3>
|
||||
|
||||
<ul class="ul-demo mt-3">
|
||||
<li><a href="https://docs.microsoft.com/zh-cn/aspnet/core/blazor/?WT.mc_id=DT-MVP-5004174" target="_blank">@L["LearnLi1"]</a></li>
|
||||
<li><a href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/?WT.mc_id=DT-MVP-5004174" target="_blank">@L["LearnLi2"]</a></li>
|
||||
<li><a href="https://docs.microsoft.com/zh-cn/aspnet/core/blazor/?WT.mc_id=DT-MVP-5004174" target="_blank">@Localizer["LearnLi1"]</a></li>
|
||||
<li><a href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/?WT.mc_id=DT-MVP-5004174" target="_blank">@Localizer["LearnLi2"]</a></li>
|
||||
<li class="learn-item">
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/2-understand-blazor-webassembly?WT.mc_id=DT-MVP-5004174">@L["LearnLi3"]</a>
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/2-understand-blazor-webassembly?WT.mc_id=DT-MVP-5004174">@Localizer["LearnLi3"]</a>
|
||||
</li>
|
||||
<li class="learn-item">
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/3-exercise-configure-enviromnent?WT.mc_id=DT-MVP-5004174">@L["LearnLi4"]</a>
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/3-exercise-configure-enviromnent?WT.mc_id=DT-MVP-5004174">@Localizer["LearnLi4"]</a>
|
||||
</li>
|
||||
<li class="learn-item">
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/4-blazor-components?WT.mc_id=DT-MVP-5004174">@L["LearnLi5"]</a>
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/4-blazor-components?WT.mc_id=DT-MVP-5004174">@Localizer["LearnLi5"]</a>
|
||||
</li>
|
||||
<li class="learn-item">
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/5-exercise-add-component?WT.mc_id=DT-MVP-5004174">@L["Learn6"]</a>
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/5-exercise-add-component?WT.mc_id=DT-MVP-5004174">@Localizer["Learn6"]</a>
|
||||
</li>
|
||||
<li class="learn-item">
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/6-csharp-razor-binding?WT.mc_id=DT-MVP-5004174">@L["LeanrnLi7"]</a>
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/6-csharp-razor-binding?WT.mc_id=DT-MVP-5004174">@Localizer["LeanrnLi7"]</a>
|
||||
</li>
|
||||
<li class="learn-item">
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/7-exercise-razor-binding?WT.mc_id=DT-MVP-5004174">@L["LearnLi8"]</a>
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/7-exercise-razor-binding?WT.mc_id=DT-MVP-5004174">@Localizer["LearnLi8"]</a>
|
||||
</li>
|
||||
<li class="learn-item">
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/8-summary?WT.mc_id=DT-MVP-5004174">@L["Summarize"]</a>
|
||||
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/8-summary?WT.mc_id=DT-MVP-5004174">@Localizer["Summarize"]</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>@L["ProjectsShow"]</h3>
|
||||
<h3>@Localizer["ProjectsShow"]</h3>
|
||||
|
||||
<p>@((MarkupString)L["P5"].Value)</p>
|
||||
<p>@((MarkupString)Localizer["P5"].Value)</p>
|
||||
|
||||
<p>@L["ShowWebSiteTitle"]:<a href="@($"{WebsiteOption.Value.AdminUrl}/Pages")" target="_blank">@WebsiteOption.Value.AdminUrl</a></p>
|
||||
<p>@Localizer["ShowWebSiteTitle"]:<a href="@($"{WebsiteOption.Value.AdminUrl}/Pages")" target="_blank">@WebsiteOption.Value.AdminUrl</a></p>
|
||||
|
||||
<h4>@L["Getstarted"]</h4>
|
||||
<h4>@Localizer["GetStarted"]</h4>
|
||||
|
||||
<p><a href="https://v5.bootcss.com/docs/getting-started/introduction/" target="_blank">Bootstrap @L["QuikStart"]</a></p>
|
||||
<p><a href="https://v5.bootcss.com/docs/getting-started/introduction/" target="_blank">Bootstrap @Localizer["QuikStart"]</a></p>
|
||||
|
||||
<h4>@L["Features"]</h4>
|
||||
<h4>@Localizer["Features"]</h4>
|
||||
|
||||
<p>@((MarkupString)L["P6"].Value)</p>
|
||||
<p>@((MarkupString)Localizer["P6"].Value)</p>
|
||||
|
||||
<p class="code-label">@L["Advantage"]</p>
|
||||
<p class="code-label">@Localizer["Advantage"]</p>
|
||||
|
||||
<ul>
|
||||
<li>@((MarkupString)L["AdvantageLi1"].Value)</li>
|
||||
<li>@((MarkupString)L["AdvantageLi2"].Value)</li>
|
||||
<li>@L["AdvantageLi3"]</li>
|
||||
<li>@L["AdvantageLi4"]</li>
|
||||
<li>@L["AdvantageLi5"]</li>
|
||||
<li>@((MarkupString)Localizer["AdvantageLi1"].Value)</li>
|
||||
<li>@((MarkupString)Localizer["AdvantageLi2"].Value)</li>
|
||||
<li>@Localizer["AdvantageLi3"]</li>
|
||||
<li>@Localizer["AdvantageLi4"]</li>
|
||||
<li>@Localizer["AdvantageLi5"]</li>
|
||||
</ul>
|
||||
|
||||
<p class="code-label">@L["ExchangeGroup"]</p>
|
||||
<p class="code-label">@Localizer["Community"]</p>
|
||||
|
||||
<QQGroup />
|
||||
|
||||
@code {
|
||||
[Inject]
|
||||
[NotNull]
|
||||
private IJSRuntime? JSRuntime { get; set; }
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
await base.OnAfterRenderAsync(firstRender);
|
||||
|
||||
if (firstRender)
|
||||
{
|
||||
await JSRuntime.InvokeVoidAsync("$.bb_open");
|
||||
}
|
||||
}
|
||||
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
await JSRuntime.InvokeVoidAsync("$.bb_open", "dispose");
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
63
src/BootstrapBlazor.Shared/Pages/Introduction.razor.cs
Normal file
63
src/BootstrapBlazor.Shared/Pages/Introduction.razor.cs
Normal file
@ -0,0 +1,63 @@
|
||||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
// Website: https://www.blazor.zone or https://argozhang.github.io/
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.JSInterop;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BootstrapBlazor.Shared.Pages
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public partial class Introduction : IAsyncDisposable
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Inject]
|
||||
[NotNull]
|
||||
private IOptions<WebsiteOptions>? WebsiteOption { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Inject]
|
||||
[NotNull]
|
||||
private IStringLocalizer<Introduction>? Localizer { get; set; }
|
||||
|
||||
[Inject]
|
||||
[NotNull]
|
||||
private IJSRuntime? JSRuntime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="firstRender"></param>
|
||||
/// <returns></returns>
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
await base.OnAfterRenderAsync(firstRender);
|
||||
|
||||
if (firstRender)
|
||||
{
|
||||
await JSRuntime.InvokeVoidAsync("$.bb_open");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
await JSRuntime.InvokeVoidAsync("$.bb_open", "dispose");
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user