Skip to content

Commit 26e8ad8

Browse files
authored
Docx library (#29)
* Docx library - draft changes * Refactor route and string constants for demo application Updated `App.cs` to include a summary comment. Removed `RouteConstants.cs` and `StringConstants.cs`, replacing them with `DemoRouteConstants.cs` and `DemoStringConstants.cs`, respectively. Updated various `.razor.cs` files to use the new demo constants. Modified `MainLayoutBaseFooter.razor` and `Index.razor` to point to demo routes. Enhanced the `CodeChunk` component with a new parameter for project root class type. Ensured all documentation files reference the new demo structure for improved maintainability. * Update interop prefixes to use 'bulma' namespace Refactor interop classes and JavaScript files to change the prefix from `window.blazorExpress` to `window.blazorExpress.bulma`. This includes modifications in `GoogleMapInterop.cs`, `MenuInterop.cs`, `ScriptLoaderInterop.cs`, and `JsInteropUtils.cs`, as well as updates in `blazorexpress.bulma.js` to ensure all references are correctly scoped under the new `bulma` namespace. This change aims to better organize the code and separate functionalities related to different libraries or frameworks. * Refactor layout components and update documentation links This commit introduces new components, replacing the existing `Notification` with a modular `StarOnGitHub` component and adding a `DoYouKnow` component for enhanced user engagement. The `MainLayoutBase` class now includes properties for dynamic NuGet package information, improving the footer's informational content. Additionally, the `MainLayoutBaseFooter` has been updated to display the NuGet package name. Documentation files have been revised to include new links and remove outdated ones, ensuring relevance. The `DocsLink` component has been enhanced to accept a `Text` parameter for flexible descriptions. NOTE: This commit message is auto-generated using GitHub Copilot.
1 parent 6e13196 commit 26e8ad8

127 files changed

Lines changed: 536 additions & 535 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.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
namespace BlazorExpress.Bulma.Demo.RCL;
22

3+
/// <summary>
4+
/// Do not remove this file; it is required for the RCL to compile correctly.
5+
/// This file is intentionally included to provide the root file assembly name.
6+
/// </summary>
37
public class App
48
{
59
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32+
<ProjectReference Include="..\BlazorExpress.Bulma.Docx\BlazorExpress.Bulma.Docx.csproj" />
3233
<ProjectReference Include="..\BlazorExpress.Bulma\BlazorExpress.Bulma.csproj" />
3334
</ItemGroup>
3435

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace BlazorExpress.Bulma.Demo.RCL;
2+
3+
public static class DemoAppConstants
4+
{
5+
public static Type ProjectRootClassType => typeof(App);
6+
}

BlazorExpress.Bulma.Demo.RCL/Constants/RouteConstants.cs renamed to BlazorExpress.Bulma.Demo.RCL/Constants/DemoRouteConstants.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace BlazorExpress.Bulma.Demo.RCL;
22

3-
public static class RouteConstants
3+
public static class DemoRouteConstants
44
{
55
public const string Blog_Prefix = "/blog";
66
public const string Docs_Prefix = "/docs";
@@ -9,12 +9,12 @@ public static class RouteConstants
99
#region Docs
1010

1111
// Getting Started
12-
public const string Docs_Getting_Started = Docs_Prefix + "/getting-started";
13-
public const string Docs_Getting_Started_Introduction = Docs_Getting_Started + "/introduction";
14-
public const string Docs_Getting_Started_WebAssembly_NET_8 = Docs_Getting_Started + "/blazor-webassembly-net-8";
15-
public const string Docs_Getting_Started_WebApp_Server_NET_8 = Docs_Getting_Started + "/blazor-webapp-server-global-net-8";
16-
public const string Docs_Getting_Started_WebApp_Auto_NET_8 = Docs_Getting_Started + "/blazor-webapp-auto-global-net-8";
17-
public const string Docs_Getting_Started_MAUI_NET_8 = Docs_Getting_Started + "/maui-blazor-net-8";
12+
public const string Docs_Getting_Started_Prefix = Docs_Prefix + "/getting-started";
13+
public const string Docs_Getting_Started_Introduction = Docs_Getting_Started_Prefix + "/introduction";
14+
public const string Docs_Getting_Started_WebAssembly_NET_8 = Docs_Getting_Started_Prefix + "/blazor-webassembly-net-8";
15+
public const string Docs_Getting_Started_WebApp_Server_NET_8 = Docs_Getting_Started_Prefix + "/blazor-webapp-server-global-net-8";
16+
public const string Docs_Getting_Started_WebApp_Auto_NET_8 = Docs_Getting_Started_Prefix + "/blazor-webapp-auto-global-net-8";
17+
public const string Docs_Getting_Started_MAUI_NET_8 = Docs_Getting_Started_Prefix + "/maui-blazor-net-8";
1818

1919
// Features
2020
public const string Docs_Skeletons_Documentation = Docs_Prefix + "/skeletons";

BlazorExpress.Bulma.Demo.RCL/Constants/StringConstants.cs renamed to BlazorExpress.Bulma.Demo.RCL/Constants/DemoStringConstants.cs

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,11 @@
11
namespace BlazorExpress.Bulma.Demo.RCL;
22

3-
public static class StringConstants
3+
public static class DemoStringConstants
44
{
55
#region Fields and Constants
66

77
public const string PageTitle_Suffix = " | Blazor Bulma: An enterprise-grade open-source component library from the Blazor Express team.";
88

9-
public const string Nullable = "Nullable";
10-
public const string PropertyTypeNameInt16 = "Int16";
11-
public const string PropertyTypeNameInt32 = "Int32";
12-
public const string PropertyTypeNameInt64 = "Int64";
13-
public const string PropertyTypeNameChar = "Char";
14-
public const string PropertyTypeNameStringComparison = "StringComparison";
15-
public const string PropertyTypeNameString = "String";
16-
public const string PropertyTypeNameSingle = "Single"; // float
17-
public const string PropertyTypeNameDecimal = "Decimal";
18-
public const string PropertyTypeNameDouble = "Double";
19-
public const string PropertyTypeNameDateOnly = "DateOnly";
20-
public const string PropertyTypeNameDateTime = "DateTime";
21-
public const string PropertyTypeNameBoolean = "Boolean";
22-
public const string PropertyTypeNameEnum = "Enum";
23-
public const string PropertyTypeNameGuid = "Guid";
24-
25-
public const string PropertyTypeNameInt16CSharpTypeKeyword = "short";
26-
public const string PropertyTypeNameInt32CSharpTypeKeyword = "int";
27-
public const string PropertyTypeNameInt64CSharpTypeKeyword = "long";
28-
public const string PropertyTypeNameCharCSharpTypeKeyword = "char";
29-
public const string PropertyTypeNameStringComparisonCSharpTypeKeyword = "StringComparison";
30-
public const string PropertyTypeNameStringCSharpTypeKeyword = "string";
31-
public const string PropertyTypeNameSingleCSharpTypeKeyword = "float";
32-
public const string PropertyTypeNameDecimalCSharpTypeKeyword = "decimal";
33-
public const string PropertyTypeNameDoubleCSharpTypeKeyword = "double";
34-
public const string PropertyTypeNameDateOnlyCSharpTypeKeyword = "DateOnly";
35-
public const string PropertyTypeNameDateTimeCSharpTypeKeyword = "DateTime";
36-
public const string PropertyTypeNameBooleanCSharpTypeKeyword = "bool";
37-
public const string PropertyTypeNameEnumCSharpTypeKeyword = "enum";
38-
public const string PropertyTypeNameGuidCSharpTypeKeyword = "Guid";
39-
409
public const string StaticAssets_RootPath = "_content/BlazorExpress.Bulma.Demo.RCL";
4110
public const string StaticAssets_Icons_Path = StaticAssets_RootPath + "/icons";
4211
public const string StaticAssets_Icons_Logo_png = StaticAssets_Icons_Path + "/logo.png";

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,11 @@
4646
<div class="p-5">
4747
<Button Class="bi bi-box-arrow-right menu-toggle-button ml-1 mt-0 mb-1" @onclick="ToggleSidebarSection" />
4848
@Body
49-
<Notification Class="has-text-centered" Color="NotificationColor.Link" HideDeleteButton="true">
50-
<a href="@GithubUrl" class="be-bulma-text-decoration-none" target="_blank">
51-
<i class="bi bi-star-fill"></i>
52-
<span>If you like BlazorExpress.Bulma, give it a star on GitHub!</span>
53-
<i class="bi bi-star-fill"></i>
54-
</a>
55-
</Notification>
56-
<MainLayoutBaseFooter Version="@Version"
49+
<DoYouKnow Class="mt-3" />
50+
<StarOnGitHub />
51+
<MainLayoutBaseFooter NugetPackageName="@NugetPackageName"
52+
NugetPackageDisplayName="@NugetPackageDisplayName"
53+
Version="@Version"
5754
DotNetVersion="@DotNetVersion"
5855
DocsUrl="@DocsUrl"
5956
BlogUrl="@BlogUrl"

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

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private HashSet<LinkGroup> GetLinkGroups()
3838
Name = "GETTING STARTED",
3939
CssClass = "is-size-7 has-text-weight-bold has-text-danger",
4040
Links = [
41-
new Link { Href = RouteConstants.Docs_Getting_Started_Introduction, Text = "Introduction" },
41+
new Link { Href = DemoRouteConstants.Docs_Getting_Started_Introduction, Text = "Introduction" },
4242
]
4343
});
4444

@@ -48,7 +48,7 @@ private HashSet<LinkGroup> GetLinkGroups()
4848
Name = "FEATURES",
4949
CssClass = "is-size-7 has-text-weight-bold has-text-warning",
5050
Links = [
51-
new Link { Href = RouteConstants.Demos_Skeletons_Documentation, Text = "Skeletons" }
51+
new Link { Href = DemoRouteConstants.Demos_Skeletons_Documentation, Text = "Skeletons" }
5252
]
5353
});
5454

@@ -58,8 +58,8 @@ private HashSet<LinkGroup> GetLinkGroups()
5858
Name = "ICONS",
5959
CssClass = "is-size-7 has-text-weight-bold has-text-info",
6060
Links = [
61-
new Link { Href = RouteConstants.Demos_BootstrapIcons_Documentation, Text = "Bootstrap Icons" },
62-
new Link { Href = RouteConstants.Demos_GoogleFontIcons_Documentation, Text = "Google Font Icons" }
61+
new Link { Href = DemoRouteConstants.Demos_BootstrapIcons_Documentation, Text = "Bootstrap Icons" },
62+
new Link { Href = DemoRouteConstants.Demos_GoogleFontIcons_Documentation, Text = "Google Font Icons" }
6363
]
6464
});
6565

@@ -69,14 +69,14 @@ private HashSet<LinkGroup> GetLinkGroups()
6969
Name = "ELEMENTS",
7070
CssClass = "is-size-7 has-text-weight-bold has-text-primary",
7171
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" },
72+
new Link { Href = DemoRouteConstants.Demos_Block_Documentation, Text = "Block" },
73+
new Link { Href = DemoRouteConstants.Demos_Box_Documentation, Text = "Box" },
74+
new Link { Href = DemoRouteConstants.Demos_Button_Documentation, Text = "Button" },
75+
new Link { Href = DemoRouteConstants.Demos_DeleteButton_Documentation, Text = "Delete Button" },
76+
new Link { Href = DemoRouteConstants.Demos_Image_Documentation, Text = "Image" },
77+
new Link { Href = DemoRouteConstants.Demos_Notification_Documentation, Text = "Notification" },
78+
new Link { Href = DemoRouteConstants.Demos_ProgressBar_Documentation, Text = "Progress Bar" },
79+
new Link { Href = DemoRouteConstants.Demos_Tags_Documentation, Text = "Tags" },
8080
]
8181
});
8282

