Skip to content

Commit 21380fc

Browse files
committed
v0.0.1 updates
1 parent 35cf9a0 commit 21380fc

File tree

16 files changed

+353
-68
lines changed

16 files changed

+353
-68
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
@namespace BlazorExpress.Bulma.Demo.RCL
2+
@inherits MainLayoutBase
3+
4+
<BulmaLayout>
5+
6+
<HeaderSection>
7+
<WebsiteNavbar BrandImgSrc="_content/BlazorExpress.Bulma.Demo.RCL/icons/logo.png"
8+
BrandImgAltText="Blazor Express Logo"
9+
ApplicationName="BlazorExpress.Bulma" />
10+
</HeaderSection>
11+
12+
<SidebarSection>
13+
<Menu @ref="menuRef" Class="be-bulma-page-menu" IsScrollable="true">
14+
@foreach (var group in linkGroups)
15+
{
16+
<MenuLabel Class="@group.CssClass">@group.Name</MenuLabel>
17+
if (group.Links?.Any() ?? false)
18+
{
19+
<MenuList>
20+
@foreach (var link in group.Links)
21+
{
22+
<MenuItem>
23+
@if (link.Links?.Any() ?? false) // level 2 links
24+
{
25+
<NavLink ActiveClass="is-active">@link.Text</NavLink>
26+
<MenuList>
27+
@foreach (var cLink in link.Links)
28+
{
29+
<MenuItem>
30+
<NavLink href="@cLink.Href" Match="@cLink.Match" ActiveClass="is-active">@cLink.Text</NavLink>
31+
</MenuItem>
32+
}
33+
</MenuList>
34+
}
35+
else
36+
{
37+
<NavLink href="@link.Href" Match="@link.Match" ActiveClass="is-active">@link.Text</NavLink>
38+
}
39+
</MenuItem>
40+
}
41+
</MenuList>
42+
}
43+
}
44+
</Menu>
45+
</SidebarSection>
46+
47+
<ContentSection>
48+
<div class="p-5">
49+
<Button Class="bi bi-box-arrow-right menu-toggle-button ml-1 mt-0 mb-1" @onclick="ToggleSidebarSection" />
50+
@Body
51+
<Notification Class="has-text-centered" Color="NotificationColor.Link" HideDeleteButton="true">
52+
<a href="//github.com/BlazorExpress/BlazorExpress.Bulma" class="be-bulma-text-decoration-none">
53+
<i class="bi bi-star-fill"></i>
54+
<span>If you like BlazorExpress.Bulma, give it a star on GitHub!</span>
55+
<i class="bi bi-star-fill"></i>
56+
</a>
57+
</Notification>
58+
<MainLayoutBaseFooter Version="@Version"
59+
DotNetVersion="@DotNetVersion"
60+
DocsUrl="@DocsUrl"
61+
BlogUrl="@BlogUrl"
62+
GithubUrl="@GithubUrl"
63+
NugetUrl="@NuGetUrl"
64+
TwitterUrl="@TwitterUrl"
65+
LinkedInUrl="@LinkedInUrl"
66+
OpenCollectiveUrl="@OpenCollectiveUrl"
67+
GithubIssuesUrl="@GithubIssuesUrl"
68+
GithubDiscussionsUrl="@GithubDiscussionsUrl"
69+
StackoverflowUrl="@StackoverflowUrl" />
70+
</div>
71+
</ContentSection>
72+
73+
<FooterSection>
74+
<div class="container is-max-desktop mb-4">
75+
</div>
76+
</FooterSection>
77+
</BulmaLayout>
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
namespace BlazorExpress.Bulma.Demo.RCL;
2+
3+
public partial class BlogMainLayout : MainLayoutBase
4+
{
5+
#region Fields and Constants
6+
7+
private bool isSidebarVisible = false;
8+
private HashSet<LinkGroup> linkGroups = new();
9+
private Menu menuRef = default!;
10+
11+
#endregion
12+
13+
#region Methods
14+
15+
protected override async Task OnAfterRenderAsync(bool firstRender)
16+
{
17+
if (firstRender)
18+
await JS.InvokeVoidAsync("initializeTheme");
19+
20+
await base.OnAfterRenderAsync(firstRender);
21+
}
22+
23+
protected override void OnInitialized()
24+
{
25+
if (!linkGroups.Any())
26+
linkGroups = GetLinkGroups();
27+
28+
base.OnInitialized();
29+
}
30+
31+
private HashSet<LinkGroup> GetLinkGroups()
32+
{
33+
var groups = new HashSet<LinkGroup>();
34+
35+
// GETTING STARTED
36+
groups.Add(new LinkGroup
37+
{
38+
Name = "GETTING STARTED",
39+
CssClass = "is-size-7 has-text-weight-bold has-text-danger",
40+
Links = [
41+
new Link { Href = RouteConstants.Demos_Getting_Started_Introduction, Text = "Introduction" },
42+
]
43+
});
44+
45+
// FEATURES
46+
groups.Add(new LinkGroup
47+
{
48+
Name = "FEATURES",
49+
CssClass = "is-size-7 has-text-weight-bold has-text-warning",
50+
Links = [
51+
new Link { Href = RouteConstants.Demos_Skeletons_Documentation, Text = "Skeletons" }
52+
]
53+
});
54+
55+
// ICONS
56+
groups.Add(new LinkGroup
57+
{
58+
Name = "ICONS",
59+
CssClass = "is-size-7 has-text-weight-bold has-text-info",
60+
Links = [
61+
new Link { Href = RouteConstants.Demos_BootstrapIcons_Documentation, Text = "Bootstrap Icons" },
62+
new Link { Href = RouteConstants.Demos_GoogleFontIcons_Documentation, Text = "Google Font Icons" }
63+
]
64+
});
65+
66+
// ELEMENTS
67+
groups.Add(new LinkGroup
68+
{
69+
Name = "ELEMENTS",
70+
CssClass = "is-size-7 has-text-weight-bold has-text-primary",
71+
Links = [
72+
new Link { Href = RouteConstants.Demos_Block_Documentation, Text = "Block" },
73+
new Link { Href = RouteConstants.Demos_Box_Documentation, Text = "Box" },
74+
new Link { Href = RouteConstants.Demos_Button_Documentation, Text = "Button" },
75+
new Link { Href = RouteConstants.Demos_DeleteButton_Documentation, Text = "Delete Button" },
76+
new Link { Href = RouteConstants.Demos_Image_Documentation, Text = "Image" },
77+
new Link { Href = RouteConstants.Demos_Notification_Documentation, Text = "Notification" },
78+
new Link { Href = RouteConstants.Demos_ProgressBar_Documentation, Text = "Progress Bar" },
79+
new Link { Href = RouteConstants.Demos_Tags_Documentation, Text = "Tags" },
80+
]
81+
});
82+
83+
// FORM
84+
groups.Add(new LinkGroup
85+
{
86+
Name = "FORM",
87+
CssClass = "is-size-7 has-text-weight-bold has-text-primary",
88+
Links = [
89+
new Link { Href = RouteConstants.Demos_Form_DateInput_Documentation , Text = "Date Input" },
90+
new Link { Href = RouteConstants.Demos_Form_EnumInput_Documentation , Text = "Enum Input" },
91+
new Link { Href = RouteConstants.Demos_Form_OTPInput_Documentation , Text = "OTP Input" },
92+
new Link { Href = RouteConstants.Demos_Form_TextInput_Documentation , Text = "Text Input" },
93+
]
94+
});
95+
96+
// COMPONENTS
97+
groups.Add(new LinkGroup
98+
{
99+
Name = "COMPONENTS",
100+
CssClass = "is-size-7 has-text-weight-bold has-text-dark",
101+
Links = [
102+
new Link { Href = RouteConstants.Demos_Breadcrumb_Documentation, Text = "Breadcrumb" },
103+
new Link { Href = RouteConstants.Demos_ConfirmDialog_Documentation, Text = "Confirm Dialog" },
104+
new Link { Href = RouteConstants.Demos_GoogleMaps_Documentation, Text = "Google Maps" },
105+
new Link { Href = RouteConstants.Demos_Grid_Documentation, Text = "Grid" },
106+
new Link { Href = RouteConstants.Demos_Message_Documentation, Text = "Message" },
107+
new Link { Href = RouteConstants.Demos_Modal_Documentation, Text = "Modal" },
108+
new Link { Href = RouteConstants.Demos_Pagination_Documentation, Text = "Pagination" },
109+
new Link { Href = RouteConstants.Demos_ScriptLoader_Documentation, Text = "Script Loader" },
110+
new Link { Href = RouteConstants.Demos_Tabs_Documentation, Text = "Tabs" }
111+
]
112+
});
113+
114+
// LAYOUT
115+
groups.Add(new LinkGroup
116+
{
117+
Name = "LAYOUT",
118+
CssClass = "is-size-7 has-text-weight-bold has-text-success",
119+
Links = [
120+
new Link { Href = RouteConstants.Demos_Hero_Documentation, Text = "Hero" }
121+
]
122+
});
123+
124+
return groups;
125+
}
126+
127+
private Task SetAutoTheme() => SetTheme("system");
128+
129+
private Task SetDarkTheme() => SetTheme("dark");
130+
131+
private Task SetLightTheme() => SetTheme("light");
132+
133+
private async Task SetTheme(string themeName) => await JS.InvokeVoidAsync("setTheme", themeName);
134+
135+
private void ToggleSidebarSection()
136+
{
137+
@menuRef.Toggle();
138+
}
139+
140+
#endregion
141+
}

BlazorExpress.Bulma.Demo.RCL/Layout/DemosMainLayout.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<BulmaLayout>
55

66
<HeaderSection>
7-
<BulmaNavbar BrandImgSrc="_content/BlazorExpress.Bulma.Demo.RCL/icons/logo.png"
8-
BrandImgAltText="Blazor Express Logo"
9-
ApplicationName="BlazorExpress.Bulma" />
7+
<WebsiteNavbar BrandImgSrc="_content/BlazorExpress.Bulma.Demo.RCL/icons/logo.png"
8+
BrandImgAltText="Blazor Express Logo"
9+
ApplicationName="BlazorExpress.Bulma" />
1010
</HeaderSection>
1111

1212
<SidebarSection>

BlazorExpress.Bulma.Demo.RCL/Layout/DocsMainLayout.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<BulmaLayout>
55

66
<HeaderSection>
7-
<BulmaNavbar BrandImgSrc="_content/BlazorExpress.Bulma.Demo.RCL/icons/logo.png"
8-
BrandImgAltText="Blazor Express Logo"
9-
ApplicationName="BlazorExpress.Bulma" />
7+
<WebsiteNavbar BrandImgSrc="_content/BlazorExpress.Bulma.Demo.RCL/icons/logo.png"
8+
BrandImgAltText="Blazor Express Logo"
9+
ApplicationName="BlazorExpress.Bulma" />
1010
</HeaderSection>
1111

