Skip to content

Commit

Permalink
update template projects to AntDesign 0.8.4 (#88)
Browse files Browse the repository at this point in the history
* update template projects to AntDesign 0.8.4

* fix missing namespace

* add FooterRender
  • Loading branch information
ElderJames authored Jul 15, 2021
1 parent 7898da3 commit 28c177f
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<ItemGroup>
<PackageReference Include="AntDesign.Charts" Version="0.2.1" />
<PackageReference Include="AntDesign.ProLayout" Version="0.1.0-nightly-210513142421" />
<PackageReference Include="AntDesign.ProLayout" Version="0.1.0-nightly-210714165658" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<ItemGroup>
<PackageReference Include="AntDesign.Charts" Version="0.2.1" />
<PackageReference Include="AntDesign.ProLayout" Version="0.1.0-nightly-210513142421" />
<PackageReference Include="AntDesign.ProLayout" Version="0.1.0-nightly-210714165658" />
<PackageReference Include="System.Net.Http.Json" Version="5.0.0" />
</ItemGroup>

Expand Down
43 changes: 36 additions & 7 deletions .template.config/templates/server/Layouts/BasicLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<ChildContent>
@Body
</ChildContent>
<FooterRender>
<FooterView Copyright="2021 Ant Design Blazor" Links="Links"></FooterView>
</FooterRender>
</AntDesign.ProLayout.BasicLayout>
<SettingDrawer />

Expand All @@ -25,16 +28,42 @@
await base.OnInitializedAsync();
_menuData = await HttpClient.GetFromJsonAsync<MenuDataItem[]>("data/menu.json");
}

//#else
private readonly MenuDataItem[] _menuData =
{
new MenuDataItem
{
Path = "/",
Name = "welcome",
Key = "welcome",
Icon = "smile",
}
new MenuDataItem
{
Path = "/",
Name = "welcome",
Key = "welcome",
Icon = "smile",
}
};
//#endif
public LinkItem[] Links { get; set; } =
{
new LinkItem
{
Key = "Ant Design Blazor",
Title = "Ant Design Blazor",
Href = "https://antblazor.com",
BlankTarget = true,
},
new LinkItem
{
Key = "github",
Title = (RenderFragment)(@<Icon Type="github" />),
Href = "https://github.com/ant-design-blazor/ant-design-pro-blazor",
BlankTarget = true,
},
new LinkItem
{
Key = "Blazor",
Title = "Blazor",
Href = "https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor?WT.mc_id=DT-MVP-5003987",
BlankTarget = true,
}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<ItemGroup>
<PackageReference Include="AntDesign.Charts" Version="0.2.1" />
<PackageReference Include="AntDesign.ProLayout" Version="0.1.0-nightly-210513142421" />
<PackageReference Include="AntDesign.ProLayout" Version="0.1.0-nightly-210714165658" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" />
Expand Down
42 changes: 35 additions & 7 deletions .template.config/templates/wasm/Layouts/BasicLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<ChildContent>
@Body
</ChildContent>
<FooterRender>
<FooterView Copyright="2021 Ant Design Blazor" Links="Links"></FooterView>
</FooterRender>
</AntDesign.ProLayout.BasicLayout>
<SettingDrawer />

Expand All @@ -28,13 +31,38 @@
//#else
private readonly MenuDataItem[] _menuData =
{
new MenuDataItem
{
Path = "/",
Name = "welcome",
Key = "welcome",
Icon = "smile",
}
new MenuDataItem
{
Path = "/",
Name = "welcome",
Key = "welcome",
Icon = "smile",
}
};
//#endif
public LinkItem[] Links { get; set; } =
{
new LinkItem
{
Key = "Ant Design Blazor",
Title = "Ant Design Blazor",
Href = "https://antblazor.com",
BlankTarget = true,
},
new LinkItem
{
Key = "github",
Title = (RenderFragment)(@<Icon Type="github" />),
Href = "https://github.com/ant-design-blazor/ant-design-pro-blazor",
BlankTarget = true,
},
new LinkItem
{
Key = "Blazor",
Title = "Blazor",
Href = "https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor?WT.mc_id=DT-MVP-5003987",
BlankTarget = true,
}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AntDesign;

namespace AntDesign.Pro.Template.Components
{
Expand Down

0 comments on commit 28c177f

Please sign in to comment.