@@ -86,10 +86,10 @@ private HashSet<LinkGroup> GetLinkGroups()
8686
Name = "FORM",
8787
CssClass = "is-size-7 has-text-weight-bold has-text-primary",
8888
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" },
89+
new Link { Href = DemoRouteConstants.Demos_Form_DateInput_Documentation , Text = "Date Input" },
90+
new Link { Href = DemoRouteConstants.Demos_Form_EnumInput_Documentation , Text = "Enum Input" },
91+
new Link { Href = DemoRouteConstants.Demos_Form_OTPInput_Documentation , Text = "OTP Input" },
92+
new Link { Href = DemoRouteConstants.Demos_Form_TextInput_Documentation , Text = "Text Input" },
9393
]
9494
});
9595

@@ -99,15 +99,15 @@ private HashSet<LinkGroup> GetLinkGroups()
9999
Name = "COMPONENTS",
100100
CssClass = "is-size-7 has-text-weight-bold has-text-dark",
101101
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" }
102+
new Link { Href = DemoRouteConstants.Demos_Breadcrumb_Documentation, Text = "Breadcrumb" },
103+
new Link { Href = DemoRouteConstants.Demos_ConfirmDialog_Documentation, Text = "Confirm Dialog" },
104+
new Link { Href = DemoRouteConstants.Demos_GoogleMaps_Documentation, Text = "Google Maps" },
105+
new Link { Href = DemoRouteConstants.Demos_Grid_Documentation, Text = "Grid" },
106+
new Link { Href = DemoRouteConstants.Demos_Message_Documentation, Text = "Message" },
107+
new Link { Href = DemoRouteConstants.Demos_Modal_Documentation, Text = "Modal" },
108+
new Link { Href = DemoRouteConstants.Demos_Pagination_Documentation, Text = "Pagination" },
109+
new Link { Href = DemoRouteConstants.Demos_ScriptLoader_Documentation, Text = "Script Loader" },
110+
new Link { Href = DemoRouteConstants.Demos_Tabs_Documentation, Text = "Tabs" }
111111
]
112112
});
113113

