From 330e00cb13056e97403d5e04adab3e7392e6051b Mon Sep 17 00:00:00 2001 From: ThomasWhittington <46750921+ThomasWhittington@users.noreply.github.com> Date: Thu, 5 Sep 2024 13:53:52 +0100 Subject: [PATCH] "Bits and Bats". Required changes for plantech integration (#158) * feat: changed header logo to go to self-assessment (#153) Co-authored-by: Tom Whittington * Fix/bleeding links (#154) * fix: feedback link fixed * Fix: Fixed bleeding links --------- Co-authored-by: Tom Whittington * fix: added missing span from feedback banner * feature: setup to use plantechs head and cookies when ran with it (#156) * feature: setup to use plantechs head and cookies when ran with it * fix: added a title to the gtm iframe * chore: using index reference rather than .First --------- Co-authored-by: Tom Whittington --------- Co-authored-by: Tom Whittington --- .../_CookieBanner.cshtml} | 0 .../Views/Shared/RichText/_HyperLink.cshtml | 6 +-- .../Views/Shared/_BetaHeader.cshtml | 9 ++-- .../Views/Shared/_BodyEnd.cshtml | 4 ++ .../Views/Shared/_CsBeforeContent.cshtml | 10 ++++ .../Views/Shared/_CsHeader.cshtml | 26 +++++---- .../Views/Shared/_CsLayout.cshtml | 54 +++---------------- .../Views/Shared/_Head.cshtml | 14 +++++ 8 files changed, 56 insertions(+), 67 deletions(-) rename src/Dfe.ContentSupport.Web/Views/Shared/{_CookieConsent.cshtml => CookiesBanner/_CookieBanner.cshtml} (100%) create mode 100644 src/Dfe.ContentSupport.Web/Views/Shared/_BodyEnd.cshtml create mode 100644 src/Dfe.ContentSupport.Web/Views/Shared/_CsBeforeContent.cshtml create mode 100644 src/Dfe.ContentSupport.Web/Views/Shared/_Head.cshtml diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_CookieConsent.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/CookiesBanner/_CookieBanner.cshtml similarity index 100% rename from src/Dfe.ContentSupport.Web/Views/Shared/_CookieConsent.cshtml rename to src/Dfe.ContentSupport.Web/Views/Shared/CookiesBanner/_CookieBanner.cshtml diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_HyperLink.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_HyperLink.cshtml index 46be2f8..ab2f610 100644 --- a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_HyperLink.cshtml +++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_HyperLink.cshtml @@ -2,11 +2,9 @@ @if (Model.IsVimeo) { - + } else { - - - + } \ No newline at end of file diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml index 70580a5..b39601a 100644 --- a/src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml +++ b/src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml @@ -2,11 +2,8 @@

@* Beta *@ - This is a new service - your - - feedback - will - help us to improve it. + + This is a new service - your feedback will help us to improve it. +

\ No newline at end of file diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_BodyEnd.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/_BodyEnd.cshtml new file mode 100644 index 0000000..49f78dd --- /dev/null +++ b/src/Dfe.ContentSupport.Web/Views/Shared/_BodyEnd.cshtml @@ -0,0 +1,4 @@ + diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_CsBeforeContent.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/_CsBeforeContent.cshtml new file mode 100644 index 0000000..6d28fe4 --- /dev/null +++ b/src/Dfe.ContentSupport.Web/Views/Shared/_CsBeforeContent.cshtml @@ -0,0 +1,10 @@ +@using Dfe.ContentSupport.Web.Configuration +@inject TrackingOptions TrackingOptions + + + + diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_CsHeader.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/_CsHeader.cshtml index 0fb2a92..25d3b2c 100644 --- a/src/Dfe.ContentSupport.Web/Views/Shared/_CsHeader.cshtml +++ b/src/Dfe.ContentSupport.Web/Views/Shared/_CsHeader.cshtml @@ -1,13 +1,17 @@ -
-
- \ No newline at end of file + + diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_CsLayout.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/_CsLayout.cshtml index fa842bf..d6b4001 100644 --- a/src/Dfe.ContentSupport.Web/Views/Shared/_CsLayout.cshtml +++ b/src/Dfe.ContentSupport.Web/Views/Shared/_CsLayout.cshtml @@ -1,64 +1,30 @@ -@using Dfe.ContentSupport.Web.Configuration -@inject TrackingOptions TrackingOptions @model CsPage; @{ Layout = "_GovUkPageTemplate"; ViewData["Title"] = Model.Heading.Title; ViewData["containerClasses"] = "dfe-width-container"; - var consentCookie = Context.Request.Cookies[".AspNet.Consent"]; - var track = consentCookie == "true"; } @section Head { - @{ - if (track) - { - - - - } - } + } @section Header { -
- - - -
- @RenderSection("Header", false) + + @await RenderSectionAsync("Header", false) } @section BeforeContent { - - @{ - if (track) - { - - - - } - } - - @RenderSection("BeforeContent", false) + + @await RenderSectionAsync("BeforeContent", false) } + @RenderBody() @section Footer { @@ -66,10 +32,6 @@ } @section BodyEnd { - - - @RenderSection("BodyEnd", false) + + @await RenderSectionAsync("BodyEnd", false) } \ No newline at end of file diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_Head.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/_Head.cshtml new file mode 100644 index 0000000..afc694d --- /dev/null +++ b/src/Dfe.ContentSupport.Web/Views/Shared/_Head.cshtml @@ -0,0 +1,14 @@ +@using Dfe.ContentSupport.Web.Configuration +@inject TrackingOptions TrackingOptions + + + + + \ No newline at end of file