Skip to content

Commit

Permalink
Doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chanan committed Mar 9, 2020
1 parent a496c48 commit 22b3d30
Show file tree
Hide file tree
Showing 41 changed files with 23 additions and 111 deletions.
15 changes: 0 additions & 15 deletions docs/_content/SamplePages/snippets/clientside.html

This file was deleted.

14 changes: 14 additions & 0 deletions docs/_content/SamplePages/snippets/program.html
Original file line number Diff line number Diff line change
@@ -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>("app");

//Add BlazorStyled to root components

await builder.Build().RunAsync();
}
}
19 changes: 0 additions & 19 deletions docs/_content/SamplePages/snippets/serverside.html

This file was deleted.

13 changes: 0 additions & 13 deletions docs/_content/SamplePages/snippets/startup.html

This file was deleted.

Binary file modified docs/_framework/_bin/BlazorPrettyCode.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/BlazorPrettyCode.pdb
Binary file not shown.
Binary file modified docs/_framework/_bin/BlazorStyled.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/BlazorTypography.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/ClientSideSample.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/ClientSideSample.pdb
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.AspNetCore.Blazor.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.AspNetCore.Components.Web.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.AspNetCore.Components.dll
Binary file not shown.
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.Extensions.Configuration.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.Extensions.Primitives.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Microsoft.JSInterop.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/Mono.WebAssembly.Interop.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/SamplePages.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/SamplePages.pdb
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Core.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Net.Http.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Runtime.CompilerServices.Unsafe.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Text.Encodings.Web.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.Text.Json.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/System.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/WebAssembly.Bindings.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/WebAssembly.Net.Http.dll
Binary file not shown.
Binary file modified docs/_framework/_bin/mscorlib.dll
Binary file not shown.
8 changes: 4 additions & 4 deletions src/BlazorPrettyCode/BlazorPrettyCode.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<LangVersion>7.3</LangVersion>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<PackageId>BlazorPrettyCode</PackageId>
<Version>1.2.0</Version>
<Version>1.3.0</Version>
<Authors>Chanan Braunstein</Authors>
<Title>Blazor PrettyCode</Title>
<Description>Razor Code Display Component</Description>
Expand All @@ -15,9 +15,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BlazorStyled" Version="1.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.1" />
<PackageReference Include="BlazorStyled" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.2" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 0 additions & 4 deletions src/Sample/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using BlazorPrettyCode;
using BlazorStyled;
using BlazorTypography;
using Microsoft.AspNetCore.Blazor.Hosting;
using SamplePages;
Expand All @@ -20,9 +19,6 @@ public static async Task Main(string[] args)

builder.RootComponents.Add<App>("app");

//Add BlazorStyled to root components
builder.RootComponents.Add<ClientSideStyled>("#styled");

await builder.Build().RunAsync();
}
}
Expand Down
1 change: 0 additions & 1 deletion src/Sample/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<meta name="viewport" content="width=device-width" />
<title>BlazorPrettyCode Sample Site</title>
<base href="/" />
<style id="styled"></style>
</head>
<body>
<app>Loading...</app>
Expand Down
18 changes: 2 additions & 16 deletions src/SamplePages/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,17 @@

<p>Install: <a href="https://www.nuget.org/packages/BlazorPrettyCode/"><img src="https://img.shields.io/nuget/vpre/BlazorPrettyCode.svg" /></a></p>

<h3>Client Side Support</h3>

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

<PrettyCode CodeFile="_content/SamplePages/snippets/program.html" HighlightLines="7,11" Title="Program.cs" />

<p>For Client Side Blazor, in your <code>index.html</code> add a <code>style</code> tag:</p>
<PrettyCode CodeFile="_content/SamplePages/snippets/program.html" HighlightLines="7" Title="Program.cs" />

<PrettyCode CodeFile="_content/SamplePages/snippets/clientside.html" HighlightLines="8" Title="index.html" />

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

<PrettyCode CodeFile="_content/SamplePages/snippets/usingSimple.html" />

<h3>Server Side Support</h3>

<p>
Blazor Pretty Code works in Server Side as well. Update your <code>_hosts.cshtml</code> files and and add to the <code>head</code>:
</p>

<PrettyCode CodeFile="_content/SamplePages/snippets/serverside.html" HighlightLines="12" Title="_Host.cshtml" />

<h2>Demo</h2>

<PrettyCode CodeFile="_content/SamplePages/snippets/css1.html" />
Expand Down
6 changes: 3 additions & 3 deletions src/SamplePages/SamplePages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BlazorTypography" Version="1.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.1" />
<PackageReference Include="BlazorTypography" Version="1.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.2" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 0 additions & 15 deletions src/SamplePages/wwwroot/snippets/clientside.html

This file was deleted.

1 change: 0 additions & 1 deletion src/SamplePages/wwwroot/snippets/program.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
builder.RootComponents.Add<App>("app");

//Add BlazorStyled to root components
builder.RootComponents.Add<ClientSideStyled>("#styled");

await builder.Build().RunAsync();
}
Expand Down
19 changes: 0 additions & 19 deletions src/SamplePages/wwwroot/snippets/serverside.html

This file was deleted.

1 change: 0 additions & 1 deletion src/ServerSideSample/Pages/_Host.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Blazor Pretty Code Server Side Sample</title>
<base href="~/" />
@(await Html.RenderComponentAsync<BlazorStyled.ServerSideStyled>(RenderMode.Server))
</head>
<body>
<app>@(await Html.RenderComponentAsync<SamplePages.App>(RenderMode.Server))</app>
Expand Down

0 comments on commit 22b3d30

Please sign in to comment.