@@ -117,7 +117,7 @@ private HashSet<LinkGroup> GetLinkGroups()
117117
Name = "LAYOUT",
118118
CssClass = "is-size-7 has-text-weight-bold has-text-success",
119119
Links = [
120-
new Link { Href = RouteConstants.Demos_Hero_Documentation, Text = "Hero" }
120+
new Link { Href = DemoRouteConstants.Demos_Hero_Documentation, Text = "Hero" }
121121
]
122122
});
123123

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,11 @@
4545
<div class="p-5">
4646
<Button Class="bi bi-box-arrow-right menu-toggle-button ml-1 mt-0 mb-1" @onclick="ToggleSidebarSection" />
4747
@Body
48-
<Notification Class="has-text-centered" Color="NotificationColor.Link" HideDeleteButton="true">
49-
<a href="@GithubUrl" class="be-bulma-text-decoration-none" target="_blank">
50-
<i class="bi bi-star-fill"></i>
51-
<span>If you like BlazorExpress.Bulma, give it a star on GitHub!</span>
52-
<i class="bi bi-star-fill"></i>
53-
</a>
54-
</Notification>
55-
<MainLayoutBaseFooter Version="@Version"
48+
<DoYouKnow Class="mt-3" />
49+
<StarOnGitHub />
50+
<MainLayoutBaseFooter NugetPackageName="@NugetPackageName"
51+
NugetPackageDisplayName="@NugetPackageDisplayName"
52+
Version="@Version"
5653
DotNetVersion="@DotNetVersion"
5754
DocsUrl="@DocsUrl"
5855
BlogUrl="@BlogUrl"

0 commit comments

Comments
 (0)