Skip to content

Commit 7e78728

Browse files
committed
Layout update
1 parent 2f485dc commit 7e78728

File tree

17 files changed

+50
-883
lines changed

17 files changed

+50
-883
lines changed

src/BlazorBootstrap.Examples/BlazorBootstrap.Examples/App.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Router AppAssembly="@typeof(App).Assembly">
22
<Found Context="routeData">
33
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
4-
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
4+
@*<FocusOnNavigate RouteData="@routeData" Selector="h1" />*@
55
</Found>
66
<NotFound>
77
<PageTitle>Not found</PageTitle>

src/BlazorBootstrap.Examples/BlazorBootstrap.Examples/BlazorBootstrap.Examples.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10+
<PackageReference Include="Blazor.Bootstrap" Version="1.6.0" />
1011
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.4" />
1112
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.4" PrivateAssets="all" />
1213
</ItemGroup>
1314

15+
<ItemGroup>
16+
<Folder Include="wwwroot\css\" />
17+
</ItemGroup>
18+
1419
</Project>

src/BlazorBootstrap.Examples/BlazorBootstrap.Examples/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using BlazorBootstrap;
12
using BlazorBootstrap.Examples;
23
using Microsoft.AspNetCore.Components.Web;
34
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
@@ -7,5 +8,6 @@
78
builder.RootComponents.Add<HeadOutlet>("head::after");
89

910
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
11+
builder.Services.AddBlazorBootstrap();
1012

1113
await builder.Build().RunAsync();
Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,47 @@
11
@inherits LayoutComponentBase
22

3-
<div class="page">
4-
<div class="sidebar">
5-
<NavMenu />
6-
</div>
3+
<div class="bb-page">
4+
5+
<Sidebar @ref="sidebar"
6+
IconName="IconName.BootstrapFill"
7+
Title="Blazor Bootstrap"
8+
DataProvider="SidebarDataProvider" />
79

810
<main>
9-
<div class="top-row px-4">
11+
<div class="bb-top-row px-4 d-flex justify-content-end">
1012
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
1113
</div>
1214

1315
<article class="content px-4">
14-
@Body
16+
<div class="py-2">
17+
@Body
18+
</div>
1519
</article>
1620
</main>
21+
1722
</div>
23+
24+
@code {
25+
Sidebar sidebar;
26+
IEnumerable<NavItem> navItems;
27+
28+
private async Task<SidebarDataProviderResult> SidebarDataProvider(SidebarDataProviderRequest request)
29+
{
30+
if (navItems is null)
31+
navItems = GetNavItems();
32+
33+
return await Task.FromResult(request.ApplyTo(navItems));
34+
}
35+
36+
private IEnumerable<NavItem> GetNavItems()
37+
{
38+
navItems = new List<NavItem>
39+
{
40+
new NavItem { Id = "1", Href = "/", IconName = IconName.HouseDoorFill, Text = "Home", Match=NavLinkMatch.All},
41+
new NavItem { Id = "2", Href = "/counter", IconName = IconName.PlusSquareFill, Text = "Counter"},
42+
new NavItem { Id = "3", Href = "/fetchdata", IconName = IconName.Table, Text = "Fetch Data"},
43+
};
44+
45+
return navItems;
46+
}
47+
}

src/BlazorBootstrap.Examples/BlazorBootstrap.Examples/wwwroot/css/app.css

Lines changed: 0 additions & 101 deletions
This file was deleted.

src/BlazorBootstrap.Examples/BlazorBootstrap.Examples/wwwroot/css/bootstrap/bootstrap.min.css

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/BlazorBootstrap.Examples/BlazorBootstrap.Examples/wwwroot/css/bootstrap/bootstrap.min.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/BlazorBootstrap.Examples/BlazorBootstrap.Examples/wwwroot/css/open-iconic/FONT-LICENSE

Lines changed: 0 additions & 86 deletions
This file was deleted.

src/BlazorBootstrap.Examples/BlazorBootstrap.Examples/wwwroot/css/open-iconic/ICON-LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)