!1461 doc(#I3TZET): remove ms-learn link add update log

* style: update style for ms-lean element
* feat: 增加更新日志按钮
* chore: 减少时间间隔
* feat: 增加更新日志引导
* doc: 移除拖拽文字
* doc: 增加 Blazor 学习资料
* doc: 更改弹出窗所属分类
* feat: 增加 gitee 日志默认打开
* doc: update menu status
* chore: rename CI work name
This commit is contained in:
Argo 2021-06-02 12:09:08 +08:00
parent 44e203a8e3
commit 4d2519ba99
10 changed files with 126 additions and 48 deletions

View File

@ -1,4 +1,4 @@
name: Package to Nuget
name: Package Extensions to Nuget
on:
push:

View File

@ -54,6 +54,11 @@ namespace BootstrapBlazor.Shared
/// </summary>
public string RepositoryUrl { get; set; } = "https://gitee.com/LongbowEnterprise/BootstrapBlazor/raw/dev/src/BootstrapBlazor.Shared/Pages/Samples/";
/// <summary>
///
/// </summary>
public string WikiUrl { get; set; } = "https://gitee.com/LongbowEnterprise/BootstrapBlazor/wikis/Home";
/// <summary>
/// 获得 QQ 1 群链接地址
/// </summary>

View File

@ -1,6 +1,7 @@
@page "/docs"
@page "/introduction"
@inject IOptions<WebsiteOptions> WebsiteOption
@implements IAsyncDisposable
<h3>简介</h3>
@ -12,11 +13,39 @@
<p>最新 <a href="template" target="_blank">项目模板</a> 中将以上依赖进行了打包捆绑大大简化使用</p>
<h3>更新日志</h3>
<p>
本组件目前每天可能有 <b><code>beta</code></b> 版本发布,每 <b><code>周四</code></b> 发布 <b><code>正式版</code></b> 更新日志
<a id="log" data-toggle="popover" title="更新日志" data-content="本组件目前每天可能有 <b><code>beta</code></b> 版本发布,每 <b><code>周四</code></b> 发布 <b><code>正式版</code></b> 更新日志" data-html="true" href="@WebsiteOption.Value.WikiUrl" target="_blank">[传送门]</a>
</p>
<h3>学习资料</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">Blazor 官方文档</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">使用 Blazor WebAssembly 和 Visual Studio Code 生成 Web 应用</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">什么是 Blazor</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">练习 - 配置开发环境</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">Blazor 组件</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">练习 - 添加组件</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">数据绑定和事件</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">练习 - 数据绑定和事件</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">总结</a>
</li>
</ul>
<h3>作品展示</h3>
@ -44,4 +73,27 @@
</ul>
<p class="code-label">交流群</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);
}
}

View File

@ -2,7 +2,7 @@
<h3>Upload 上传</h3>
<h4>通过点击或者拖拽上传文件</h4>
<h4>通过点击上传文件</h4>
<Block Title="基本用法" Introduction="<code>InputUpload</code> 组件与其他表单组件一起使用,显示文件名称,点击 <b>浏览</b> 按钮后选择文件并上传;通过设置 <code>ShowRemoveButton</code> 参数,显示 <b>删除</b> 按钮,点击删除按钮时回调 <code>OnDelete</code> 委托方法">
<div class="form-inline">

View File

@ -43,35 +43,10 @@
@Body
<div class="ms-learn">
<ul class="learn-list">
<li class="learn-item">
<a target="_blank" href="https://docs.microsoft.com/zh-cn/learn/modules/build-blazor-webassembly-visual-studio-code/?WT.mc_id=DT-MVP-5004174">生成 Blazor Web 应用</a>
<a class="btn-close">Close</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">什么是 Blazor</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">练习 - 配置开发环境</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">Blazor 组件</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">练习 - 添加组件</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">数据绑定和事件</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">练习 - 数据绑定和事件</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">总结</a>
</li>
</ul>
<button type="button" class="btn-learn">微软 MVP 推荐课程</button>
<div class="ms-learn" data-toggle="tooltip" data-placement="left" title="点击查看更新日志" @ref="MsLearnElement">
<a href="@WebsiteOption.Value.WikiUrl" target="_blank">
<img src="_content/BootstrapBlazor.Shared/images/log.svg" />
</a>
</div>
<ThemeChooser />

View File

