Skip to content

Commit 09a8570

Browse files
committed
Layout docs updated
1 parent 79cfa1b commit 09a8570

File tree

6 files changed

+125
-115
lines changed

6 files changed

+125
-115
lines changed

BlazorBootstrap.Demo.RCL/Components/Layout/MainLayout.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@namespace BlazorBootstrap.Demo.RCL
22
@inherits MainLayoutBase
33

4-
<BlazorBootstrapLayout HeaderSectionSticky="true">
4+
<BlazorBootstrapLayout StickyHeader="true">
55
<HeaderSection>
66
<div>
77
<a class="nav-link py-2 px-2" href="@githubUrl" target="_blank" rel="noopener">

BlazorBootstrap.Demo.RCL/Components/Pages/Layout/server/Layout_Server_Demo_01.razor

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
@inherits LayoutComponentBase
22

3-
<div class="bb-page">
4-
5-
<Sidebar @ref="sidebar"
6-
IconName="IconName.BootstrapFill"
7-
Title="Blazor Bootstrap"
8-
DataProvider="SidebarDataProvider" />
9-
10-
<main>
11-
<div class="bb-top-row px-4 d-flex justify-content-end">
12-
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
13-
</div>
14-
15-
<article class="content px-4">
16-
<div class="py-2">
17-
@Body
18-
</div>
19-
</article>
20-
</main>
21-
22-
</div>
3+
<BlazorBootstrapLayout StickyHeader="true">
4+
<HeaderSection>
5+
<ThemeSwitcher Class="ps-3 ps-lg-2" />
6+
</HeaderSection>
7+
8+
<SidebarSection>
9+
<Sidebar2 Href="/"
10+
ImageSrc="https://demos.blazorbootstrap.com/images/logo/logo-white.svg"
11+
Title="Blazor Bootstrap"
12+
BadgeText="3.3.1"
13+
DataProvider="Sidebar2DataProvider"
14+
WidthUnit="Unit.Px" />
15+
</SidebarSection>
16+
17+
<ContentSection>
18+
@Body
19+
</ContentSection>
20+
21+
<FooterSection>
22+
Footer links...
23+
</FooterSection>
24+
</BlazorBootstrapLayout>
2325