1212
<SidebarSection>

BlazorExpress.Bulma.Demo.RCL/Layout/MainLayout.razor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
<BulmaLayout>
55
<HeaderSection>
6-
<BulmaNavbar BrandImgSrc="_content/BlazorExpress.Bulma.Demo.RCL/icons/logo.png"
7-
BrandImgAltText="Blazor Express Logo"
8-
ApplicationName="BlazorExpress.Bulma" />
6+
<WebsiteNavbar BrandImgSrc="_content/BlazorExpress.Bulma.Demo.RCL/icons/logo.png"
7+
BrandImgAltText="Blazor Express Logo"
8+
ApplicationName="BlazorExpress.Bulma" />
99
</HeaderSection>
1010
<ContentSection>
1111
@Body
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@attribute [Route(pageUrl)]
2+
@layout BlogMainLayout
3+
4+
<PageMetaTags PageUrl="@pageUrl" Title="@metaTitle" Description="@metaDescription" ImageUrl="@imageUrl" />
5+
6+
<PageHero Title="@pageTitle">
7+
<SubTitleTemplate>
8+
@((MarkupString)pageDescription)
9+
</SubTitleTemplate>
10+
</PageHero>
11+
12+
@code {
13+
private const string pageUrl = RouteConstants.Blog_Prefix;
14+
private const string pageTitle = "The BlazorExpress Bulma Blog";
15+
private const string pageDescription = "Build production-ready Blazor apps quickly. A lightweight, developer-focused library combining Blazor performance with Bulma simplicity.";
16+
private const string metaTitle = "The BlazorExpress Bulma Blog";
17+
private const string metaDescription = "Build production-ready Blazor apps quickly. A lightweight, developer-focused library combining Blazor performance with Bulma simplicity.";
18+
private const string imageUrl = "https://i.imgur.com/FGgEMp6.jpg"; // TODO: update
19+
}

BlazorExpress.Bulma.Demo.RCL/Pages/Demos/GettingStarted/GettingStartedDocumentation.razor

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@attribute [Route(pageUrl)]
2+
@attribute [Route(pageUrl2)]
23
@layout DemosMainLayout
34

45
<PageMetaTags PageUrl="@pageUrl" Title="@metaTitle" Description="@metaDescription" ImageUrl="@imageUrl" />
@@ -11,6 +12,7 @@
1112