@ -16,6 +16,8 @@ namespace BootstrapBlazor.Shared.Shared
/// </summary>
public partial class BaseLayout
{
private ElementReference MsLearnElement { get; set; }
[Inject]
[NotNull]
private IStringLocalizer<BaseLayout>? Localizer { get; set; }
@ -50,7 +52,7 @@ namespace BootstrapBlazor.Shared.Shared
private static Action? OnInstallable { get; set; }
/// <summary>
///
/// OnInitialized 方法
/// </summary>
/// <returns></returns>
protected override void OnInitialized()
@ -69,6 +71,21 @@ namespace BootstrapBlazor.Shared.Shared
OnInstallable = () => InvokeAsync(StateHasChanged);
}
/// <summary>
/// OnAfterRenderAsync 方法
/// </summary>
/// <param name="firstRender"></param>
/// <returns></returns>
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await base.OnAfterRenderAsync(firstRender);
if (firstRender)
{
await JSRuntime.InvokeVoidAsync("$.bb_tooltip_site", MsLearnElement);
}
}
/// <summary>
///
/// </summary>

View File

@ -170,7 +170,6 @@ namespace BootstrapBlazor.Shared.Shared
},
new()
{
IsNew = true,
Text = Localizer["Labels"],
Url = "labels"
},
@ -266,7 +265,6 @@ namespace BootstrapBlazor.Shared.Shared
},
new()
{
IsUpdate = true,
Text = Localizer["MultiSelect"],
Url = "multiselects"
},
@ -318,7 +316,6 @@ namespace BootstrapBlazor.Shared.Shared
},
new()
{
IsUpdate = true,
Text = Localizer["ValidateForm"],
Url = "validateforms"
}
@ -389,7 +386,6 @@ namespace BootstrapBlazor.Shared.Shared
},
new()
{
IsNew = true,
Text = Localizer["Display"],
Url = "displays"
},
@ -419,11 +415,6 @@ namespace BootstrapBlazor.Shared.Shared
Url = "listviews"
},
new()
{
Text = Localizer["Popover"],
Url = "popovers"
},
new()
{
Text = Localizer["QRCode"],
Url = "qrcodes"
@ -446,13 +437,11 @@ namespace BootstrapBlazor.Shared.Shared
},
new()
{
IsNew = true,
Text = Localizer["Title"],
Url = "titles"
},
new()
{
IsNew = true,
Text = Localizer["Download"],
Url = "downloads"
},
@ -590,6 +579,7 @@ namespace BootstrapBlazor.Shared.Shared
},
new()
{
IsNew = true,
Text = Localizer["TableFooter"],
Url = "tables/footer"
},
@ -610,7 +600,6 @@ namespace BootstrapBlazor.Shared.Shared
},
new()
{
IsNew = true,
Text = Localizer["TableLaoding"],
Url = "tables/loading"
}
@ -669,6 +658,11 @@ namespace BootstrapBlazor.Shared.Shared
Url = "popconfirms"
},
new()
{
Text = Localizer["Popover"],
Url = "popovers"
},
new()
{
Text = Localizer["Progress"],
Url = "progresss"

View File

@ -1412,13 +1412,17 @@ section {
.ms-learn {
position: fixed;
bottom: 4rem;
background: #fff;
right: 1rem;
background: #8759ff;
box-shadow: 0 0 8px #211b50;
overflow: hidden;
border-radius: 5px;
border-radius: 50%;
z-index: 2000;
width: 260px;
right: calc(50% - 130px);
width: 40px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
}
.ms-learn:hover {
@ -1473,6 +1477,17 @@ section {
color: #fff;
}
.ms-learn a {
display: flex;
align-items: center;
justify-content: center;
}
.ms-learn img {
width: 55%;
margin-left: 2px;
}
@media (min-width: 768px) {
.ms-learn {
right: 1rem;
@ -1607,6 +1622,12 @@ section {
border: 1px solid #c0c4cc;
}
@media (max-width: 768px) {
.wwads-cn {
display: none;
}
}
.is-right .control-label {
text-align: right;
}

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1622604514977" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1211" width="64" height="64" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M583.161494 767.249267c18.518084 0 32.531769 14.514174 32.531769 32.531769s-14.514174 32.531769-32.531769 32.531769h-53.051809c26.525904 75.573803 100.097752 128.625611 185.68133 128.625611 79.577713 0 150.647116-47.045943 181.677419-120.117302 6.005865-16.516129 24.523949-22.521994 40.539589-16.516129 16.516129 6.005865 24.523949 24.523949 18.518085 40.53959-40.539589 95.593353-134.631476 159.155425-240.735093 159.155425-93.591398 0-181.677419-51.049853-228.222874-132.629521v36.535679c0 12.01173-6.005865 22.521994-16.516129 28.52786-10.009775 6.005865-22.521994 6.005865-32.53177 0s-16.516129-16.516129-16.516129-28.52786v-128.625611c0-8.00782 4.00391-16.516129 10.009776-22.521994 6.005865-6.005865 14.514174-10.009775 22.521994-10.009775h128.625611v0.500489zM161.24947 63.562072c-45.043988 0-83.581623 38.537634-83.581622 87.585533V868.848485c0 49.047898 38.537634 87.585533 83.581622 87.585533H344.428356c18.518084 0 34.533724 14.514174 34.533724 32.531769 0 18.518084-16.516129 32.531769-34.533724 32.531769H161.24947c-40.539589 0-79.577713-16.516129-108.105572-45.043988-28.527859-28.527859-45.043988-67.065494-45.043988-108.105572V151.147605c0-40.539589 16.516129-79.577713 45.043988-108.105572 28.527859-26.525904 67.065494-43.042033 108.105572-43.042033h472.961877c8.00782 0 16.516129 2.001955 22.521994 8.00782l234.729228 248.742913c8.00782 6.005865 12.01173 14.514174 12.01173 24.523949v175.171066c0 18.518084-16.516129 32.531769-34.533724 32.531769s-34.533724-14.514174-34.533725-32.531769V318.31085h-165.16129c-26.525904 0-36.535679-2.001955-53.051808-10.009775-22.521994-12.01173-32.531769-34.533724-34.533725-65.063538V63.562072h-420.410557z m552.53959 446.435973c91.589443 0 173.16911 47.045943 218.213098 118.115347v-22.521994c0-18.518084 14.514174-32.531769 32.53177-32.531769s32.531769 14.514174 32.531769 32.531769v128.625611c0 16.516129-10.009775 28.527859-26.525904 30.529814h-134.631476c-18.518084 0-32.531769-14.514174-32.53177-32.531769 0-18.518084 14.514174-32.531769 32.53177-32.53177h61.059628c-26.525904-75.573803-100.097752-128.625611-185.681329-128.62561-77.575758 0-146.643206 45.043988-179.675464 112.109481-4.00391 20.520039-22.521994 26.525904-38.537635 20.52004-16.516129-8.00782-22.521994-26.525904-16.516129-43.042034 43.542522-91.088954 137.13392-150.647116 237.231672-150.647116z m-417.908114 65.564027c18.518084 0 32.531769 14.514174 32.53177 32.53177 0 18.518084-14.514174 32.531769-32.53177 32.531769H167.255335c-18.518084 0-32.531769-14.514174-32.531769-32.531769 0-18.518084 14.514174-32.531769 32.531769-32.53177h128.625611z m191.687195-161.15738c18.518084 0 32.531769 14.514174 32.531769 32.531769 0 18.518084-14.514174 32.531769-32.531769 32.53177h-320.312806c-18.518084 0-32.531769-14.514174-32.531769-32.53177 0-18.518084 14.514174-32.531769 32.531769-32.531769h320.312806zM295.880946 255.249267c18.518084 0 32.531769 14.514174 32.53177 32.531769s-14.514174 32.531769-32.53177 32.531769H167.255335c-18.518084 0-32.531769-14.514174-32.531769-32.531769s14.514174-32.531769 32.531769-32.531769h128.625611z m350.342131-163.159335v144.641251c0 12.01173 2.001955 14.514174 2.001955 16.516129 2.001955 0 4.00391 2.001955 10.009775 2.001955h134.631476c0.500489 0-146.643206-163.159335-146.643206-163.159335z" p-id="1212" fill="#e6e6e6"></path></svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -204,6 +204,19 @@
$link.after('<link rel="stylesheet" href="' + css + '">')
}
}
},
bb_open: function (method) {
if (method === 'dispose') {
$('#log').popover(method);
}
else {
$('#log').popover({ delay: { 'show': 1000 } }).one('click', function () {
$(this).popover('toggle');
}).trigger('click');
}
},
bb_tooltip_site: function (el) {
$(el).tooltip();
}
});