diff --git a/docs/_content/SamplePages/snippets/clientside.html b/docs/_content/SamplePages/snippets/clientside.html deleted file mode 100644 index 341829b..0000000 --- a/docs/_content/SamplePages/snippets/clientside.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - BlazorPrettyCode Sample Site - - - - - Loading... - - - - diff --git a/docs/_content/SamplePages/snippets/program.html b/docs/_content/SamplePages/snippets/program.html new file mode 100644 index 0000000..b6f382e --- /dev/null +++ b/docs/_content/SamplePages/snippets/program.html @@ -0,0 +1,14 @@ +public class Program +{ + public static async Task Main(string[] args) + { + var builder = WebAssemblyHostBuilder.CreateDefault(args); + + builder.Services.AddBlazorPrettyCode(); + builder.RootComponents.Add("app"); + + //Add BlazorStyled to root components + + await builder.Build().RunAsync(); + } +} \ No newline at end of file diff --git a/docs/_content/SamplePages/snippets/serverside.html b/docs/_content/SamplePages/snippets/serverside.html deleted file mode 100644 index 4b78ef0..0000000 --- a/docs/_content/SamplePages/snippets/serverside.html +++ /dev/null @@ -1,19 +0,0 @@ -@page "/" -@namespace ServerSideSample.Pages -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers - - - - - - - Blazor Pretty Code Server Side Sample - - @(await Html.RenderComponentAsync()) - - - @(await Html.RenderComponentAsync()) - - - - diff --git a/docs/_content/SamplePages/snippets/startup.html b/docs/_content/SamplePages/snippets/startup.html deleted file mode 100644 index ff3f63f..0000000 --- a/docs/_content/SamplePages/snippets/startup.html +++ /dev/null @@ -1,13 +0,0 @@ -public class Startup -{ - public void ConfigureServices(IServiceCollection services) - { - services.AddBlazorPrettyCode(); - } - - public void Configure(IComponentsApplicationBuilder app) - { - app.AddComponent("app"); - app.AddComponent("#styled"); - } -} \ No newline at end of file diff --git a/docs/_framework/_bin/BlazorPrettyCode.dll b/docs/_framework/_bin/BlazorPrettyCode.dll index db40f27..3446006 100644 Binary files a/docs/_framework/_bin/BlazorPrettyCode.dll and b/docs/_framework/_bin/BlazorPrettyCode.dll differ diff --git a/docs/_framework/_bin/BlazorPrettyCode.pdb b/docs/_framework/_bin/BlazorPrettyCode.pdb index e7e0e79..804f950 100644 Binary files a/docs/_framework/_bin/BlazorPrettyCode.pdb and b/docs/_framework/_bin/BlazorPrettyCode.pdb differ diff --git a/docs/_framework/_bin/BlazorStyled.dll b/docs/_framework/_bin/BlazorStyled.dll index caa57cb..81af5a8 100644 Binary files a/docs/_framework/_bin/BlazorStyled.dll and b/docs/_framework/_bin/BlazorStyled.dll differ diff --git a/docs/_framework/_bin/BlazorTypography.dll b/docs/_framework/_bin/BlazorTypography.dll index c586b3e..18d2aab 100644 Binary files a/docs/_framework/_bin/BlazorTypography.dll and b/docs/_framework/_bin/BlazorTypography.dll differ diff --git a/docs/_framework/_bin/ClientSideSample.dll b/docs/_framework/_bin/ClientSideSample.dll index ae67ad8..e32e83b 100644 Binary files a/docs/_framework/_bin/ClientSideSample.dll and b/docs/_framework/_bin/ClientSideSample.dll differ diff --git a/docs/_framework/_bin/ClientSideSample.pdb b/docs/_framework/_bin/ClientSideSample.pdb index 8f36ba8..2466085 100644 Binary files a/docs/_framework/_bin/ClientSideSample.pdb and b/docs/_framework/_bin/ClientSideSample.pdb differ diff --git a/docs/_framework/_bin/Microsoft.AspNetCore.Blazor.dll b/docs/_framework/_bin/Microsoft.AspNetCore.Blazor.dll index 8e071cf..af10814 100644 Binary files a/docs/_framework/_bin/Microsoft.AspNetCore.Blazor.dll and b/docs/_framework/_bin/Microsoft.AspNetCore.Blazor.dll differ diff --git a/docs/_framework/_bin/Microsoft.AspNetCore.Components.Web.dll b/docs/_framework/_bin/Microsoft.AspNetCore.Components.Web.dll index c69eca8..889f168 100644 Binary files a/docs/_framework/_bin/Microsoft.AspNetCore.Components.Web.dll and b/docs/_framework/_bin/Microsoft.AspNetCore.Components.Web.dll differ diff --git a/docs/_framework/_bin/Microsoft.AspNetCore.Components.dll b/docs/_framework/_bin/Microsoft.AspNetCore.Components.dll index 95dff56..c8b4b05 100644 Binary files a/docs/_framework/_bin/Microsoft.AspNetCore.Components.dll and b/docs/_framework/_bin/Microsoft.AspNetCore.Components.dll differ diff --git a/docs/_framework/_bin/Microsoft.Extensions.Configuration.Abstractions.dll b/docs/_framework/_bin/Microsoft.Extensions.Configuration.Abstractions.dll index 10478a1..bc0ff82 100644 Binary files a/docs/_framework/_bin/Microsoft.Extensions.Configuration.Abstractions.dll and b/docs/_framework/_bin/Microsoft.Extensions.Configuration.Abstractions.dll differ diff --git a/docs/_framework/_bin/Microsoft.Extensions.Configuration.dll b/docs/_framework/_bin/Microsoft.Extensions.Configuration.dll index fb72b44..5993fcb 100644 Binary files a/docs/_framework/_bin/Microsoft.Extensions.Configuration.dll and b/docs/_framework/_bin/Microsoft.Extensions.Configuration.dll differ diff --git a/docs/_framework/_bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll b/docs/_framework/_bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll index f3ddba1..9b7b432 100644 Binary files a/docs/_framework/_bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll and b/docs/_framework/_bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll differ diff --git a/docs/_framework/_bin/Microsoft.Extensions.DependencyInjection.dll b/docs/_framework/_bin/Microsoft.Extensions.DependencyInjection.dll index 9f8a44c..7a3b8fd 100644 Binary files a/docs/_framework/_bin/Microsoft.Extensions.DependencyInjection.dll and b/docs/_framework/_bin/Microsoft.Extensions.DependencyInjection.dll differ diff --git a/docs/_framework/_bin/Microsoft.Extensions.Logging.Abstractions.dll b/docs/_framework/_bin/Microsoft.Extensions.Logging.Abstractions.dll index 8ce2121..c88b844 100644 Binary files a/docs/_framework/_bin/Microsoft.Extensions.Logging.Abstractions.dll and b/docs/_framework/_bin/Microsoft.Extensions.Logging.Abstractions.dll differ diff --git a/docs/_framework/_bin/Microsoft.Extensions.Primitives.dll b/docs/_framework/_bin/Microsoft.Extensions.Primitives.dll index d758709..731ddf1 100644 Binary files a/docs/_framework/_bin/Microsoft.Extensions.Primitives.dll and b/docs/_framework/_bin/Microsoft.Extensions.Primitives.dll differ diff --git a/docs/_framework/_bin/Microsoft.JSInterop.dll b/docs/_framework/_bin/Microsoft.JSInterop.dll index 54cdd27..c72ef35 100644 Binary files a/docs/_framework/_bin/Microsoft.JSInterop.dll and b/docs/_framework/_bin/Microsoft.JSInterop.dll differ diff --git a/docs/_framework/_bin/Mono.WebAssembly.Interop.dll b/docs/_framework/_bin/Mono.WebAssembly.Interop.dll index 50d9be0..9c8c39b 100644 Binary files a/docs/_framework/_bin/Mono.WebAssembly.Interop.dll and b/docs/_framework/_bin/Mono.WebAssembly.Interop.dll differ diff --git a/docs/_framework/_bin/SamplePages.dll b/docs/_framework/_bin/SamplePages.dll index 328417f..a6b1bec 100644 Binary files a/docs/_framework/_bin/SamplePages.dll and b/docs/_framework/_bin/SamplePages.dll differ diff --git a/docs/_framework/_bin/SamplePages.pdb b/docs/_framework/_bin/SamplePages.pdb index 50648de..575b983 100644 Binary files a/docs/_framework/_bin/SamplePages.pdb and b/docs/_framework/_bin/SamplePages.pdb differ diff --git a/docs/_framework/_bin/System.Core.dll b/docs/_framework/_bin/System.Core.dll index a4a7e54..00559b6 100644 Binary files a/docs/_framework/_bin/System.Core.dll and b/docs/_framework/_bin/System.Core.dll differ diff --git a/docs/_framework/_bin/System.Net.Http.dll b/docs/_framework/_bin/System.Net.Http.dll index d318769..d4682f7 100644 Binary files a/docs/_framework/_bin/System.Net.Http.dll and b/docs/_framework/_bin/System.Net.Http.dll differ diff --git a/docs/_framework/_bin/System.Runtime.CompilerServices.Unsafe.dll b/docs/_framework/_bin/System.Runtime.CompilerServices.Unsafe.dll index cf0dd99..afffdfb 100644 Binary files a/docs/_framework/_bin/System.Runtime.CompilerServices.Unsafe.dll and b/docs/_framework/_bin/System.Runtime.CompilerServices.Unsafe.dll differ diff --git a/docs/_framework/_bin/System.Text.Encodings.Web.dll b/docs/_framework/_bin/System.Text.Encodings.Web.dll index f593526..1b30726 100644 Binary files a/docs/_framework/_bin/System.Text.Encodings.Web.dll and b/docs/_framework/_bin/System.Text.Encodings.Web.dll differ diff --git a/docs/_framework/_bin/System.Text.Json.dll b/docs/_framework/_bin/System.Text.Json.dll index 4dfd470..f47e64a 100644 Binary files a/docs/_framework/_bin/System.Text.Json.dll and b/docs/_framework/_bin/System.Text.Json.dll differ diff --git a/docs/_framework/_bin/System.dll b/docs/_framework/_bin/System.dll index 57b0ef3..6235a4b 100644 Binary files a/docs/_framework/_bin/System.dll and b/docs/_framework/_bin/System.dll differ diff --git a/docs/_framework/_bin/WebAssembly.Bindings.dll b/docs/_framework/_bin/WebAssembly.Bindings.dll index 4228aa6..aeaa00c 100644 Binary files a/docs/_framework/_bin/WebAssembly.Bindings.dll and b/docs/_framework/_bin/WebAssembly.Bindings.dll differ diff --git a/docs/_framework/_bin/WebAssembly.Net.Http.dll b/docs/_framework/_bin/WebAssembly.Net.Http.dll index 80e8fe8..06a5ca8 100644 Binary files a/docs/_framework/_bin/WebAssembly.Net.Http.dll and b/docs/_framework/_bin/WebAssembly.Net.Http.dll differ diff --git a/docs/_framework/_bin/mscorlib.dll b/docs/_framework/_bin/mscorlib.dll index 568075b..577e87e 100644 Binary files a/docs/_framework/_bin/mscorlib.dll and b/docs/_framework/_bin/mscorlib.dll differ diff --git a/src/BlazorPrettyCode/BlazorPrettyCode.csproj b/src/BlazorPrettyCode/BlazorPrettyCode.csproj index 880cab6..cc970b6 100644 --- a/src/BlazorPrettyCode/BlazorPrettyCode.csproj +++ b/src/BlazorPrettyCode/BlazorPrettyCode.csproj @@ -6,7 +6,7 @@ 7.3 true BlazorPrettyCode - 1.2.0 + 1.3.0 Chanan Braunstein Blazor PrettyCode Razor Code Display Component @@ -15,9 +15,9 @@ - - - + + + diff --git a/src/Sample/Program.cs b/src/Sample/Program.cs index 2b69e6a..1c6bb1a 100644 --- a/src/Sample/Program.cs +++ b/src/Sample/Program.cs @@ -1,5 +1,4 @@ using BlazorPrettyCode; -using BlazorStyled; using BlazorTypography; using Microsoft.AspNetCore.Blazor.Hosting; using SamplePages; @@ -20,9 +19,6 @@ public static async Task Main(string[] args) builder.RootComponents.Add("app"); - //Add BlazorStyled to root components - builder.RootComponents.Add("#styled"); - await builder.Build().RunAsync(); } } diff --git a/src/Sample/wwwroot/index.html b/src/Sample/wwwroot/index.html index 341829b..364eba0 100644 --- a/src/Sample/wwwroot/index.html +++ b/src/Sample/wwwroot/index.html @@ -5,7 +5,6 @@ BlazorPrettyCode Sample Site - Loading... diff --git a/src/SamplePages/Pages/Index.razor b/src/SamplePages/Pages/Index.razor index f56b66b..265c35c 100644 --- a/src/SamplePages/Pages/Index.razor +++ b/src/SamplePages/Pages/Index.razor @@ -38,31 +38,17 @@

Install:

-

Client Side Support

-

- Initialize BlazorPrettyCode in your Startup.cs: services.AddBlazorPrettyCode();. You may also set defaults. - In the Configure method add app.AddComponent<ClientSideStyled>("#styled"); as well as shown below: + Initialize BlazorPrettyCode in your Program.cs: builder.Services.AddBlazorPrettyCode();. You may also set defaults.

- - -

For Client Side Blazor, in your index.html add a style tag:

+ -

In your Blazor component or in _imports.razor import the component: @@using BlazorPrettyCode and add it to your page:

-

Server Side Support

- -

- Blazor Pretty Code works in Server Side as well. Update your _hosts.cshtml files and and add to the head: -

- - -

Demo

diff --git a/src/SamplePages/SamplePages.csproj b/src/SamplePages/SamplePages.csproj index dbcf541..6d5b4e2 100644 --- a/src/SamplePages/SamplePages.csproj +++ b/src/SamplePages/SamplePages.csproj @@ -6,9 +6,9 @@ - - - + + + diff --git a/src/SamplePages/wwwroot/snippets/clientside.html b/src/SamplePages/wwwroot/snippets/clientside.html deleted file mode 100644 index 341829b..0000000 --- a/src/SamplePages/wwwroot/snippets/clientside.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - BlazorPrettyCode Sample Site - - - - - Loading... - - - - diff --git a/src/SamplePages/wwwroot/snippets/program.html b/src/SamplePages/wwwroot/snippets/program.html index 2e5f95a..b6f382e 100644 --- a/src/SamplePages/wwwroot/snippets/program.html +++ b/src/SamplePages/wwwroot/snippets/program.html @@ -8,7 +8,6 @@ builder.RootComponents.Add("app"); //Add BlazorStyled to root components - builder.RootComponents.Add("#styled"); await builder.Build().RunAsync(); } diff --git a/src/SamplePages/wwwroot/snippets/serverside.html b/src/SamplePages/wwwroot/snippets/serverside.html deleted file mode 100644 index 579b6b2..0000000 --- a/src/SamplePages/wwwroot/snippets/serverside.html +++ /dev/null @@ -1,19 +0,0 @@ -@page "/" -@namespace ServerSideSample.Pages -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers - - - - - - - Blazor Pretty Code Server Side Sample - - @(await Html.RenderComponentAsync(RenderMode.Server)) - - - @(await Html.RenderComponentAsync(RenderMode.Server)) - - - - diff --git a/src/ServerSideSample/Pages/_Host.cshtml b/src/ServerSideSample/Pages/_Host.cshtml index 579b6b2..2a4e234 100644 --- a/src/ServerSideSample/Pages/_Host.cshtml +++ b/src/ServerSideSample/Pages/_Host.cshtml @@ -9,7 +9,6 @@ Blazor Pretty Code Server Side Sample - @(await Html.RenderComponentAsync(RenderMode.Server)) @(await Html.RenderComponentAsync(RenderMode.Server))