diff --git a/src/DfE.CheckPerformanceData.Web/Views/Page/Content.cshtml b/src/DfE.CheckPerformanceData.Web/Views/Page/Content.cshtml index dc61777a..a003b671 100644 --- a/src/DfE.CheckPerformanceData.Web/Views/Page/Content.cshtml +++ b/src/DfE.CheckPerformanceData.Web/Views/Page/Content.cshtml @@ -82,7 +82,7 @@ } @await Html.PartialAsync("ContentPages/_ContentNodes", content) -@* Back-to-top now lives in _Layout.cshtml so every page gets it universally. *@ +@await Html.PartialAsync("ContentPages/_BackToTop") @* Equalise the height of dfe-cards that live as direct grandchildren of a govuk-grid-row. Flex-wrap keeps cards in the same VISUAL row equal, but cards that wrap to a new row are diff --git a/src/DfE.CheckPerformanceData.Web/Views/Page/Wiki.cshtml b/src/DfE.CheckPerformanceData.Web/Views/Page/Wiki.cshtml index e7e41fcd..c17f9f2e 100644 --- a/src/DfE.CheckPerformanceData.Web/Views/Page/Wiki.cshtml +++ b/src/DfE.CheckPerformanceData.Web/Views/Page/Wiki.cshtml @@ -29,4 +29,8 @@ -@* Back-to-top now lives in _Layout.cshtml so every page gets it universally. *@ +@* Placed OUTSIDE the govuk-grid-row so its natural position is below all page content — + position:sticky needs the natural position to sit below the viewport for the pin to + engage. Rendering it here (rather than inside the one-third column) makes the wiki + layout behave identically to the full-width Content.cshtml pages. *@ +@await Html.PartialAsync("ContentPages/_BackToTop") diff --git a/src/DfE.CheckPerformanceData.Web/Views/Shared/_AdminLayout.cshtml b/src/DfE.CheckPerformanceData.Web/Views/Shared/_AdminLayout.cshtml index 4546bb55..2c181eff 100644 --- a/src/DfE.CheckPerformanceData.Web/Views/Shared/_AdminLayout.cshtml +++ b/src/DfE.CheckPerformanceData.Web/Views/Shared/_AdminLayout.cshtml @@ -192,10 +192,6 @@
@RenderBody() - @* Universal back-to-top link — rendered inside
so its natural - position is below all page content in the admin column. Sticky until - the reader scrolls past the fold, then releases above the footer. *@ - @await Html.PartialAsync("ContentPages/_BackToTop")
} @@ -213,8 +209,6 @@ else
@RenderBody() - @* Universal back-to-top link — see comment on the wide variant above. *@ - @await Html.PartialAsync("ContentPages/_BackToTop")
@@ -254,10 +248,5 @@ else responds to clicks — the shared _Layout also loads it, but admin views run under this layout instead. *@ - @* Back-to-top reveal-on-scroll enhancement — loaded here for the same reason - as the shared _Layout: admin views don't inherit from _Layout, so the script - needs its own registration on the admin bundle. defer keeps the fetch off - the critical path. *@ - @RenderSection("Scripts", required: false) } diff --git a/src/DfE.CheckPerformanceData.Web/Views/Shared/_Layout.cshtml b/src/DfE.CheckPerformanceData.Web/Views/Shared/_Layout.cshtml index 6d5fb1e6..ba5c9c09 100644 --- a/src/DfE.CheckPerformanceData.Web/Views/Shared/_Layout.cshtml +++ b/src/DfE.CheckPerformanceData.Web/Views/Shared/_Layout.cshtml @@ -145,12 +145,6 @@ @Html.GovUkFrontendJsEnabledScript() @await Html.PartialAsync("_ContactUsBanner") @RenderBody() -@* Universal back-to-top link. Rendered here (rather than per-view) so every long - page — search results, dashboards, admin lists, CMS content — gets it without - having to remember to include the partial. The script is hidden-until-scroll - so short pages never show it, and the container collapses to zero height while - hidden so no phantom footer gap. *@ -@await Html.PartialAsync("ContentPages/_BackToTop") @Html.GovUkFrontendScriptImports() @section Footer { diff --git a/src/DfE.CheckPerformanceData.Web/Views/Shared/_ShareLayout.cshtml b/src/DfE.CheckPerformanceData.Web/Views/Shared/_ShareLayout.cshtml index d2d27e23..72fe2a15 100644 --- a/src/DfE.CheckPerformanceData.Web/Views/Shared/_ShareLayout.cshtml +++ b/src/DfE.CheckPerformanceData.Web/Views/Shared/_ShareLayout.cshtml @@ -29,23 +29,10 @@
@RenderBody() - @* Universal back-to-top link — long share pages (aggregate dashboards, replays) - benefit from a jump-to-top; the partial is hidden-until-scroll so short pages - see nothing. No dependency on the admin nav / GTM the rest of this layout - deliberately omits — just an anchor + a small enhancement script. *@ - @await Html.PartialAsync("ContentPages/_BackToTop")
@Html.GovUkFrontendScriptImports() -@section BodyEnd { - @* Back-to-top reveal-on-scroll enhancement. Share layout otherwise runs script- - light (no cookies.js, no admin bundles) — this one enhancement script is - small and defers off the critical path so the tokened share page renders - fast even on constrained networks. *@ - -} - @section Footer {