From 38af36d0ebeb41a80a88896f491d388a54dd627a Mon Sep 17 00:00:00 2001 From: ThomasWhittington <46750921+ThomasWhittington@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:50:16 +0100 Subject: [PATCH 1/4] feat: changed header logo to go to self-assessment (#153) Co-authored-by: Tom Whittington --- src/Dfe.ContentSupport.Web/Views/Shared/_CsHeader.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_CsHeader.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/_CsHeader.cshtml index 0fb2a92..b4bdf6a 100644 --- a/src/Dfe.ContentSupport.Web/Views/Shared/_CsHeader.cshtml +++ b/src/Dfe.ContentSupport.Web/Views/Shared/_CsHeader.cshtml @@ -1,7 +1,7 @@
\ No newline at end of file From 592a0a64a51c1b08efca901ce83448afbc9c6416 Mon Sep 17 00:00:00 2001 From: Tom Whittington Date: Tue, 3 Sep 2024 11:22:07 +0100 Subject: [PATCH 3/4] fix: added missing span from feedback banner --- src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml index 790376a..b39601a 100644 --- a/src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml +++ b/src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml @@ -2,8 +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 From 4ab2bba4d7e46303accf0c2f83a3cabbfaac8179 Mon Sep 17 00:00:00 2001 From: ThomasWhittington <46750921+ThomasWhittington@users.noreply.github.com> Date: Thu, 5 Sep 2024 10:57:18 +0100 Subject: [PATCH 4/4] 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 --- .../_CookieBanner.cshtml} | 0 .../Views/Shared/RichText/_HyperLink.cshtml | 2 +- .../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 +++++ 7 files changed, 52 insertions(+), 58 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 8f82978..ab2f610 100644 --- a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_HyperLink.cshtml +++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_HyperLink.cshtml @@ -6,5 +6,5 @@ } else { - + } \ 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 b4bdf6a..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