-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial static blazor webassembly deployment
- Loading branch information
Showing
12 changed files
with
234 additions
and
17 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
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
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
11 changes: 10 additions & 1 deletion
11
src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/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
15 changes: 15 additions & 0 deletions
15
...lerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Properties/launchSettings.json
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,15 @@ | ||
{ | ||
"profiles": { | ||
"Boilerplate.Web(BlazorWebAssembly)": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", | ||
"applicationUrl": "http://localhost:4030", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
} | ||
}, | ||
"$schema": "http://json.schemastore.org/launchsettings.json" | ||
} |
110 changes: 110 additions & 0 deletions
110
...emplates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/index.html
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,110 @@ | ||
<!DOCTYPE html> | ||
<html bit-theme="dark"> | ||
<head> | ||
<base href="/"> | ||
<meta charset="utf-8"> | ||
<meta name="theme-color"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta name="description" content="The Boilerplate is built with ASP.NET Core, Identity, Web API, EF Core and Blazor."> | ||
<link href="favicon.ico" rel="icon" type="image/x-icon" /> | ||
<link href="images/icons/bit-icon-512.png" rel="apple-touch-icon" sizes="512x512" /> | ||
<link href="manifest.json" rel="manifest" /> | ||
</head> | ||
<body class="bit-css-clr-bg-primary bit-css-clr-fg-primary bit-blazor-web"> | ||
<link href="_content/Bit.BlazorUI/styles/bit.blazorui.css" rel="stylesheet" /> | ||
<link href="_content/Bit.BlazorUI.Icons/styles/bit.blazorui.icons.css" rel="stylesheet" /> | ||
<link href="_content/Bit.BlazorUI.Assets/styles/bit.blazorui.assets.css" rel="stylesheet" /> | ||
<!--#if (sample == "Admin") --> | ||
<link href="_content/Bit.BlazorUI.Extras/styles/bit.blazorui.extras.css" rel="stylesheet" /> | ||
<!--#endif --> | ||
<link href="_content/Boilerplate.Client.Core/styles/app.css" rel="stylesheet" /> | ||
<link href="_content/Boilerplate.Client.Core/Boilerplate.Client.Core.bundle.scp.css" rel="stylesheet" /> | ||
<script src="_framework/blazor.webassembly.js" autostart="false"></script> | ||
<script src="_content/Bit.Bswup/bit-bswup.js" blazorScript="_framework/blazor.webassembly.js"></script> | ||
<script src="_content/Bit.Bswup/bit-bswup.progress.js"></script> | ||
<style> | ||
#bit-bswup { | ||
top: 2px; | ||
left: 50%; | ||
display: none; | ||
position: fixed; | ||
z-index: 999999999; | ||
text-align: center; | ||
transform: translateX(-50%); | ||
font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; | ||
} | ||
|
||
#bit-bswup .bswup-container { | ||
width: 3rem; | ||
height: 3rem; | ||
display: block; | ||
position: relative; | ||
} | ||
|
||
#bit-bswup .bswup-container circle { | ||
fill: none; | ||
stroke: #e0e0e0; | ||
stroke-width: 0.2rem; | ||
transform-origin: 50% 50%; | ||
transform: rotate(-90deg); | ||
} | ||
|
||
#bit-bswup .bswup-container circle:last-child { | ||
stroke: #1b6ec2; | ||
transition: stroke-dasharray 0.05s ease-in-out; | ||
stroke-dasharray: calc(3.141 * var(--bit-bswup-percent, 0%) * 0.8), 500%; | ||
} | ||
|
||
#bit-bswup .bswup-progress-text { | ||
top: 50%; | ||
left: 50%; | ||
font-size: 12px; | ||
position: absolute; | ||
text-align: center; | ||
font-weight: normal; | ||
transform: translate(-50%, -50%); | ||
} | ||
|
||
#bit-bswup .bswup-progress-text::after { | ||
content: var(--bit-bswup-percent-text, ""); | ||
} | ||
|
||
/* If you want the update to be applied after the user approves the new Pwa version and not automatically, | ||
set first parameter of startBswupProgress (AutoReload) to false and uncomment the following code: */ | ||
/* | ||
#bit-bswup-reload { | ||
top: 38px; | ||
left: 50%; | ||
display: none; | ||
cursor: pointer; | ||
position: fixed; | ||
padding: 4px 8px; | ||
z-index: 999999999; | ||
border-radius: 2px; | ||
transform: translateX(-50%); | ||
} | ||
*/ | ||
</style> | ||
<div> | ||
<div id="app-container"> | ||
<div id="bit-bswup"> | ||
<div class="bswup-progress-text"></div> | ||
<svg class="bswup-container"> | ||
<circle r="40%" cx="50%" cy="50%"></circle> | ||
<circle r="40%" cx="50%" cy="50%"></circle> | ||
</svg> | ||
<img style="display: none" src onerror="startBswupProgress(true, false, false, '#app-container', false, '')" /> | ||
</div> | ||
</div> | ||
</div> | ||
<script src="_content/Bit.Butil/bit-butil.js"></script> | ||
<!--#if (offlineDb == true) --> | ||
<script src="_content/Bit.Besql/bit-besql.js"></script> | ||
<!--#endif --> | ||
<script src="_content/Bit.BlazorUI/scripts/bit.blazorui.js"></script> | ||
<script src="_content/Boilerplate.Client.Core/scripts/app.js"></script> | ||
<!--#if (sample == "Admin") --> | ||
<script src="_content/Bit.BlazorUI.Extras/scripts/bit.blazorui.extras.js"></script> | ||
<!--#endif --> | ||
</body> | ||
</html> |
45 changes: 41 additions & 4 deletions
45
...s/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.js
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,4 +1,41 @@ | ||
// In development, always fetch from the network and do not enable offline support. | ||
// This is because caching would make development more difficult (changes would not | ||
// be reflected on the first load after each change). | ||
self.addEventListener('fetch', () => { }); | ||
// bit version: 8.7.2-pre-01 | ||
// https://github.com/bitfoundation/bitplatform/tree/develop/src/Bswup | ||
|
||
self.assetsInclude = []; | ||
self.assetsExclude = [ | ||
/bit\.blazorui\.fluent\.css$/, | ||
/bit\.blazorui\.fluent-dark\.css$/, | ||
/bit\.blazorui\.fluent-light\.css$/, | ||
/Client\.Web\.styles\.css$/ // In .NET 8, an inexistent CSS file is inadvertently included in the assets list under the name 'Boilerplate.Client.Web.styles.css.' | ||
// Subsequently, during the download process of assets list files, bswup attempts to retrieve this non - existent CSS file along with others. | ||
// It is imperative that we expunge this file from the assets list. | ||
]; | ||
self.externalAssets = [ | ||
{ | ||
"url": "/" | ||
}, | ||
{ | ||
"url": "_framework\/blazor.web.js" | ||
}, | ||
{ | ||
"url": "_framework\/blazor.webassembly.js" | ||
} | ||
]; | ||
|
||
self.serverHandledUrls = [ | ||
/\/api\//, | ||
/\/odata\//, | ||
/\/jobs\//, | ||
/\/core\//, | ||
/\/signalr\//, | ||
/\/healthchecks-ui/, | ||
/\/healthz/, | ||
/\/swagger/ | ||
]; | ||
|
||
self.defaultUrl = "/"; | ||
self.caseInsensitiveUrl = true; | ||
self.noPrerenderQuery = 'no-prerender=true'; | ||
self.isPassive = self.disablePassiveFirstBoot = true; | ||
|
||
self.importScripts('_content/Bit.Bswup/bit-bswup.sw.js'); |
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