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..8de9cec --- /dev/null +++ b/src/Dfe.ContentSupport.Web/Views/Shared/_BodyEnd.cshtml @@ -0,0 +1,11 @@ + \ No newline at end of file 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 5aed44a..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,17 +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