Skip to content

Commit 276a646

Browse files
committed
add blazor site project (copy from playground)
1 parent feeeeba commit 276a646

Some content is hidden

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

56 files changed

+2622
-2
lines changed

CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

LearnJsonEverything.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.9.34622.214
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LearnJsonEverything", "LearnJsonEverything\LearnJsonEverything.csproj", "{82FEC514-66E5-4034-9845-7C66B753D6FD}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{82FEC514-66E5-4034-9845-7C66B753D6FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{82FEC514-66E5-4034-9845-7C66B753D6FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{82FEC514-66E5-4034-9845-7C66B753D6FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{82FEC514-66E5-4034-9845-7C66B753D6FD}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {4AA173CD-4653-4F51-AEEC-2E656C67953D}
24+
EndGlobalSection
25+
EndGlobal

LearnJsonEverything/App.razor

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Router AppAssembly="@typeof(App).Assembly">
2+
<Found Context="routeData">
3+
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
4+
<FocusOnNavigate RouteData="@routeData" Selector="h1"/>
5+
</Found>
6+
<NotFound>
7+
<PageTitle>Not found</PageTitle>
8+
<LayoutView Layout="@typeof(MainLayout)">
9+
<p role="alert">Seems like you've lost your way.</p>
10+
</LayoutView>
11+
</NotFound>
12+
</Router>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<NoWarn>NU1701</NoWarn>
8+
<PublishTrimmed>false</PublishTrimmed>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
13+
<PackageReference Include="BlazorMonaco" Version="3.2.0" />
14+
<PackageReference Include="Markdig" Version="0.37.0" />
15+
<PackageReference Include="Markdig.SyntaxHighlighting" Version="1.1.7" />
16+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.5" />
17+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.5" PrivateAssets="all" />
18+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.9.2" />
19+
<PackageReference Include="Yaml2JsonNode" Version="2.1.0" />
20+
</ItemGroup>
21+
22+
<ItemGroup>
23+
<Content Update="wwwroot\favicon.ico">
24+
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
25+
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
26+
</Content>
27+
</ItemGroup>
28+
29+
<ItemGroup>
30+
<Folder Include="wwwroot\data\" />
31+
</ItemGroup>
32+
33+
</Project>

LearnJsonEverything/Pages/Index.razor

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
@page "/"
2+
@using LearnJsonEverything.Services
3+
4+
<PageTitle>Learn json-everything</PageTitle>
5+
6+
<div class="row mx-3 fill-remaining">
7+
<div class="mh-100 scroll text-center">
8+
<h1 class="display-4 mt-5 mb-4">
9+
<span class="font-monospace text-muted">json-everything</span>
10+
</h1>
11+
<p class="lead mb-5">Extended JSON support in .Net built on top of the System.Text.Json namespace</p>
12+
<Banner Content="All libraries now support .Net 8 and Native AOT!!"></Banner>
13+
14+
<Feature Title="JSON Schema"
15+
Description="@IndexContent.SchemaTagline"
16+
PlaygroundUrl="json-schema"
17+
DocsUrl="https://docs.json-everything.net/schema/basics/"
18+
ImageUrl="img/json-schema.png">
19+
</Feature>
20+
<Feature Title="JSON Path"
21+
Description="@IndexContent.PathTagline"
22+
PlaygroundUrl="json-path"
23+
DocsUrl="https://docs.json-everything.net/path/basics/"
24+
ImageUrl="img/json-path.png"
25+
Flipped="true">
26+
</Feature>
27+
<Feature Title="JSON-e"
28+
Description="@IndexContent.JsonETagline"
29+
PlaygroundUrl="json-e"
30+
DocsUrl="https://docs.json-everything.net/json-e/basics/"
31+
ImageUrl="img/json-e.png">
32+
</Feature>
33+
<Feature Title="JSON Logic"
34+
Description="@IndexContent.LogicTagline"
35+
PlaygroundUrl="json-logic"
36+
DocsUrl="https://docs.json-everything.net/pointer/basics/"
37+
ImageUrl="img/json-logic.png"
38+
Flipped="true">
39+
</Feature>
40+
<Feature Title="JSON Patch"
41+
Description="@IndexContent.PatchTagline"
42+
PlaygroundUrl="json-patch"
43+
DocsUrl="https://docs.json-everything.net/patch/basics/"
44+
ImageUrl="img/json-patch.png">
45+
</Feature>
46+
<Feature Title="JSON Pointer"
47+
Description="@IndexContent.PointerTagline"
48+
PlaygroundUrl="json-pointer"
49+
DocsUrl="https://docs.json-everything.net/pointer/basics/"
50+
ImageUrl="img/json-pointer.png"
51+
Flipped="true">
52+
</Feature>
53+
</div>
54+
</div>

LearnJsonEverything/Program.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using Blazored.LocalStorage;
2+
using LearnJsonEverything;
3+
using LearnJsonEverything.Services;
4+
using Microsoft.AspNetCore.Components.Web;
5+
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
6+
7+
var builder = WebAssemblyHostBuilder.CreateDefault(args);
8+
builder.RootComponents.Add<App>("#app");
9+
builder.RootComponents.Add<HeadOutlet>("head::after");
10+
11+
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
12+
builder.Services.AddBlazoredLocalStorageAsSingleton();
13+
builder.Services.AddSingleton<DataManager>();
14+
15+
var host = builder.Build();
16+
var client = host.Services.GetService<HttpClient>();
17+
18+
await host.RunAsync();
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "http://localhost:34206",
7+
"sslPort": 44350
8+
}
9+
},
10+
"profiles": {
11+
"json-everything.net": {
12+
"commandName": "Project",
13+
"dotnetRunMessages": true,
14+
"launchBrowser": true,
15+
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
16+
"applicationUrl": "https://localhost:7154;http://localhost:5154",
17+
"environmentVariables": {
18+
"ASPNETCORE_ENVIRONMENT": "Development"
19+
}
20+
},
21+
"IIS Express": {
22+
"commandName": "IISExpress",
23+
"launchBrowser": true,
24+
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
25+
"environmentVariables": {
26+
"ASPNETCORE_ENVIRONMENT": "Development"
27+
}
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)