1213
@code {
1314
private const string pageUrl = RouteConstants.Demos_Getting_Started_Introduction;
15+
private const string pageUrl2 = RouteConstants.Demos_Prefix;
1416
private const string pageTitle = "Get started with BlazorExpress Bulma";
1517
private const string pageDescription = "Build production-ready Blazor apps quickly. A lightweight, developer-focused library combining Blazor performance with Bulma simplicity.";
1618
private const string metaTitle = "Get started with BlazorExpress Bulma";

BlazorExpress.Bulma.Demo.RCL/Pages/Docs/Skeletons/Skeletons_Doc_01_Documentation.razor

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@attribute [Route(pageUrl)]
2+
@attribute [Route(pageUrl2)]
23
@layout DocsMainLayout
34

45
<PageMetaTags PageUrl="@pageUrl" Title="@metaTitle" Description="@metaDescription" ImageUrl="@imageUrl" />
@@ -23,6 +24,7 @@
2324

2425
@code {
2526
private const string pageUrl = RouteConstants.Docs_Skeletons_Documentation;
27+
private const string pageUrl2 = RouteConstants.Docs_Prefix;
2628
private const string pageTitle = "Skeleton";
2729
private const string pageDescription = "This documentation provides a comprehensive reference for the <code>Skeleton</code> component, guiding you through its configuration options.";
2830
private const string metaTitle = "Blazor Skeleton Component";

BlazorExpress.Bulma.Demo.RCL/Pages/Home/Index.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
</HeroSubTitle>
2525
</Hero>
2626
<div class="mb-4">
27-
<a href="https://www.nuget.org/packages/BlazorExpress.Bulma/"><img alt="Nuget" src="https://img.shields.io/nuget/v/Blazor.Bootstrap"></a>
27+
<a href="https://www.nuget.org/packages/BlazorExpress.Bulma/"><img alt="Nuget" src="https://img.shields.io/nuget/v/BlazorExpress.Bulma"></a>
2828
<span class="px-1"></span>
29-
<a href="https://www.nuget.org/packages/BlazorExpress.Bulma/"><img alt="Nuget" src="https://img.shields.io/nuget/dt/Blazor.Bootstrap"></a>
29+
<a href="https://www.nuget.org/packages/BlazorExpress.Bulma/"><img alt="Nuget" src="https://img.shields.io/nuget/dt/BlazorExpress.Bulma"></a>
3030
</div>
3131
</div>
3232
</div>

BlazorExpress.Bulma/Components/Navbar/BulmaNavbar.razor renamed to BlazorExpress.Bulma.Demo.RCL/Shared/WebsiteNavbar.razor

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@namespace BlazorExpress.Bulma
1+
@namespace BlazorExpress.Bulma.Demo.RCL
22
@inherits BulmaComponentBase
33

44
<Navbar Class="px-3" HasShadow="true">
@@ -21,18 +21,18 @@
2121

2222
<NavbarMenu Id="navbarBasicExample1" IsActive="navbarMenuActive">
2323
<NavbarStart>
24-
<NavbarItem Class="mr-1" Href="/demos/getting-started/introduction">
24+
<NavbarItem Class="mr-1" Href="/demos">
2525
<i class="bi bi-display-fill has-text-primary mr-2"></i>Demos
2626
</NavbarItem>
27-
<NavbarItem Class="mr-1" Href="/docs/skeletons">
27+
<NavbarItem Class="mr-1" Href="/docs">
2828
<i class="bi bi-file-text-fill has-text-link mr-2"></i>Docs
2929
</NavbarItem>
30-
<NavbarItem Href="/blog">
30+
@* <NavbarItem Href="/blog">
3131
<i class="bi bi-newspaper has-text-warning mr-2"></i>Blog
32-
</NavbarItem>
32+
</NavbarItem> *@
3333
</NavbarStart>
3434
<NavbarEnd>
35-
@* <NavbarItem Class="mr-1" Href="@GithubUrl" target="_blank">
35+
<NavbarItem Class="mr-1" Href="@GithubUrl" target="_blank">
3636
<i class="bi bi-github"></i>
3737
<small class="is-hidden-desktop ml-2">GitHub</small>
3838
</NavbarItem>
@@ -46,7 +46,7 @@
4646
</NavbarItem>
4747
<NavbarItem Type="NavbarItemType.Div">
4848
<span class="tag is-link">@Version</span>
49-
</NavbarItem> *@
49+
</NavbarItem>
5050

5151
<NavbarItem Type="NavbarItemType.Div" HasDropdown="true">
5252
<NavbarLink Class="be-bulma-theme-indicator"><i class="bi bi-sun"></i></NavbarLink>

0 commit comments

Comments
 (0)