Skip to content

Commit

Permalink
feat(templates): add bswup to Boilerplate project template #6172 (#6173)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi authored Nov 29, 2023
1 parent 2ef7cd6 commit 8c5b2d6
Show file tree
Hide file tree
Showing 16 changed files with 482 additions and 261 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
@*+:cnd:noEmit*@
@using Boilerplate.Client.Web.Shared
@*+:cnd:noEmit*@

@{
var noPrerender = HttpContext.Request.Query["no-prerender"].Count > 0;
var renderMode = noPrerender ? AppRenderMode.NoPrerenderBlazorWebAssembly : AppRenderMode.Current;
}

<!DOCTYPE html>
<html bit-theme="dark">
Expand All @@ -9,9 +15,13 @@
<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 rel="icon" href="_content/Boilerplate.Client.Web/favicon.ico" type="image/x-icon" />
<HeadOutlet @rendermode=RenderModeProvider.Current />
<Link rel="icon" href="favicon.ico" type="image/x-icon" />
<HeadOutlet @rendermode=renderMode />
<Link rel="apple-touch-icon" sizes="512x512" href="images/icons/bit-icon-512.png" />
@if (AppRenderMode.PwaEnabled)
{
<Link rel="manifest" href="manifest.json" />
}
</head>

<body class="@BitCss.Class.Color.Background.Primary @BitCss.Class.Color.Foreground.Primary">
Expand All @@ -25,11 +35,26 @@
<Link rel="stylesheet" href="_content/Boilerplate.Client.Core/styles/app.css" />
<Link rel="stylesheet" href="_content/Boilerplate.Client.Core/Boilerplate.Client.Core.bundle.scp.css" />

<Routes @rendermode=RenderModeProvider.Current />
<Routes @rendermode=renderMode />

@if (HttpContext.Request.IsCrawlerClient() is false)
{
<Script src="_framework/blazor.web.js"></Script>
@if (AppRenderMode.PwaEnabled)
{
<Script src="_framework/blazor.web.js" autostart="false"></Script>
<Script src="_content/Bit.Bswup/bit-bswup.js"
scope="/"
log="none"
sw="service-worker.js"
handler="bitBswupHandler"
blazorScript="_framework/blazor.web.js"></Script>
<Script src="_content/Bit.Bswup/bit-bswup.progress.js"></Script>
<AppBswupProgressBar />
}
else
{
<Script src="_framework/blazor.web.js"></Script>
}
<Script src="_content/Bit.BlazorUI/scripts/bit.blazorui.js"></Script>
<Script src="_content/Boilerplate.Client.Core/scripts/app.js"></Script>
@*#if (sample == "Admin")*@
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8c5b2d6

Please sign in to comment.