-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- from Razor Class Lib to Stand Alone Blazor Wasm app.
- Loading branch information
Showing
46 changed files
with
679 additions
and
99 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
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,4 @@ | ||
<BlazingStoryApp Assemblies="[typeof(App).Assembly]" | ||
DefaultLayout="typeof(DefaultLayout)" | ||
EnableHotReloading="true"> | ||
</BlazingStoryApp> |
File renamed without changes.
16 changes: 8 additions & 8 deletions
16
...ib.Stories/MyRazorClassLib.Stories.csproj → ...1.Stories/MyBlazorWasmApp1.Stories.csproj
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,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> | ||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<NoWarn>$(NoWarn);1591</NoWarn> | ||
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(MSBuildProjectName).xml</DocumentationFile> | ||
<BlazorEnableCompression>true</BlazorEnableCompression> | ||
<GenerateDocumentationFile>True</GenerateDocumentationFile> | ||
<InvariantGlobalization>true</InvariantGlobalization> | ||
<BlazorEnableTimeZoneSupport>false</BlazorEnableTimeZoneSupport> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="BlazingStory" Version="1.0.0-preview.28" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.2" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.2" PrivateAssets="all" /> | ||
<PackageReference Include="BlazingStory" Version="1.0.0-preview.31" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.3" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.3" PrivateAssets="all" /> | ||
<PackageReference Include="PublishSPAforGitHubPages.Build" Version="2.1.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\MyRazorClassLib\MyRazorClassLib.csproj" /> | ||
<ProjectReference Include="..\MyBlazorWasmApp1\MyBlazorWasmApp1.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
2 changes: 1 addition & 1 deletion
2
...assLib/MyRazorClassLib.Stories/Program.cs → ...mApp1/MyBlazorWasmApp1.Stories/Program.cs
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
3 changes: 3 additions & 0 deletions
3
Samples/MyBlazorWasmApp1/MyBlazorWasmApp1.Stories/Shared/DefaultLayout.razor
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,3 @@ | ||
@inherits LayoutComponentBase | ||
@* See also: https://github.com/jsakamoto/BlazingStory#%EF%B8%8F-configure-layouts *@ | ||
@Body |
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.10.34707.107 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyBlazorWasmApp1", "MyBlazorWasmApp1\MyBlazorWasmApp1.csproj", "{9EC9C26C-22C5-4128-B100-AA5023FB0045}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyBlazorWasmApp1.Stories", "MyBlazorWasmApp1.Stories\MyBlazorWasmApp1.Stories.csproj", "{5CC24B2C-F708-43FF-808D-112F8D38A669}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{9EC9C26C-22C5-4128-B100-AA5023FB0045}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{9EC9C26C-22C5-4128-B100-AA5023FB0045}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{9EC9C26C-22C5-4128-B100-AA5023FB0045}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{9EC9C26C-22C5-4128-B100-AA5023FB0045}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{5CC24B2C-F708-43FF-808D-112F8D38A669}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{5CC24B2C-F708-43FF-808D-112F8D38A669}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{5CC24B2C-F708-43FF-808D-112F8D38A669}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{5CC24B2C-F708-43FF-808D-112F8D38A669}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {C6CB1969-2368-4874-9A53-8B33CBDFFD25} | ||
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<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 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
2 changes: 1 addition & 1 deletion
2
...yRazorClassLib/Components/Button.razor.cs → ...BlazorWasmApp1/Components/Button.razor.cs
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
22 changes: 22 additions & 0 deletions
22
Samples/MyBlazorWasmApp1/MyBlazorWasmApp1/Components/ButtonSize.cs
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,22 @@ | ||
namespace MyBlazorWasmApp1.Components; | ||
|
||
/// <summary> | ||
/// Represents the size of a button. | ||
/// </summary> | ||
public enum ButtonSize | ||
{ | ||
/// <summary> | ||
/// Small button size. | ||
/// </summary> | ||
Small, | ||
|
||
/// <summary> | ||
/// Medium button size. | ||
/// </summary> | ||
Medium, | ||
|
||
/// <summary> | ||
/// Large button size. | ||
/// </summary> | ||
Large | ||
} |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...yRazorClassLib/Components/Rating.razor.cs → ...BlazorWasmApp1/Components/Rating.razor.cs
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
16 changes: 16 additions & 0 deletions
16
Samples/MyBlazorWasmApp1/MyBlazorWasmApp1/Layout/MainLayout.razor
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,16 @@ | ||
@inherits LayoutComponentBase | ||
<div class="page"> | ||
<div class="sidebar"> | ||
<NavMenu /> | ||
</div> | ||
|
||
<main> | ||
<div class="top-row px-4"> | ||
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a> | ||
</div> | ||
|
||
<article class="content px-4"> | ||
@Body | ||
</article> | ||
</main> | ||
</div> |
77 changes: 77 additions & 0 deletions
77
Samples/MyBlazorWasmApp1/MyBlazorWasmApp1/Layout/MainLayout.razor.css
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,77 @@ | ||
.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 { | ||
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.