|
1 | 1 | namespace BlazorBootstrap.Demo.RCL;
|
2 | 2 |
|
3 |
| -public partial class MainLayout : LayoutComponentBase |
| 3 | +public partial class MainLayout : MainLayoutBase |
4 | 4 | {
|
5 |
| - private string version = default!; |
6 |
| - private string docsUrl = default!; |
7 |
| - private string blogUrl = default!; |
8 |
| - private string githubUrl = default!; |
9 |
| - private string twitterUrl = default!; |
10 |
| - private string linkedInUrl = default!; |
11 |
| - private string openCollectiveUrl = default!; |
12 |
| - private string githubIssuesUrl = default!; |
13 |
| - private string githubDiscussionsUrl = default!; |
14 |
| - private string stackoverflowUrl = default!; |
15 |
| - |
16 |
| - private Sidebar sidebar = default!; |
17 |
| - private IEnumerable<NavItem> navItems = default!; |
18 |
| - |
19 |
| - [Inject] public IConfiguration Configuration { get; set; } = default!; |
20 |
| - |
21 |
| - protected override void OnInitialized() |
22 |
| - { |
23 |
| - version = $"v{Configuration["version"]}"; // example: v0.6.1 |
24 |
| - docsUrl = $"{Configuration["urls:docs"]}"; |
25 |
| - blogUrl = $"{Configuration["urls:blog"]}"; |
26 |
| - githubUrl = $"{Configuration["urls:github"]}"; |
27 |
| - twitterUrl = $"{Configuration["urls:twitter"]}"; |
28 |
| - linkedInUrl = $"{Configuration["urls:linkedin"]}"; |
29 |
| - openCollectiveUrl = $"{Configuration["urls:opencollective"]}"; |
30 |
| - githubIssuesUrl = $"{Configuration["urls:github_issues"]}"; |
31 |
| - githubDiscussionsUrl = $"{Configuration["urls:github_discussions"]}"; |
32 |
| - stackoverflowUrl = $"{Configuration["urls:stackoverflow"]}"; |
33 |
| - base.OnInitialized(); |
34 |
| - } |
35 |
| - |
36 |
| - private async Task<SidebarDataProviderResult> SidebarDataProvider(SidebarDataProviderRequest request) |
37 |
| - { |
38 |
| - if (navItems is null) |
39 |
| - navItems = GetNavItems(); |
40 |
| - |
41 |
| - return await Task.FromResult(request.ApplyTo(navItems)); |
42 |
| - } |
43 |
| - |
44 |
| - private IEnumerable<NavItem> GetNavItems() |
| 5 | + internal override IEnumerable<NavItem> GetNavItems() |
45 | 6 | {
|
46 |
| - navItems = new List<NavItem> |
| 7 | + navItems ??= new List<NavItem> |
47 | 8 | {
|
48 | 9 | new (){ Id = "1", Text = "Getting Started", Href = "/getting-started", IconName = IconName.HouseDoorFill },
|
49 | 10 |
|
@@ -75,7 +36,27 @@ private IEnumerable<NavItem> GetNavItems()
|
75 | 36 | new (){ Id = "508", Text = "Collapse", Href = "/collapse", IconName = IconName.ArrowsCollapse, ParentId = "5" },
|
76 | 37 | new (){ Id = "509", Text = "Confirm Dialog", Href = "/confirm-dialog", IconName = IconName.QuestionDiamondFill, ParentId = "5" },
|
77 | 38 | new (){ Id = "510", Text = "Dropdown", Href = "/dropdown", IconName = IconName.MenuButtonWideFill, ParentId = "5" },
|
78 |
| - new (){ Id = "511", Text = "Grid", Href = "/grid", IconName = IconName.Grid, ParentId = "5" }, |
| 39 | + |
| 40 | + #region Grid |
| 41 | + |
| 42 | + new (){ Id = "511", Text = "Grid", IconName = IconName.Grid, ParentId = "5" }, |
| 43 | + new (){ Id = "51101", Text = "Overview", Href = "/grid/overview", IconName = IconName.Grid, ParentId = "511" }, |
| 44 | + new (){ Id = "51102", Text = "Data Binding", Href = "/grid/data-binding", IconName = IconName.GridFill, ParentId = "511" }, |
| 45 | + new (){ Id = "51103", Text = "Filters", Href = "/grid/filters", IconName = IconName.FunnelFill, ParentId = "511" }, |
| 46 | + new (){ Id = "51104", Text = "Paging", Href = "/grid/paging", IconName = IconName.ChevronBarRight, ParentId = "511" }, |
| 47 | + new (){ Id = "51105", Text = "Sorting", Href = "/grid/sorting", IconName = IconName.ArrowDownUp, ParentId = "511" }, |
| 48 | + new (){ Id = "51106", Text = "Selection", Href = "/grid/selection", IconName = IconName.CheckSquareFill, ParentId = "511" }, |
| 49 | + new (){ Id = "51107", Text = "Alignment", Href = "/grid/alignment", IconName = IconName.Justify, ParentId = "511" }, |
| 50 | + new (){ Id = "51108", Text = "Grid Settings", Href = "/grid/settings", IconName = IconName.GearFill, ParentId = "511" }, |
| 51 | + new (){ Id = "51109", Text = "Custom CSS Class", Href = "/grid/custom-css-class", IconName = IconName.FileTypeCss, ParentId = "511" }, |
| 52 | + new (){ Id = "51110", Text = "Events", Href = "/grid/events", IconName = IconName.Fire, ParentId = "511" }, |
| 53 | + new (){ Id = "51111", Text = "Translations", Href = "/grid/translations", IconName = IconName.Translate, ParentId = "511" }, |
| 54 | + new (){ Id = "51112", Text = "Fixed Header", Href = "/grid/fixed-header", IconName = IconName.Table, ParentId = "511" }, |
| 55 | + new (){ Id = "51113", Text = "Freeze Columns", Href = "/grid/freeze-columns", IconName = IconName.LayoutThreeColumns, ParentId = "511" }, |
| 56 | + new (){ Id = "51114", Text = "Other", Href = "/grid/other", IconName = IconName.PlusSquareFill, ParentId = "511" }, |
| 57 | + |
| 58 | + #endregion Grid |
| 59 | + |
79 | 60 | new (){ Id = "512", Text = "Modals", Href = "/modals", IconName = IconName.WindowStack, ParentId = "5" },
|
80 | 61 | new (){ Id = "513", Text = "Offcanvas", Href = "/offcanvas", IconName = IconName.LayoutSidebarReverse, ParentId = "5" },
|
81 | 62 | new (){ Id = "514", Text = "Pagination", Href = "/pagination", IconName = IconName.ThreeDots, ParentId = "5" },
|
|
0 commit comments