Skip to content

Commit 981fd03

Browse files
authored
feat(FluentSystemIcons): add microsoft fluent free icon set (#6483)
* doc: 增加多语言资源文件 * feat: 增加样式加载 * doc: 增加示例 * doc: 更新示例 * chore: 更新依赖 9.0.1 版本 * doc: 增加微软图标菜单 * doc: 更新文档 * doc: 更新注释文档 * doc: 更新文档
1 parent 29f1e95 commit 981fd03

File tree

6 files changed

+71
-0
lines changed

6 files changed

+71
-0
lines changed

src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<PackageReference Include="BootstrapBlazor.DriverJs" Version="9.0.3" />
3838
<PackageReference Include="BootstrapBlazor.ElementIcon" Version="9.0.3" />
3939
<PackageReference Include="BootstrapBlazor.FileViewer" Version="9.0.0" />
40+
<PackageReference Include="BootstrapBlazor.FluentSystemIcon" Version="9.0.1" />
4041
<PackageReference Include="BootstrapBlazor.FontAwesome" Version="9.1.0" />
4142
<PackageReference Include="BootstrapBlazor.Gantt" Version="9.0.2" />
4243
<PackageReference Include="BootstrapBlazor.Holiday" Version="9.0.1" />
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@page "/fluent-icon"
2+
@inject IStringLocalizer<FluentSystemIcons> Localizer
3+
4+
<HeadContent>
5+
<link rel="stylesheet" href="@Assets["_content/BootstrapBlazor.FluentSystemIcon/FluentSystemIcons-Regular.css"]" />
6+
</HeadContent>
7+
8+
<h3>@Localizer["Title"]</h3>
9+
10+
<h4>@((MarkupString)Localizer["BaseUsageText"].Value)</h4>
11+
12+
<PackageTips Name="BootstrapBlazor.FluentSystemIcon" />
13+
14+
<Tips class="mt-3">
15+
<div>@Localizer["P1"] <a href="https://www.nuget.org/packages/BootstrapBlazor.FluentSystemIcon/" target="_blank">BootstrapBlazor.FluentSystemIcon</a> @Localizer["P2"]</div>
16+
</Tips>
17+
18+
<Pre>&lt;link href="_content/BootstrapBlazor.FluentSystemIcon/FluentSystemIcons-Regular.css" rel="stylesheet"&gt;</Pre>
19+
20+
<ul class="ul-demo">
21+
<li>Filled: FluentSystemIcons-Filled.css</li>
22+
<li>Light: FluentSystemIcons-Light.css</li>
23+
<li>Regular: FluentSystemIcons-Regular.css</li>
24+
<li>Resizable: FluentSystemIcons-Resizable.css</li>
25+
</ul>
26+
27+
<p class="code-label">注意:四种类型的图标库必须独立使用,不可以一起引用使用会冲突导致最终显示的图标不是你想要的图标</p>
28+
29+
<div class="mb-2" style="font-size: 1.2em;">
30+
<i class="icon-ic_fluent_clipboard_search_24_regular"></i>
31+
</div>
32+
33+
<Pre>&lt;i class="icon-ic_fluent_clipboard_search_24_regular"&gt;&lt;/i&gt;</Pre>
34+
35+
<div>@((MarkupString)Localizer["Icons"].Value)</div>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the Apache 2.0 License
3+
// See the LICENSE file in the project root for more information.
4+
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone
5+
6+
namespace BootstrapBlazor.Server.Components.Samples.Icons;
7+
8+
/// <summary>
9+
/// 微软 Fluent UI 图标库
10+
/// </summary>
11+
public partial class FluentSystemIcons
12+
{
13+
14+
}

src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,6 +1675,11 @@ void AddIcons(DemoMenuItem item)
16751675
Url = "md-icon"
16761676
},
16771677
new()
1678+
{
1679+
Text = Localizer["FluentSystemIcon"],
1680+
Url = "fluent-icon"
1681+
},
1682+
new()
16781683
{
16791684
Text = Localizer["OctIcon"],
16801685
Url = "oct-icon"

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4809,6 +4809,7 @@
48094809
"BootstrapIcon": "Bootstrap Icons",
48104810
"MaterialIcon": "Material Icons",
48114811
"ElementIcon": "Element Icon",
4812+
"FluentSystemIcon": "Fluent Icons",
48124813
"DrawerService": "DrawerService",
48134814
"SortableList": "SortableList",
48144815
"WinBox": "WinBox",
@@ -6734,6 +6735,13 @@
67346735
"P1": "Extending the Component Package by Reference",
67356736
"P2": "After adding the stylesheet file link open icon"
67366737
},
6738+
"BootstrapBlazor.Server.Components.Samples.Icons.FluentSystemIcons": {
6739+
"Title": "Fluent System Icons",
6740+
"BaseUsageText": "Microsoft Free Open Source Icon Library",
6741+
"Icons": "For icon list, please visit <a href=\"https://react.fluentui.dev/?path=/docs/icons-catalog--docs\" target=\"_blank\">[portal]</a>",
6742+
"P1": "Extending the Component Package by Reference",
6743+
"P2": "After adding the stylesheet file link open icon"
6744+
},
67376745
"BootstrapBlazor.Server.Components.Samples.Icons.ElementIcon.ElementIcons": {
67386746
"ElementIconTitle": "Element-plus Icons",
67396747
"ElementIconDescription": "Free, high quality, open source icon library",

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4808,6 +4808,7 @@
48084808
"Icons": "内置图标",
48094809
"BootstrapIcon": "Bootstrap Icons",
48104810
"MaterialIcon": "Material Icons",
4811+
"FluentSystemIcon": "Fluent Icons",
48114812
"ElementIcon": "饿了么图标 ElementIcon",
48124813
"DrawerService": "抽屉服务 DrawerService",
48134814
"SortableList": "拖拽组件 SortableList",
@@ -6734,6 +6735,13 @@
67346735
"P1": "通过引用扩展组件包",
67356736
"P2": "后添加样式表文件链接开启图标"
67366737
},
6738+
"BootstrapBlazor.Server.Components.Samples.Icons.FluentSystemIcons": {
6739+
"Title": "Fluent System Icons",
6740+
"BaseUsageText": "Microsoft 免费开源图标库",
6741+
"Icons": "图标列表请通过 <a href=\"https://react.fluentui.dev/?path=/docs/icons-catalog--docs\" target=\"_blank\">[传送门]</a> 查看",
6742+
"P1": "通过引用扩展组件包",
6743+
"P2": "后添加样式表文件链接开启图标"
6744+
},
67376745
"BootstrapBlazor.Server.Components.Samples.Icons.ElementIcon.ElementIcons": {
67386746
"ElementIconTitle": "饿了么图标库",
67396747
"ElementIconDescription": "饿了么免费开源图标库",

0 commit comments

Comments
 (0)