-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
607 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,65 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.30114.105 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.1.31828.382 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWebAssemblyPrerendering.Client", "Client\BlazorWebAssemblyPrerendering.Client.csproj", "{39E56246-CA39-4ECE-9B9F-6B6A507FE4BE}" | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWebAssemblyPrerendering.Client", "Client\BlazorWebAssemblyPrerendering.Client.csproj", "{9CEAB43D-FD2D-4104-8644-A7DC89C0C475}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWebAssemblyPrerendering.Shared", "Shared\BlazorWebAssemblyPrerendering.Shared.csproj", "{832A1DA6-5C16-4230-99D9-E305899754D5}" | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWebAssemblyPrerendering.Server", "Server\BlazorWebAssemblyPrerendering.Server.csproj", "{2102677E-045B-4032-8AAF-07DD4B0ABB4D}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWebAssemblyPrerendering.Server", "Server\BlazorWebAssemblyPrerendering.Server.csproj", "{D643F5A2-5D13-4790-A55C-2AEA9D09975C}" | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWebAssemblyPrerendering.Shared", "Shared\BlazorWebAssemblyPrerendering.Shared.csproj", "{8DDC8CA6-EA1D-4B69-8912-FE9126B93DF3}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {F115665D-D5EF-4FDF-A6EF-15B3D14E6CCE} | ||
EndGlobalSection | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{39E56246-CA39-4ECE-9B9F-6B6A507FE4BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{39E56246-CA39-4ECE-9B9F-6B6A507FE4BE}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{39E56246-CA39-4ECE-9B9F-6B6A507FE4BE}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{39E56246-CA39-4ECE-9B9F-6B6A507FE4BE}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{832A1DA6-5C16-4230-99D9-E305899754D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{832A1DA6-5C16-4230-99D9-E305899754D5}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{832A1DA6-5C16-4230-99D9-E305899754D5}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{832A1DA6-5C16-4230-99D9-E305899754D5}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{D643F5A2-5D13-4790-A55C-2AEA9D09975C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D643F5A2-5D13-4790-A55C-2AEA9D09975C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D643F5A2-5D13-4790-A55C-2AEA9D09975C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D643F5A2-5D13-4790-A55C-2AEA9D09975C}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{9CEAB43D-FD2D-4104-8644-A7DC89C0C475}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{9CEAB43D-FD2D-4104-8644-A7DC89C0C475}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{9CEAB43D-FD2D-4104-8644-A7DC89C0C475}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{9CEAB43D-FD2D-4104-8644-A7DC89C0C475}.Debug|x64.Build.0 = Debug|Any CPU | ||
{9CEAB43D-FD2D-4104-8644-A7DC89C0C475}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{9CEAB43D-FD2D-4104-8644-A7DC89C0C475}.Debug|x86.Build.0 = Debug|Any CPU | ||
{9CEAB43D-FD2D-4104-8644-A7DC89C0C475}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{9CEAB43D-FD2D-4104-8644-A7DC89C0C475}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{9CEAB43D-FD2D-4104-8644-A7DC89C0C475}.Release|x64.ActiveCfg = Release|Any CPU | ||
{9CEAB43D-FD2D-4104-8644-A7DC89C0C475}.Release|x64.Build.0 = Release|Any CPU | ||
{9CEAB43D-FD2D-4104-8644-A7DC89C0C475}.Release|x86.ActiveCfg = Release|Any CPU | ||
{9CEAB43D-FD2D-4104-8644-A7DC89C0C475}.Release|x86.Build.0 = Release|Any CPU | ||
{2102677E-045B-4032-8AAF-07DD4B0ABB4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{2102677E-045B-4032-8AAF-07DD4B0ABB4D}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{2102677E-045B-4032-8AAF-07DD4B0ABB4D}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{2102677E-045B-4032-8AAF-07DD4B0ABB4D}.Debug|x64.Build.0 = Debug|Any CPU | ||
{2102677E-045B-4032-8AAF-07DD4B0ABB4D}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{2102677E-045B-4032-8AAF-07DD4B0ABB4D}.Debug|x86.Build.0 = Debug|Any CPU | ||
{2102677E-045B-4032-8AAF-07DD4B0ABB4D}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{2102677E-045B-4032-8AAF-07DD4B0ABB4D}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{2102677E-045B-4032-8AAF-07DD4B0ABB4D}.Release|x64.ActiveCfg = Release|Any CPU | ||
{2102677E-045B-4032-8AAF-07DD4B0ABB4D}.Release|x64.Build.0 = Release|Any CPU | ||
{2102677E-045B-4032-8AAF-07DD4B0ABB4D}.Release|x86.ActiveCfg = Release|Any CPU | ||
{2102677E-045B-4032-8AAF-07DD4B0ABB4D}.Release|x86.Build.0 = Release|Any CPU | ||
{8DDC8CA6-EA1D-4B69-8912-FE9126B93DF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{8DDC8CA6-EA1D-4B69-8912-FE9126B93DF3}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{8DDC8CA6-EA1D-4B69-8912-FE9126B93DF3}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{8DDC8CA6-EA1D-4B69-8912-FE9126B93DF3}.Debug|x64.Build.0 = Debug|Any CPU | ||
{8DDC8CA6-EA1D-4B69-8912-FE9126B93DF3}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{8DDC8CA6-EA1D-4B69-8912-FE9126B93DF3}.Debug|x86.Build.0 = Debug|Any CPU | ||
{8DDC8CA6-EA1D-4B69-8912-FE9126B93DF3}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{8DDC8CA6-EA1D-4B69-8912-FE9126B93DF3}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{8DDC8CA6-EA1D-4B69-8912-FE9126B93DF3}.Release|x64.ActiveCfg = Release|Any CPU | ||
{8DDC8CA6-EA1D-4B69-8912-FE9126B93DF3}.Release|x64.Build.0 = Release|Any CPU | ||
{8DDC8CA6-EA1D-4B69-8912-FE9126B93DF3}.Release|x86.ActiveCfg = Release|Any CPU | ||
{8DDC8CA6-EA1D-4B69-8912-FE9126B93DF3}.Release|x86.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
<Router AppAssembly="@typeof(Program).Assembly"> | ||
<Router AppAssembly="@typeof(App).Assembly"> | ||
<Found Context="routeData"> | ||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> | ||
<FocusOnNavigate RouteData="@routeData" Selector="h1" /> | ||
</Found> | ||
<NotFound> | ||
<PageTitle>Not found</PageTitle> | ||
<LayoutView Layout="@typeof(MainLayout)"> | ||
<p>Sorry, there's nothing at this address.</p> | ||
<p role="alert">Sorry, there's nothing at this address.</p> | ||
</LayoutView> | ||
</NotFound> | ||
</Router> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,18 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<OutputType>Exe</OutputType> | ||
<LangVersion>7.3</LangVersion> | ||
<RazorLangVersion>3.0</RazorLangVersion> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.0.0-preview9.19465.2" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.0.0-preview9.19465.2" PrivateAssets="all" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="3.0.0-preview9.19465.2" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="3.0.0-preview9.19465.2" PrivateAssets="all" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0" PrivateAssets="all" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Shared\BlazorWebAssemblyPrerendering.Shared.csproj" /> | ||
</ItemGroup> | ||
|
||
<ProjectExtensions><VisualStudio><UserProperties properties_4launchsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions> | ||
|
||
</Project> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
@page "/" | ||
|
||
<PageTitle>Index</PageTitle> | ||
|
||
<h1>Hello, world!</h1> | ||
|
||
Welcome to your new app. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
using Microsoft.AspNetCore.Blazor.Hosting; | ||
using BlazorWebAssemblyPrerendering.Client; | ||
using BlazorWebAssemblyPrerendering.Shared; | ||
using Microsoft.AspNetCore.Components.Web; | ||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting; | ||
|
||
namespace BlazorWebAssemblyWithPrerendering.Client | ||
{ | ||
public class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
CreateHostBuilder(args).Build().Run(); | ||
} | ||
var builder = WebAssemblyHostBuilder.CreateDefault(args); | ||
builder.RootComponents.Add<App>("#app"); | ||
builder.RootComponents.Add<HeadOutlet>("head::after"); | ||
|
||
public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => | ||
BlazorWebAssemblyHost.CreateDefaultBuilder() | ||
.UseBlazorStartup<Startup>(); | ||
} | ||
} | ||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); | ||
builder.Services.AddScoped<IWeatherForecastService, WeatherForecastService>(); | ||
|
||
await builder.Build().RunAsync(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
@inherits LayoutComponentBase | ||
|
||
<div class="sidebar"> | ||
<NavMenu /> | ||
</div> | ||
|
||
<div class="main"> | ||
<div class="top-row px-4"> | ||
<a href="http://blazor.net" target="_blank" class="ml-md-auto">About</a> | ||
<div class="page"> | ||
<div class="sidebar"> | ||
<NavMenu /> | ||
</div> | ||
|
||
<div class="content px-4"> | ||
@Body | ||
</div> | ||
<main> | ||
<div class="top-row px-4"> | ||
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a> | ||
</div> | ||
|
||
<article class="content px-4"> | ||
@Body | ||
</article> | ||
</main> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
.page { | ||
position: relative; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
main { | ||
flex: 1; | ||
} | ||
|
||
.sidebar { | ||
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); | ||
} | ||
|
||
.top-row { | ||
background-color: #f7f7f7; | ||
border-bottom: 1px solid #d6d5d5; | ||
justify-content: flex-end; | ||
height: 3.5rem; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.top-row ::deep a, .top-row ::deep .btn-link { | ||
white-space: nowrap; | ||
margin-left: 1.5rem; | ||
text-decoration: none; | ||
} | ||
|
||
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
.top-row ::deep a:first-child { | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
} | ||
|
||
@media (max-width: 640.98px) { | ||
.top-row:not(.auth) { | ||
display: none; | ||
} | ||
|
||
.top-row.auth { | ||
justify-content: space-between; | ||
} | ||
|
||
.top-row ::deep a, .top-row ::deep .btn-link { | ||
margin-left: 0; | ||
} | ||
} | ||
|
||
@media (min-width: 641px) { | ||
.page { | ||
flex-direction: row; | ||
} | ||
|
||
.sidebar { | ||
width: 250px; | ||
height: 100vh; | ||
position: sticky; | ||
top: 0; | ||
} | ||
|
||
.top-row { | ||
position: sticky; | ||
top: 0; | ||
z-index: 1; | ||
} | ||
|
||
.top-row.auth ::deep a:first-child { | ||
flex: 1; | ||
text-align: right; | ||
width: 0; | ||
} | ||
|
||
.top-row, article { | ||
padding-left: 2rem !important; | ||
padding-right: 1.5rem !important; | ||
} | ||
} |
Oops, something went wrong.