Skip to content

Commit 28c177f

Browse files
authored
update template projects to AntDesign 0.8.4 (#88)
* update template projects to AntDesign 0.8.4 * fix missing namespace * add FooterRender
1 parent 7898da3 commit 28c177f

File tree

6 files changed

+75
-17
lines changed

6 files changed

+75
-17
lines changed

.template.config/templates/hosted/src/Client/AntDesign.Pro.Template.Client.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<ItemGroup>
88
<PackageReference Include="AntDesign.Charts" Version="0.2.1" />
9-
<PackageReference Include="AntDesign.ProLayout" Version="0.1.0-nightly-210513142421" />
9+
<PackageReference Include="AntDesign.ProLayout" Version="0.1.0-nightly-210714165658" />
1010
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0" />
1111
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0" PrivateAssets="all" />
1212
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" />

.template.config/templates/server/AntDesign.Pro.Template.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<ItemGroup>
88
<PackageReference Include="AntDesign.Charts" Version="0.2.1" />
9-
<PackageReference Include="AntDesign.ProLayout" Version="0.1.0-nightly-210513142421" />
9+
<PackageReference Include="AntDesign.ProLayout" Version="0.1.0-nightly-210714165658" />
1010
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
1111
</ItemGroup>
1212

.template.config/templates/server/Layouts/BasicLayout.razor

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
<ChildContent>
1111
@Body
1212
</ChildContent>
13+
<FooterRender>
14+
<FooterView Copyright="2021 Ant Design Blazor" Links="Links"></FooterView>
15+
</FooterRender>
1316
</AntDesign.ProLayout.BasicLayout>
1417
<SettingDrawer />
1518

@@ -25,16 +28,42 @@
2528
await base.OnInitializedAsync();
2629
_menuData = await HttpClient.GetFromJsonAsync<MenuDataItem[]>("data/menu.json");
2730
}
31+
2832
//#else
2933
private readonly MenuDataItem[] _menuData =
3034
{
31-
new MenuDataItem
32-
{
33-
Path = "/",
34-
Name = "welcome",
35-
Key = "welcome",
36-
Icon = "smile",
37-
}
35+
new MenuDataItem
36+
{
37+
Path = "/",
38+
Name = "welcome",
39+
Key = "welcome",
40+
Icon = "smile",
41+
}
3842
};
3943
//#endif
44+
45+
public LinkItem[] Links { get; set; } =
46+
{
47+
new LinkItem
48+
{
49+
Key = "Ant Design Blazor",
50+
Title = "Ant Design Blazor",
51+
Href = "https://antblazor.com",
52+
BlankTarget = true,
53+
},
54+
new LinkItem
55+
{
56+
Key = "github",
57+
Title = (RenderFragment)(@<Icon Type="github" />),
58+
Href = "https://github.com/ant-design-blazor/ant-design-pro-blazor",
59+
BlankTarget = true,
60+
},
61+
new LinkItem
62+
{
63+
Key = "Blazor",
64+
Title = "Blazor",
65+
Href = "https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor?WT.mc_id=DT-MVP-5003987",
66+
BlankTarget = true,
67+
}
68+
};
4069
}

.template.config/templates/wasm/AntDesign.Pro.Template.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<ItemGroup>
99
<PackageReference Include="AntDesign.Charts" Version="0.2.1" />
10-
<PackageReference Include="AntDesign.ProLayout" Version="0.1.0-nightly-210513142421" />
10+
<PackageReference Include="AntDesign.ProLayout" Version="0.1.0-nightly-210714165658" />
1111
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0" />
1212
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0" PrivateAssets="all" />
1313
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" />

.template.config/templates/wasm/Layouts/BasicLayout.razor

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
<ChildContent>
1111
@Body
1212
</ChildContent>
13+
<FooterRender>
14+
<FooterView Copyright="2021 Ant Design Blazor" Links="Links"></FooterView>
15+
</FooterRender>
1316
</AntDesign.ProLayout.BasicLayout>
1417
<SettingDrawer />
1518

@@ -28,13 +31,38 @@
2831
//#else
2932
private readonly MenuDataItem[] _menuData =
3033
{
31-
new MenuDataItem
32-
{
33-
Path = "/",
34-
Name = "welcome",
35-
Key = "welcome",
36-
Icon = "smile",
37-
}
34+
new MenuDataItem
35+
{
36+
Path = "/",
37+
Name = "welcome",
38+
Key = "welcome",
39+
Icon = "smile",
40+
}
3841
};
3942
//#endif
43+
44+
public LinkItem[] Links { get; set; } =
45+
{
46+
new LinkItem
47+
{
48+
Key = "Ant Design Blazor",
49+
Title = "Ant Design Blazor",
50+
Href = "https://antblazor.com",
51+
BlankTarget = true,
52+
},
53+
new LinkItem
54+
{
55+
Key = "github",
56+
Title = (RenderFragment)(@<Icon Type="github" />),
57+
Href = "https://github.com/ant-design-blazor/ant-design-pro-blazor",
58+
BlankTarget = true,
59+
},
60+
new LinkItem
61+
{
62+
Key = "Blazor",
63+
Title = "Blazor",
64+
Href = "https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor?WT.mc_id=DT-MVP-5003987",
65+
BlankTarget = true,
66+
}
67+
};
4068
}

src/AntDesign.Pro/Components/GlobalHeader/RightContent.razor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Collections.Generic;
66
using System.Linq;
77
using System.Threading.Tasks;
8+
using AntDesign;
89

910
namespace AntDesign.Pro.Template.Components
1011
{

0 commit comments

Comments
 (0)