btcpayserver/BTCPayServer/Views/Shared/_NavLayout.cshtml
2019-11-14 18:42:48 +01:00

45 lines
1.2 KiB
Plaintext

@{
Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.ShowMenu = ViewBag.ShowMenu ?? true;
if (!ViewData.ContainsKey("NavPartialName"))
{
ViewData["NavPartialName"] = "_Nav";
}
var title = $"{(ViewData.ContainsKey("MainTitle")? $"{ViewData["MainTitle"]}:" : String.Empty)} {ViewData["Title"]}";
}
<section>
<div class="container">
<div class="row">
<div class="col-lg-12 section-heading">
@if (ViewBag.ShowMenu)
{
<h2>@title</h2>
<hr class="primary ml-0">
}
</div>
</div>
<div>
<div class="row">
<div class="col-md-3">
@if (ViewBag.ShowMenu)
{
@await Html.PartialAsync(ViewData["NavPartialName"].ToString())
}
</div>
<div class="col-md-9">
@RenderBody()
</div>
</div>
</div>
</div>
</section>
@section HeadScripts {
@RenderSection("HeadScripts", required: false)
}
@section Scripts {
@RenderSection("Scripts", required: false)
}