2426
@code {
25-
private Sidebar sidebar = default!;
2627
private IEnumerable<NavItem> navItems = default!;
2728

28-
private async Task<SidebarDataProviderResult> SidebarDataProvider(SidebarDataProviderRequest request)
29+
private async Task<Sidebar2DataProviderResult> Sidebar2DataProvider(Sidebar2DataProviderRequest request)
2930
{
3031
if (navItems is null)
3132
navItems = GetNavItems();
@@ -36,11 +37,11 @@
3637
private IEnumerable<NavItem> GetNavItems()
3738
{
3839
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-
};
40+
{
41+
new NavItem { Id = "1", Href = "/", IconName = IconName.HouseDoorFill, Text = "Home", Match=NavLinkMatch.All},
42+
new NavItem { Id = "2", Href = "/counter", IconName = IconName.PlusSquareFill, Text = "Counter"},
43+
new NavItem { Id = "3", Href = "/fetchdata", IconName = IconName.Table, Text = "Fetch Data"},
44+
};
4445

4546
return navItems;
4647
}

BlazorBootstrap.Demo.RCL/Components/Pages/Layout/webassembly/Layout_WebAssembly_Demo_01.razor

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
11
@inherits LayoutComponentBase
22

3-
<div class="bb-page">
4-
5-
<Sidebar @ref="sidebar"
6-
IconName="IconName.BootstrapFill"
7-
Title="Blazor Bootstrap"
8-
DataProvider="SidebarDataProvider" />
9-
10-
<main>
11-
<div class="bb-top-row px-4 d-flex justify-content-end">
12-
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
13-
</div>
14-
15-
<article class="content px-4">
16-
<div class="py-2">
17-
@Body
18-
</div>
19-
</article>
20-
</main>
21-
22-
</div>
3+
<BlazorBootstrapLayout StickyHeader="true">
4+
<HeaderSection>
5+
<ThemeSwitcher Class="ps-3 ps-lg-2" />
6+
</HeaderSection>
7+
8+
<SidebarSection>
9+
<Sidebar2 Href="/"
10+
ImageSrc="https://demos.blazorbootstrap.com/images/logo/logo-white.svg"
11+
Title="Blazor Bootstrap"
12+
BadgeText="3.3.1"
13+
DataProvider="Sidebar2DataProvider"
14+
WidthUnit="Unit.Px" />
15+
</SidebarSection>
16+
17+
<ContentSection>
18+
@Body
19+
</ContentSection>
20+
21+
<FooterSection>
22+
Footer links...
23+
</FooterSection>
24+
</BlazorBootstrapLayout>
2325

2426
@code {
25-
private Sidebar sidebar = default!;
2627
private IEnumerable<NavItem> navItems = default!;
2728

28-
private async Task<SidebarDataProviderResult> SidebarDataProvider(SidebarDataProviderRequest request)
29+
private async Task<Sidebar2DataProviderResult> Sidebar2DataProvider(Sidebar2DataProviderRequest request)
2930
{
3031
if (navItems is null)
3132
navItems = GetNavItems();

blazorbootstrap/Components/Layout/BlazorBootstrapLayout.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ public partial class BlazorBootstrapLayout : BlazorBootstrapLayoutComponentBase
2121
BuildClassNames(
2222
HeaderSectionCssClass,
2323
("bb-top-row", true),
24-
("bb-top-row-sticky", HeaderSectionSticky),
24+
("bb-top-row-sticky", StickyHeader),
2525
("px-4", true)
2626
);
2727

28-
[Parameter] public bool HeaderSectionSticky { get; set; }
28+
[Parameter] public bool StickyHeader { get; set; }
2929

3030
[Parameter] public RenderFragment? SidebarSection { get; set; }
3131

docs/docs/02-layout/getting-started-server.mdx

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Get started with the Enterprise-class Blazor Bootstrap Component library built o
1717

1818
Assuming you followed the getting started docs for the initial setup.
1919

20-
1. **Blazor WebAssembly Project:** Follow the [getting started](/getting-started/blazor-webassembly) steps for the initial setup.
21-
1. **Blazor Server Project:** Follow the [getting started](/getting-started/blazor-server) steps for the initial setup.
20+
1. **Blazor WebAssembly Project:** Follow the [getting started](/getting-started/blazor-webassembly-net-8) steps for the initial setup.
21+
1. **Blazor Server Project:** Follow the [getting started](/getting-started/blazor-webapp-server-global-net-8) steps for the initial setup.
2222

2323
## Steps
2424

@@ -31,33 +31,33 @@ Remove all the CSS content from the **Shared/MainLayout.razor.css** file.
3131
```cshtml {} showLineNumbers
3232
@inherits LayoutComponentBase
3333
34-
<div class="bb-page">
35-
36-
<Sidebar @ref="sidebar"
37-
Href="/"
38-
IconName="IconName.BootstrapFill"
39-
Title="Blazor Bootstrap"
40-
DataProvider="SidebarDataProvider" />
41-
42-
<main>
43-
<div class="bb-top-row px-4 d-flex justify-content-end">
44-
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
45-
</div>
46-
47-
<article class="content px-4">
48-
<div class="py-2">
49-
@Body
50-
</div>
51-
</article>
52-
</main>
53-
54-
</div>
34+
<BlazorBootstrapLayout StickyHeader="true">
35+
<HeaderSection>
36+
<ThemeSwitcher Class="ps-3 ps-lg-2" />
37+
</HeaderSection>
38+
39+
<SidebarSection>
40+
<Sidebar2 Href="/"
41+
ImageSrc="https://demos.blazorbootstrap.com/images/logo/logo-white.svg"
42+
Title="Blazor Bootstrap"
43+
BadgeText="3.3.1"
44+
DataProvider="Sidebar2DataProvider"
45+
WidthUnit="Unit.Px" />
46+
</SidebarSection>
47+
48+
<ContentSection>
49+
@Body
50+
</ContentSection>
51+
52+
<FooterSection>
53+
Footer links...
54+
</FooterSection>
55+
</BlazorBootstrapLayout>
5556
5657
@code {
57-
private Sidebar sidebar = default!;
5858
private IEnumerable<NavItem> navItems = default!;
5959
60-
private async Task<SidebarDataProviderResult> SidebarDataProvider(SidebarDataProviderRequest request)
60+
private async Task<Sidebar2DataProviderResult> Sidebar2DataProvider(Sidebar2DataProviderRequest request)
6161
{
6262
if (navItems is null)
6363
navItems = GetNavItems();
@@ -68,11 +68,11 @@ Remove all the CSS content from the **Shared/MainLayout.razor.css** file.
6868
private IEnumerable<NavItem> GetNavItems()
6969
{
7070
navItems = new List<NavItem>
71-
{
72-
new NavItem { Id = "1", Href = "/", IconName = IconName.HouseDoorFill, Text = "Home", Match=NavLinkMatch.All},
73-
new NavItem { Id = "2", Href = "/counter", IconName = IconName.PlusSquareFill, Text = "Counter"},
74-
new NavItem { Id = "3", Href = "/fetchdata", IconName = IconName.Table, Text = "Fetch Data"},
75-
};
71+
{
72+
new NavItem { Id = "1", Href = "/", IconName = IconName.HouseDoorFill, Text = "Home", Match=NavLinkMatch.All},
73+
new NavItem { Id = "2", Href = "/counter", IconName = IconName.PlusSquareFill, Text = "Counter"},
74+
new NavItem { Id = "3", Href = "/fetchdata", IconName = IconName.Table, Text = "Fetch Data"},
75+
};
7676
7777
return navItems;
7878
}
@@ -81,11 +81,9 @@ Remove all the CSS content from the **Shared/MainLayout.razor.css** file.
8181

8282
## Starter templates
8383

84-
### .NET 6
85-
86-
1. [Blazor Bootstrap - Blazor WebAssembly App](https://github.com/vikramlearning/blazorbootstrap-starter-templates/tree/master/src/BlazorBootstrap.Templates.Starter/NET6.BlazorWebAssemblyApp)
84+
### .NET 8
8785

88-
<img src="https://i.imgur.com/aRV3rJm.png" alt="Blazor Bootstrap - Blazor WebAssembly App" />
86+
TODO
8987

9088
### .NET 7
9189

@@ -96,3 +94,9 @@ Remove all the CSS content from the **Shared/MainLayout.razor.css** file.
9694
1. [Blazor Bootstrap - Blazor Empty WebAssembly App](https://github.com/vikramlearning/blazorbootstrap-starter-templates/tree/master/src/BlazorBootstrap.Templates.Starter/NET7.BlazorWebAssemblyAppEmpty)
9795

9896
<img src="https://i.imgur.com/CBEoZ6P.png" alt="Blazor Bootstrap - Blazor Empty WebAssembly App" />
97+
98+
### .NET 6
99+
100+
1. [Blazor Bootstrap - Blazor WebAssembly App](https://github.com/vikramlearning/blazorbootstrap-starter-templates/tree/master/src/BlazorBootstrap.Templates.Starter/NET6.BlazorWebAssemblyApp)
101+
102+
<img src="https://i.imgur.com/aRV3rJm.png" alt="Blazor Bootstrap - Blazor WebAssembly App" />

docs/docs/02-layout/getting-started-webassembly.mdx

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Get started with the Enterprise-class Blazor Bootstrap Component library built o
1717

1818
Assuming you followed the getting started docs for the initial setup.
1919

20-
1. **Blazor WebAssembly Project:** Follow the [getting started](/getting-started/blazor-webassembly) steps for the initial setup.
21-
1. **Blazor Server Project:** Follow the [getting started](/getting-started/blazor-server) steps for the initial setup.
20+
1. **Blazor WebAssembly Project:** Follow the [getting started](/getting-started/blazor-webassembly-net-8) steps for the initial setup.
21+
1. **Blazor Server Project:** Follow the [getting started](/getting-started/blazor-webapp-server-global-net-8) steps for the initial setup.
2222

2323
## Steps
2424

@@ -31,33 +31,33 @@ Remove all the CSS content from the **Shared/MainLayout.razor.css** file.
3131
```cshtml {} showLineNumbers
3232
@inherits LayoutComponentBase
3333
34-
<div class="bb-page">
35-
36-
<Sidebar @ref="sidebar"
37-
Href="/"
38-
IconName="IconName.BootstrapFill"
39-
Title="Blazor Bootstrap"
40-
DataProvider="SidebarDataProvider" />
41-
42-
<main>
43-
<div class="bb-top-row px-4 d-flex justify-content-end">
44-
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
45-
</div>
46-
47-
<article class="content px-4">
48-
<div class="py-2">
49-
@Body
50-
</div>
51-
</article>
52-
</main>
53-
54-
</div>
34+
<BlazorBootstrapLayout StickyHeader="true">
35+
<HeaderSection>
36+
<ThemeSwitcher Class="ps-3 ps-lg-2" />
37+
</HeaderSection>
38+
39+
<SidebarSection>
40+
<Sidebar2 Href="/"
41+
ImageSrc="https://demos.blazorbootstrap.com/images/logo/logo-white.svg"
42+
Title="Blazor Bootstrap"
43+
BadgeText="3.3.1"
44+
DataProvider="Sidebar2DataProvider"
45+
WidthUnit="Unit.Px" />
46+
</SidebarSection>
47+
48+
<ContentSection>
49+
@Body
50+
</ContentSection>
51+
52+
<FooterSection>
53+
Footer links...
54+
</FooterSection>
55+
</BlazorBootstrapLayout>
5556
5657
@code {
57-
private Sidebar sidebar = default!;
5858
private IEnumerable<NavItem> navItems = default!;
5959
60-
private async Task<SidebarDataProviderResult> SidebarDataProvider(SidebarDataProviderRequest request)
60+
private async Task<Sidebar2DataProviderResult> Sidebar2DataProvider(Sidebar2DataProviderRequest request)
6161
{
6262
if (navItems is null)
6363
navItems = GetNavItems();
@@ -81,11 +81,9 @@ Remove all the CSS content from the **Shared/MainLayout.razor.css** file.
8181

8282
## Starter templates
8383

84-
### .NET 6
85-
86-
1. [Blazor Bootstrap - Blazor WebAssembly App](https://github.com/vikramlearning/blazorbootstrap-starter-templates/tree/master/src/BlazorBootstrap.Templates.Starter/NET6.BlazorWebAssemblyApp)
84+
### .NET 8
8785

88-
<img src="https://i.imgur.com/aRV3rJm.png" alt="Blazor Bootstrap - Blazor WebAssembly App" />
86+
TODO
8987

9088
### .NET 7
9189

@@ -96,3 +94,9 @@ Remove all the CSS content from the **Shared/MainLayout.razor.css** file.
9694
1. [Blazor Bootstrap - Blazor Empty WebAssembly App](https://github.com/vikramlearning/blazorbootstrap-starter-templates/tree/master/src/BlazorBootstrap.Templates.Starter/NET7.BlazorWebAssemblyAppEmpty)
9795

9896
<img src="https://i.imgur.com/CBEoZ6P.png" alt="Blazor Bootstrap - Blazor Empty WebAssembly App" />
97+
98+
### .NET 6
99+
100+
1. [Blazor Bootstrap - Blazor WebAssembly App](https://github.com/vikramlearning/blazorbootstrap-starter-templates/tree/master/src/BlazorBootstrap.Templates.Starter/NET6.BlazorWebAssemblyApp)
101+
102+
<img src="https://i.imgur.com/aRV3rJm.png" alt="Blazor Bootstrap - Blazor WebAssembly App" />

0 commit comments

Comments
 (0)