Skip to content

Commit 85c0dae

Browse files
authored
Demos update + Theme Switcher Fix (#33)
- Updated the BlazorExpress.Bulma.Docx package version twice (from 0.2.0 → 0.2.1 → 0.2.2). - Enhanced and reorganized route and screenshot constants for demos and documentation. - Improved versioning: moved from "1.0.0-preview1" to stable "1.0.0" in project files and appsettings. - Refactored demo components for better maintainability: - Introduced and expanded enums for demo link categories. - Centralized and made image sources and component info dynamic. - Updated sidebar and page link utilities for improved navigation. - Updated documentation files to use dynamic values and improved structure. - Commented out some sections in Grid documentation for future work. Overall, this PR focuses on package updates, route and versioning enhancements, refactoring demo utilities, and documentation improvements.
1 parent 5954fd6 commit 85c0dae

44 files changed

Lines changed: 402 additions & 277 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BlazorExpress.Bulma.Demo.RCL/BlazorExpress.Bulma.Demo.RCL.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</ItemGroup>
2525

2626
<ItemGroup>
27-
<PackageReference Include="BlazorExpress.Bulma.Docx" Version="0.2.0" />
27+
<PackageReference Include="BlazorExpress.Bulma.Docx" Version="0.2.2" />
2828
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.17" />
2929
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
3030
</ItemGroup>

BlazorExpress.Bulma.Demo.RCL/Constants/DemoRouteConstants.cs

Lines changed: 70 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,74 @@
33
public static class DemoRouteConstants
44
{
55
public const string Blog_Prefix = "/blog";
6-
public const string Docs_Prefix = "/docs";
76
public const string Demos_Prefix = "/demos";
7+
public const string Docs_Prefix = "/docs";
8+
9+
#region Demos
10+
11+
// Features
12+
public const string Demos_Skeletons_Documentation = Demos_Prefix + "/skeletons";
13+
14+
// Icons
15+
public const string Demos_BootstrapIcons_Documentation = Demos_Prefix + "/icons/bootstrap-icons";
16+
public const string Demos_GoogleFontIcons_Documentation = Demos_Prefix + "/icons/google-font-icons";
17+
18+
// Elements
19+
public const string Demos_Block_Documentation = Demos_Prefix + "/block";
20+
public const string Demos_Box_Documentation = Demos_Prefix + "/box";
21+
public const string Demos_Button_Documentation = Demos_Prefix + "/button";
22+
public const string Demos_Content_Documentation = Demos_Prefix + "/content";
23+
public const string Demos_DeleteButton_Documentation = Demos_Prefix + "/delete-button";
24+
public const string Demos_Image_Documentation = Demos_Prefix + "/image";
25+
public const string Demos_Notification_Documentation = Demos_Prefix + "/notification";
26+
public const string Demos_ProgressBar_Documentation = Demos_Prefix + "/progress-bar";
27+
public const string Demos_Table_Documentation = Demos_Prefix + "/table";
28+
public const string Demos_Tags_Documentation = Demos_Prefix + "/tags";
29+
public const string Demos_Title_Documentation = Demos_Prefix + "/title";
30+
31+
// Form
32+
public const string Demos_Form_Prefix = Demos_Prefix + "/form";
33+
public const string Demos_Form_AutoComplete_Documentation = Demos_Form_Prefix + "/autocomplete";
34+
public const string Demos_Form_CheckboxInput_Documentation = Demos_Form_Prefix + "/checkbox-input";
35+
public const string Demos_Form_CurrencyInput_Documentation = Demos_Form_Prefix + "/currency-input";
36+
public const string Demos_Form_DateInput_Documentation = Demos_Form_Prefix + "/date-input";
37+
public const string Demos_Form_EnumInput_Documentation = Demos_Form_Prefix + "/enum-input";
38+
public const string Demos_Form_NumberInput_Documentation = Demos_Form_Prefix + "/number-input";
39+
public const string Demos_Form_OTPInput_Documentation = Demos_Form_Prefix + "/otp-input";
40+
public const string Demos_Form_PasswordInput_Documentation = Demos_Form_Prefix + "/password-input";
41+
public const string Demos_Form_RadioInput_Documentation = Demos_Form_Prefix + "/radio-input";
42+
public const string Demos_Form_RangeInput_Documentation = Demos_Form_Prefix + "/range-input";
43+
public const string Demos_Form_SelectInput_Documentation = Demos_Form_Prefix + "/select-input";
44+
public const string Demos_Form_Switch_Documentation = Demos_Form_Prefix + "/switch";
45+
public const string Demos_Form_TextInput_Documentation = Demos_Form_Prefix + "/text-input";
46+
public const string Demos_Form_TextAreaInput_Documentation = Demos_Form_Prefix + "/text-area-input";
47+
public const string Demos_Form_TimeInput_Documentation = Demos_Form_Prefix + "/time-input";
48+
49+
// Components
50+
public const string Demos_Breadcrumb_Documentation = Demos_Prefix + "/breadcrumb";
51+
public const string Demos_Card_Documentation = Demos_Prefix + "/card";
52+
public const string Demos_ConfirmDialog_Documentation = Demos_Prefix + "/confirm-dialog";
53+
public const string Demos_Dropdown_Documentation = Demos_Prefix + "/dropdown";
54+
public const string Demos_GoogleMaps_Documentation = Demos_Prefix + "/google-maps";
55+
public const string Demos_Grid_Documentation = Demos_Prefix + "/grid";
56+
public const string Demos_Menu_Documentation = Demos_Prefix + "/menu";
57+
public const string Demos_Message_Documentation = Demos_Prefix + "/message";
58+
public const string Demos_Modal_Documentation = Demos_Prefix + "/modal";
59+
public const string Demos_Navbar_Documentation = Demos_Prefix + "/navbar";
60+
public const string Demos_Pagination_Documentation = Demos_Prefix + "/pagination";
61+
public const string Demos_Panel_Documentation = Demos_Prefix + "/panel";
62+
public const string Demos_ScriptLoader_Documentation = Demos_Prefix + "/script-loader";
63+
public const string Demos_Tabs_Documentation = Demos_Prefix + "/tabs";
64+
65+
// Layout
66+
public const string Demos_Container_Documentation = Demos_Prefix + "/container";
67+
public const string Demos_Hero_Documentation = Demos_Prefix + "/hero";
68+
public const string Demos_Section_Documentation = Demos_Prefix + "/section";
69+
public const string Demos_Level_Documentation = Demos_Prefix + "/level";
70+
public const string Demos_Media_Documentation = Demos_Prefix + "/media";
71+
public const string Demos_Footer_Documentation = Demos_Prefix + "/footer";
72+
73+
#endregion
874

975
#region Docs
1076

@@ -87,71 +153,9 @@ public static class DemoRouteConstants
87153
public const string Docs_Media_Documentation = Docs_Prefix + "/media";
88154
public const string Docs_Footer_Documentation = Docs_Prefix + "/footer";
89155

90-
#endregion
91-
92-
#region Demos
93-
94-
// Features
95-
public const string Demos_Skeletons_Documentation = Demos_Prefix + "/skeletons";
96-
97-
// Icons
98-
public const string Demos_BootstrapIcons_Documentation = Demos_Prefix + "/icons/bootstrap-icons";
99-
public const string Demos_GoogleFontIcons_Documentation = Demos_Prefix + "/icons/google-font-icons";
100-
101-
// Elements
102-
public const string Demos_Block_Documentation = Demos_Prefix + "/block";
103-
public const string Demos_Box_Documentation = Demos_Prefix + "/box";
104-
public const string Demos_Button_Documentation = Demos_Prefix + "/button";
105-
public const string Demos_Content_Documentation = Demos_Prefix + "/content";
106-
public const string Demos_DeleteButton_Documentation = Demos_Prefix + "/delete-button";
107-
public const string Demos_Image_Documentation = Demos_Prefix + "/image";
108-
public const string Demos_Notification_Documentation = Demos_Prefix + "/notification";
109-
public const string Demos_ProgressBar_Documentation = Demos_Prefix + "/progress-bar";
110-
public const string Demos_Table_Documentation = Demos_Prefix + "/table";
111-
public const string Demos_Tags_Documentation = Demos_Prefix + "/tags";
112-
public const string Demos_Title_Documentation = Demos_Prefix + "/title";
113-
114-
// Form
115-
public const string Demos_Form_Prefix = Demos_Prefix + "/form";
116-
public const string Demos_Form_AutoComplete_Documentation = Demos_Form_Prefix + "/autocomplete";
117-
public const string Demos_Form_CheckboxInput_Documentation = Demos_Form_Prefix + "/checkbox-input";
118-
public const string Demos_Form_CurrencyInput_Documentation = Demos_Form_Prefix + "/currency-input";
119-
public const string Demos_Form_DateInput_Documentation = Demos_Form_Prefix + "/date-input";
120-
public const string Demos_Form_EnumInput_Documentation = Demos_Form_Prefix + "/enum-input";
121-
public const string Demos_Form_NumberInput_Documentation = Demos_Form_Prefix + "/number-input";
122-
public const string Demos_Form_OTPInput_Documentation = Demos_Form_Prefix + "/otp-input";
123-
public const string Demos_Form_PasswordInput_Documentation = Demos_Form_Prefix + "/password-input";
124-
public const string Demos_Form_RadioInput_Documentation = Demos_Form_Prefix + "/radio-input";
125-
public const string Demos_Form_RangeInput_Documentation = Demos_Form_Prefix + "/range-input";
126-
public const string Demos_Form_SelectInput_Documentation = Demos_Form_Prefix + "/select-input";
127-
public const string Demos_Form_Switch_Documentation = Demos_Form_Prefix + "/switch";
128-
public const string Demos_Form_TextInput_Documentation = Demos_Form_Prefix + "/text-input";
129-
public const string Demos_Form_TextAreaInput_Documentation = Demos_Form_Prefix + "/text-area-input";
130-
public const string Demos_Form_TimeInput_Documentation = Demos_Form_Prefix + "/time-input";
131-
132-
// Components
133-
public const string Demos_Breadcrumb_Documentation = Demos_Prefix + "/breadcrumb";
134-
public const string Demos_Card_Documentation = Demos_Prefix + "/card";
135-
public const string Demos_ConfirmDialog_Documentation = Demos_Prefix + "/confirm-dialog";
136-
public const string Demos_Dropdown_Documentation = Demos_Prefix + "/dropdown";
137-
public const string Demos_GoogleMaps_Documentation = Demos_Prefix + "/google-maps";
138-
public const string Demos_Grid_Documentation = Demos_Prefix + "/grid";
139-
public const string Demos_Menu_Documentation = Demos_Prefix + "/menu";
140-
public const string Demos_Message_Documentation = Demos_Prefix + "/message";
141-
public const string Demos_Modal_Documentation = Demos_Prefix + "/modal";
142-
public const string Demos_Navbar_Documentation = Demos_Prefix + "/navbar";
143-
public const string Demos_Pagination_Documentation = Demos_Prefix + "/pagination";
144-
public const string Demos_Panel_Documentation = Demos_Prefix + "/panel";
145-
public const string Demos_ScriptLoader_Documentation = Demos_Prefix + "/script-loader";
146-
public const string Demos_Tabs_Documentation = Demos_Prefix + "/tabs";
147-
148-
// Layout
149-
public const string Demos_Container_Documentation = Demos_Prefix + "/container";
150-
public const string Demos_Hero_Documentation = Demos_Prefix + "/hero";
151-
public const string Demos_Section_Documentation = Demos_Prefix + "/section";
152-
public const string Demos_Level_Documentation = Demos_Prefix + "/level";
153-
public const string Demos_Media_Documentation = Demos_Prefix + "/media";
154-
public const string Demos_Footer_Documentation = Demos_Prefix + "/footer";
156+
// Utils
157+
public const string Docs_Utils_Prefix = Docs_Prefix + "/utils";
158+
public const string Docs_ColorUtils = Docs_Utils_Prefix + "/color-utility";
155159

156160
#endregion
157161
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
namespace BlazorExpress.Bulma.Demo.RCL;
2+
3+
public class DemoScreenshotSrcConstants
4+
{
5+
#region Fields and Constants
6+
7+
public const string DemoScreenshotSrcPrefix = $"{DemoStringConstants.StaticAssets_Images_Path}/screenshots";
8+
9+
// Home
10+
public const string Home = DemoScreenshotSrcPrefix + "/home.png";
11+
12+
// Fetures
13+
public const string Skeleton = DemoScreenshotSrcPrefix + "/skeleton.png";
14+
15+
// Icons
16+
public const string BootstrapIcon = DemoScreenshotSrcPrefix + "/bootstrap-icon.png";
17+
public const string GoogleFontIcon = DemoScreenshotSrcPrefix + "/google-font-icon.png";
18+
19+
// Elements
20+
public const string Block = DemoScreenshotSrcPrefix + "block.png";
21+
public const string Box = DemoScreenshotSrcPrefix + "box.png";
22+
public const string Button = DemoScreenshotSrcPrefix + "button.png";
23+
public const string DeleteButton = DemoScreenshotSrcPrefix + "delete-button.png";
24+
public const string Image = DemoScreenshotSrcPrefix + "image.png";
25+
public const string Notification = DemoScreenshotSrcPrefix + "notification.png";
26+
public const string ProgressBar = DemoScreenshotSrcPrefix + "progress-bar.png";
27+
public const string Tag = DemoScreenshotSrcPrefix + "tag.png";
28+
29+
// Form
30+
public const string DateInput = DemoScreenshotSrcPrefix + "date-input.png";
31+
public const string EnumInput = DemoScreenshotSrcPrefix + "enum-input.png";
32+
public const string OTPInput = DemoScreenshotSrcPrefix + "otp-input.png";
33+
public const string TextInput = DemoScreenshotSrcPrefix + "text-input.png";
34+
35+
// Components
36+
public const string Breadcrumb = DemoScreenshotSrcPrefix + "breadcrumb.png";
37+
public const string ConfirmDialog = DemoScreenshotSrcPrefix + "confirm-dialog.png";
38+
public const string GoogleMap = DemoScreenshotSrcPrefix + "google-map.png";
39+
public const string Grid = DemoScreenshotSrcPrefix + "grid.png";
40+
public const string Message = DemoScreenshotSrcPrefix + "message.png";
41+
public const string Modal = DemoScreenshotSrcPrefix + "modal.png";
42+
public const string Pagination = DemoScreenshotSrcPrefix + "pagination.png";
43+
public const string ScriptLoader = DemoScreenshotSrcPrefix + "script-loader.png";
44+
public const string Tabs = DemoScreenshotSrcPrefix + "tabs.png";
45+
46+
// Layout
47+
public const string Hero = DemoScreenshotSrcPrefix + "hero.png";
48+
49+
#endregion
50+
}

BlazorExpress.Bulma.Demo.RCL/Constants/DemoStringConstants.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ public static class DemoStringConstants
44
{
55
#region Fields and Constants
66

7+
public const string NugetPackageName = "BlazorExpress.Bulma";
8+
public const string NugetPackageDisplayName = "BlazorExpress Bulma";
9+
710
public const string PageTitle_Suffix = " | Blazor Bulma: An enterprise-grade open-source component library from the Blazor Express team.";
811

912
public const string StaticAssets_RootPath = "_content/BlazorExpress.Bulma.Demo.RCL";
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
namespace BlazorExpress.Bulma.Demo.RCL;
2+
3+
public enum DemoPageLinkCategory
4+
{
5+
[Description("All")]
6+
All,
7+
8+
[Description("Getting Started")]
9+
GettingStarted,
10+
11+
[Description("Features")]
12+
Features,
13+
14+
[Description("Icons")]
15+
Icons,
16+
17+
[Description("Elements")]
18+
Elements,
19+
20+
[Description("Form")]
21+
Form,
22+
23+
[Description("Components")]
24+
Components,
25+
26+
[Description("Layout")]
27+
Layout,
28+
29+
[Description("Charts")]
30+
Charts,
31+
32+
[Description("Utils")]
33+
Utils
34+
}

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

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

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

1212
<SidebarSection>

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

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

44
<BulmaLayout>
55
<HeaderSection>
6-
<WebsiteNavbar BrandImgSrc="_content/BlazorExpress.Bulma.Demo.RCL/icons/logo.png"
6+
<WebsiteNavbar BrandImgSrc="@DemoStringConstants.StaticAssets_Icons_Logo_png"
77
BrandImgAltText="Blazor Express Logo"
8-
ApplicationName="BlazorExpress.Bulma" />
8+
ApplicationName="@NugetPackageName" />
99
</HeaderSection>
1010

1111
<SidebarSection>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
public partial class DemosMainLayout : MainLayoutBase
44
{
55
#region Fields and Constants
6-
6+
7+
private bool isSidebarVisible = false;
78
private HashSet<LinkGroup> linkGroups = new();
89
private Menu menuRef = default!;
910

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

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

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

1212
<SidebarSection>

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

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

44
<BulmaLayout>
55
<HeaderSection>
6-
<WebsiteNavbar BrandImgSrc="_content/BlazorExpress.Bulma.Demo.RCL/icons/logo.png"
6+
<WebsiteNavbar BrandImgSrc="@DemoStringConstants.StaticAssets_Icons_Logo_png"
77
BrandImgAltText="Blazor Express Logo"
8-
ApplicationName="BlazorExpress.Bulma" />
8+
ApplicationName="@NugetPackageName" />
99
</HeaderSection>
1010
<ContentSection>
1111
<div class="be-bulma-masthead p-5">

0 commit comments

Comments
 (0)