Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DfE.CheckPerformanceData.Web/Views/Page/Content.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/DfE.CheckPerformanceData.Web/Views/Page/Wiki.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@
</div>
</div>

@* 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")
11 changes: 0 additions & 11 deletions src/DfE.CheckPerformanceData.Web/Views/Shared/_AdminLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,6 @@
</button>
<main class="admin-main" id="main-content">
@RenderBody()
@* Universal back-to-top link — rendered inside <main> 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")
</main>
</div>
}
Expand All @@ -213,8 +209,6 @@ else
</button>
<main class="admin-main" id="main-content">
@RenderBody()
@* Universal back-to-top link — see comment on the wide variant above. *@
@await Html.PartialAsync("ContentPages/_BackToTop")
</main>
</div>
</div>
Expand Down Expand Up @@ -254,10 +248,5 @@ else
responds to clicks — the shared _Layout also loads it, but admin views run under
this layout instead. *@
<script src="~/js/confirm-modal.js" defer></script>
@* 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. *@
<script src="~/js/back-to-top.js" defer asp-append-version="true"></script>
@RenderSection("Scripts", required: false)
}
6 changes: 0 additions & 6 deletions src/DfE.CheckPerformanceData.Web/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
13 changes: 0 additions & 13 deletions src/DfE.CheckPerformanceData.Web/Views/Shared/_ShareLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,10 @@
<div class="govuk-width-container">
<main class="govuk-main-wrapper" id="main-content">
@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")
</main>
</div>
@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. *@
<script src="~/js/back-to-top.js" defer asp-append-version="true"></script>
}

@section Footer {
<footer class="govuk-footer">
<div class="govuk-width-container">
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading