From e696ac7e92858e988855c29a2320e2c0511f223f Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 3 Dec 2020 10:09:23 +0800 Subject: [PATCH] Update blazor in module. --- .../MyProjectNameBlazorHostModule.cs | 2 +- .../wwwroot/index.html | 46 +++++++-------- .../wwwroot/main.css | 58 ++++++++++++++----- 3 files changed, 68 insertions(+), 38 deletions(-) diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/MyProjectNameBlazorHostModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/MyProjectNameBlazorHostModule.cs index 0500609c9a..4e15ac4691 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/MyProjectNameBlazorHostModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/MyProjectNameBlazorHostModule.cs @@ -76,7 +76,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Host private static void ConfigureUI(WebAssemblyHostBuilder builder) { - builder.RootComponents.Add("app"); + builder.RootComponents.Add("#ApplicationContainer"); } private static void ConfigureHttpClient(ServiceConfigurationContext context, IWebAssemblyHostEnvironment environment) diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/index.html b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/index.html index 99ab025095..a3f7d95c56 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/index.html +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/index.html @@ -7,33 +7,33 @@ MyCompanyName.MyProjectName.Blazor - - - - - - - + + + + + + + + + + - - Loading... - -
- An unhandled error has occurred. - Reload - 🗙 + +
+
+
+
- - +
- - - + + + + + + + - - - - diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/main.css b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/main.css index 23e0f7a249..eb9395b846 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/main.css +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/main.css @@ -1,18 +1,48 @@ -#blazor-error-ui { - background: lightyellow; - bottom: 0; - box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); - display: none; - left: 0; - padding: 0.6rem 1.25rem 0.7rem 1.25rem; +.spinner { + width: 40px; + height: 40px; + display: block; position: fixed; - width: 100%; - z-index: 1000; + top: calc( 50% - ( 40px / 2) ); + right: calc( 50% - ( 40px / 2) ); } -#blazor-error-ui .dismiss { - cursor: pointer; +.double-bounce1, .double-bounce2 { + width: 100%; + height: 100%; + border-radius: 50%; + background-color: #333; + opacity: 0.6; position: absolute; - right: 0.75rem; - top: 0.5rem; -} \ No newline at end of file + top: 0; + left: 0; + -webkit-animation: sk-bounce 2.0s infinite ease-in-out; + animation: sk-bounce 2.0s infinite ease-in-out; +} + +.double-bounce2 { + -webkit-animation-delay: -1.0s; + animation-delay: -1.0s; +} + +@-webkit-keyframes sk-bounce { + 0%, 100% { + -webkit-transform: scale(0.0) + } + + 50% { + -webkit-transform: scale(1.0) + } +} + +@keyframes sk-bounce { + 0%, 100% { + transform: scale(0.0); + -webkit-transform: scale(0.0); + } + + 50% { + transform: scale(1.0); + -webkit-transform: scale(1.0); + } +}