This sample demonstrates the use of RazorComponents.MaterialDesign components.
-Currently executing on @runtime.
+Currently executing on @runtime built in @mode mode.
@@ -14,9 +12,3 @@ {A spacing paragraph to test scrolling and the top menu's scroll behaviour.
} - -@code { - string runtime = RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY")) - ? "Mono WebAssembly" - : ".NET Core"; -} diff --git a/samples/BlazorMdc.Demo.CommonUI/Pages/Index.razor.cs b/samples/BlazorMdc.Demo.CommonUI/Pages/Index.razor.cs new file mode 100644 index 000000000..7690df551 --- /dev/null +++ b/samples/BlazorMdc.Demo.CommonUI/Pages/Index.razor.cs @@ -0,0 +1,21 @@ +using System.Runtime.InteropServices; + +namespace BlazorMdc.Demo.CommonUI.Pages +{ + public partial class Index + { + string runtime = RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY")) + ? "Mono WebAssembly" + : ".NET Core"; + + string mode; + public Index() + { +#if DEBUG + mode = "debug"; +#else + mode = "release"; +#endif + } + } +} diff --git a/samples/Demonstration/Pages/ListSample.razor b/samples/BlazorMdc.Demo.CommonUI/Pages/ListSample.razor similarity index 100% rename from samples/Demonstration/Pages/ListSample.razor rename to samples/BlazorMdc.Demo.CommonUI/Pages/ListSample.razor diff --git a/samples/Demonstration/Pages/MenuSample.razor b/samples/BlazorMdc.Demo.CommonUI/Pages/MenuSample.razor similarity index 100% rename from samples/Demonstration/Pages/MenuSample.razor rename to samples/BlazorMdc.Demo.CommonUI/Pages/MenuSample.razor diff --git a/samples/Demonstration/Pages/NumericFieldSample.razor b/samples/BlazorMdc.Demo.CommonUI/Pages/NumericFieldSample.razor similarity index 100% rename from samples/Demonstration/Pages/NumericFieldSample.razor rename to samples/BlazorMdc.Demo.CommonUI/Pages/NumericFieldSample.razor diff --git a/samples/Demonstration/Pages/ProgressSample.razor b/samples/BlazorMdc.Demo.CommonUI/Pages/ProgressSample.razor similarity index 100% rename from samples/Demonstration/Pages/ProgressSample.razor rename to samples/BlazorMdc.Demo.CommonUI/Pages/ProgressSample.razor diff --git a/samples/Demonstration/Pages/RadioButtonsSample.razor b/samples/BlazorMdc.Demo.CommonUI/Pages/RadioButtonsSample.razor similarity index 100% rename from samples/Demonstration/Pages/RadioButtonsSample.razor rename to samples/BlazorMdc.Demo.CommonUI/Pages/RadioButtonsSample.razor diff --git a/samples/Demonstration/Pages/SelectSample.razor b/samples/BlazorMdc.Demo.CommonUI/Pages/SelectSample.razor similarity index 100% rename from samples/Demonstration/Pages/SelectSample.razor rename to samples/BlazorMdc.Demo.CommonUI/Pages/SelectSample.razor diff --git a/samples/Demonstration/Pages/SwitchSample.razor b/samples/BlazorMdc.Demo.CommonUI/Pages/SwitchSample.razor similarity index 100% rename from samples/Demonstration/Pages/SwitchSample.razor rename to samples/BlazorMdc.Demo.CommonUI/Pages/SwitchSample.razor diff --git a/samples/Demonstration/Pages/TabBarSample.razor b/samples/BlazorMdc.Demo.CommonUI/Pages/TabBarSample.razor similarity index 100% rename from samples/Demonstration/Pages/TabBarSample.razor rename to samples/BlazorMdc.Demo.CommonUI/Pages/TabBarSample.razor diff --git a/samples/Demonstration/Pages/TextAreaSample.razor b/samples/BlazorMdc.Demo.CommonUI/Pages/TextAreaSample.razor similarity index 100% rename from samples/Demonstration/Pages/TextAreaSample.razor rename to samples/BlazorMdc.Demo.CommonUI/Pages/TextAreaSample.razor diff --git a/samples/Demonstration/Pages/TextFieldSample.razor b/samples/BlazorMdc.Demo.CommonUI/Pages/TextFieldSample.razor similarity index 100% rename from samples/Demonstration/Pages/TextFieldSample.razor rename to samples/BlazorMdc.Demo.CommonUI/Pages/TextFieldSample.razor diff --git a/samples/Demonstration/Pages/_Imports.razor b/samples/BlazorMdc.Demo.CommonUI/Pages/_Imports.razor similarity index 100% rename from samples/Demonstration/Pages/_Imports.razor rename to samples/BlazorMdc.Demo.CommonUI/Pages/_Imports.razor diff --git a/samples/Demonstration/Properties/launchSettings.json b/samples/BlazorMdc.Demo.CommonUI/Properties/launchSettings.json similarity index 100% rename from samples/Demonstration/Properties/launchSettings.json rename to samples/BlazorMdc.Demo.CommonUI/Properties/launchSettings.json diff --git a/samples/Demonstration/Shared/MainLayout.razor b/samples/BlazorMdc.Demo.CommonUI/Shared/MainLayout.razor similarity index 100% rename from samples/Demonstration/Shared/MainLayout.razor rename to samples/BlazorMdc.Demo.CommonUI/Shared/MainLayout.razor diff --git a/samples/Demonstration/_Imports.razor b/samples/BlazorMdc.Demo.CommonUI/_Imports.razor similarity index 70% rename from samples/Demonstration/_Imports.razor rename to samples/BlazorMdc.Demo.CommonUI/_Imports.razor index f684411e5..abd9e7430 100644 --- a/samples/Demonstration/_Imports.razor +++ b/samples/BlazorMdc.Demo.CommonUI/_Imports.razor @@ -1,10 +1,10 @@ @using System.Net.Http @using Microsoft.AspNetCore.Authorization -@using Microsoft.AspNetCore.Components.Authorization @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Web @using Microsoft.JSInterop @using BlazorMdc.Components -@using Demonstration -@using Demonstration.Shared +@using BlazorMdc.Demo.CommonUI +@using BlazorMdc.Demo.CommonUI.Pages +@using BlazorMdc.Demo.CommonUI.Shared diff --git a/samples/Demonstration/wwwroot/css/bootstrap/bootstrap.min.css b/samples/BlazorMdc.Demo.CommonUI/wwwroot/css/bootstrap/bootstrap.min.css similarity index 100% rename from samples/Demonstration/wwwroot/css/bootstrap/bootstrap.min.css rename to samples/BlazorMdc.Demo.CommonUI/wwwroot/css/bootstrap/bootstrap.min.css diff --git a/samples/Demonstration/wwwroot/css/bootstrap/bootstrap.min.css.map b/samples/BlazorMdc.Demo.CommonUI/wwwroot/css/bootstrap/bootstrap.min.css.map similarity index 100% rename from samples/Demonstration/wwwroot/css/bootstrap/bootstrap.min.css.map rename to samples/BlazorMdc.Demo.CommonUI/wwwroot/css/bootstrap/bootstrap.min.css.map diff --git a/samples/Demonstration/wwwroot/css/open-iconic/FONT-LICENSE b/samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/FONT-LICENSE similarity index 100% rename from samples/Demonstration/wwwroot/css/open-iconic/FONT-LICENSE rename to samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/FONT-LICENSE diff --git a/samples/Demonstration/wwwroot/css/open-iconic/ICON-LICENSE b/samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/ICON-LICENSE similarity index 100% rename from samples/Demonstration/wwwroot/css/open-iconic/ICON-LICENSE rename to samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/ICON-LICENSE diff --git a/samples/Demonstration/wwwroot/css/open-iconic/README.md b/samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/README.md similarity index 100% rename from samples/Demonstration/wwwroot/css/open-iconic/README.md rename to samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/README.md diff --git a/samples/Demonstration/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css b/samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css similarity index 100% rename from samples/Demonstration/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css rename to samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css diff --git a/samples/Demonstration/wwwroot/css/open-iconic/font/fonts/open-iconic.eot b/samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/font/fonts/open-iconic.eot similarity index 100% rename from samples/Demonstration/wwwroot/css/open-iconic/font/fonts/open-iconic.eot rename to samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/font/fonts/open-iconic.eot diff --git a/samples/Demonstration/wwwroot/css/open-iconic/font/fonts/open-iconic.otf b/samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/font/fonts/open-iconic.otf similarity index 100% rename from samples/Demonstration/wwwroot/css/open-iconic/font/fonts/open-iconic.otf rename to samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/font/fonts/open-iconic.otf diff --git a/samples/Demonstration/wwwroot/css/open-iconic/font/fonts/open-iconic.svg b/samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/font/fonts/open-iconic.svg similarity index 100% rename from samples/Demonstration/wwwroot/css/open-iconic/font/fonts/open-iconic.svg rename to samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/font/fonts/open-iconic.svg diff --git a/samples/Demonstration/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf b/samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf similarity index 100% rename from samples/Demonstration/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf rename to samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf diff --git a/samples/Demonstration/wwwroot/css/open-iconic/font/fonts/open-iconic.woff b/samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/font/fonts/open-iconic.woff similarity index 100% rename from samples/Demonstration/wwwroot/css/open-iconic/font/fonts/open-iconic.woff rename to samples/BlazorMdc.Demo.CommonUI/wwwroot/css/open-iconic/font/fonts/open-iconic.woff diff --git a/samples/Demonstration/wwwroot/css/site.css b/samples/BlazorMdc.Demo.CommonUI/wwwroot/css/site.css similarity index 100% rename from samples/Demonstration/wwwroot/css/site.css rename to samples/BlazorMdc.Demo.CommonUI/wwwroot/css/site.css diff --git a/samples/Demonstration/wwwroot/favicon.ico b/samples/BlazorMdc.Demo.CommonUI/wwwroot/favicon.ico similarity index 100% rename from samples/Demonstration/wwwroot/favicon.ico rename to samples/BlazorMdc.Demo.CommonUI/wwwroot/favicon.ico diff --git a/samples/BlazorMdc.Demo.WebServer/BlazorMdc.Demo.WebServer.csproj b/samples/BlazorMdc.Demo.WebServer/BlazorMdc.Demo.WebServer.csproj new file mode 100644 index 000000000..f51f6ef79 --- /dev/null +++ b/samples/BlazorMdc.Demo.WebServer/BlazorMdc.Demo.WebServer.csproj @@ -0,0 +1,36 @@ ++ Swapping to Development environment will display more detailed information about the error that occurred. +
++ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +
\ No newline at end of file diff --git a/samples/BlazorMdc.Demo.WebServer/Pages/index_csb.cshtml b/samples/BlazorMdc.Demo.WebServer/Pages/index_csb.cshtml new file mode 100644 index 000000000..86e147b52 --- /dev/null +++ b/samples/BlazorMdc.Demo.WebServer/Pages/index_csb.cshtml @@ -0,0 +1,43 @@ +@page "/index_csb" +@namespace BlazorMdc.Demo.WebServer +@using BlazorMdc.Demo.CommonUI +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers + + + + + + +