Created
May 22, 2020 19:29
-
-
Save gavilanch/b882ab5907e1a14d461c6d9eefc95d9e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@using Microsoft.AspNetCore.Hosting | |
@using Microsoft.AspNetCore.Mvc.ViewEngines | |
@inject IWebHostEnvironment Environment | |
@inject ICompositeViewEngine Engine | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>@ViewData["Title"] - BlazorApp_Scaffolding3.Server</title> | |
<link rel="stylesheet" href="~/Identity/lib/bootstrap/dist/css/bootstrap.min.css" /> | |
<link rel="stylesheet" href="~/Identity/css/site.css" /> | |
</head> | |
<body> | |
<header> | |
<nav class="navbar navbar-expand-sm navbar-light navbar-toggleable-sm bg-white border-bottom box-shadow mb-3"> | |
<div class="container"> | |
<a class="navbar-brand" href="~/">BlazorApp_Scaffolding3.Server</a> | |
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent" | |
aria-expanded="false" aria-label="Toggle navigation"> | |
<span class="navbar-toggler-icon"></span> | |
</button> | |
<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse"> | |
@{ | |
var result = Engine.FindView(ViewContext, "_LoginPartial", isMainPage: false); | |
} | |
@if (result.Success) | |
{ | |
await Html.RenderPartialAsync("_LoginPartial"); | |
} | |
else | |
{ | |
throw new InvalidOperationException("The default Identity UI layout requires a partial view '_LoginPartial' " + | |
"usually located at '/Pages/_LoginPartial' or at '/Views/Shared/_LoginPartial' to work. Based on your configuration " + | |
$"we have looked at it in the following locations: {System.Environment.NewLine}{string.Join(System.Environment.NewLine, result.SearchedLocations)}."); | |
} | |
</div> | |
</div> | |
</nav> | |
</header> | |
<div class="container"> | |
<main role="main" class="pb-3"> | |
@RenderBody() | |
</main> | |
</div> | |
<footer class="footer border-top text-muted"> | |
<div class="container"> | |
© 2020 - BlazorApp_Scaffolding3.Server - <a asp-area="" asp-page="Privacy">Privacy</a> | |
</div> | |
</footer> | |
<script src="~/Identity/lib/jquery/dist/jquery.min.js"></script> | |
<script src="~/Identity/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script> | |
<script src="~/Identity/js/site.js" asp-append-version="true"></script> | |
@RenderSection("Scripts", required: false) | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment