mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
ce174d507d
* Prevent initial scroll to section nav On pages taht contain a section nav (sub navigation) the previous `scrollIntoView` led to an initial scroll position start at the section nav. See the store or server settings for examples. This fixes it so that the scroll vertical position always starts at 0. * Mobile: Prevent anchors from disappearing underneath the fixed header * Add content padding top to scroll padding
33 lines
762 B
Plaintext
33 lines
762 B
Plaintext
@using NBitcoin
|
|
@{
|
|
Layout = "/Views/Shared/_Layout.cshtml";
|
|
ViewBag.ShowMenu = ViewBag.ShowMenu ?? true;
|
|
if (!ViewData.ContainsKey("NavPartialName"))
|
|
{
|
|
ViewData["NavPartialName"] = "_Nav";
|
|
}
|
|
}
|
|
|
|
@section PageHeadContent {
|
|
@await RenderSectionAsync("PageHeadContent", false)
|
|
}
|
|
|
|
@section PageFootContent {
|
|
@await RenderSectionAsync("PageFootContent", false)
|
|
}
|
|
|
|
@if (ViewBag.ShowMenu)
|
|
{
|
|
<partial name="@ViewData["NavPartialName"].ToString()" />
|
|
<script>
|
|
(function () {
|
|
const activeEl = document.querySelector('#SectionNav .nav .active')
|
|
if (activeEl) activeEl.scrollIntoView({ block: 'end', inline: 'center' })
|
|
})()
|
|
</script>
|
|
}
|
|
|
|
<partial name="_StatusMessage" />
|
|
|
|
@RenderBody()
|