Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Bits and Bats". Required changes for plantech integration #158

Merged
merged 4 commits into from
Sep 5, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

@if (Model.IsVimeo)
{
<partial name="RichText/_Vimeo" model="@Model" />
<partial name="RichText/_Vimeo" model="@Model"/>
}
else
{
<a href="@Model.Uri" target="_blank" rel="noopener noreferrer">
<partial name="RichText/_Items" model="@Model"/>
</a>
<a href="@Model.Uri" target="_blank" rel="noopener noreferrer"><partial name="RichText/_Text" model="@Model.Content[0]"/></a>
}
9 changes: 3 additions & 6 deletions src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
<p class="govuk-phase-banner__content">
@* <govuk-phase-banner-tag>Beta</govuk-phase-banner-tag> *@
<strong class="govuk-tag govuk-phase-banner__content__tag">Beta</strong>
This is a new service - your
<a href="https://forms.office.com/e/Jk5PuNWvGe" class="govuk-link" target="_blank"
rel="noopener">
feedback
</a> will
help us to improve it.
<span class="govuk-phase-banner__text">
This is a new service - your <a href="https://forms.office.com/e/Jk5PuNWvGe" class="govuk-link" target="_blank" rel="noopener">feedback</a> will help us to improve it.
</span>
</p>
</div>
4 changes: 4 additions & 0 deletions src/Dfe.ContentSupport.Web/Views/Shared/_BodyEnd.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<script defer type="module" nonce="@Context.Items["nonce"]">
import * as govuk from '/js/govuk-frontend.min.js';
govuk.initAll();
</script>
10 changes: 10 additions & 0 deletions src/Dfe.ContentSupport.Web/Views/Shared/_CsBeforeContent.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@using Dfe.ContentSupport.Web.Configuration
@inject TrackingOptions TrackingOptions

<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src=@($"https://www.googletagmanager.com/ns.html?id={TrackingOptions.Gtm}") height="0" width="0"
style="display:none;visibility:hidden" title="cs_gtm">
</iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
26 changes: 15 additions & 11 deletions src/Dfe.ContentSupport.Web/Views/Shared/_CsHeader.cshtml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<div class="dfe-header">
<div class="dfe-width-container dfe-header__container">
<div class="dfe-header__logo">
<a class="dfe-header__link dfe-header__link--service " href="/" aria-label="DfE homepage">
<img src="/assets/images/dfe-logo.png" class="dfe-logo" alt="DfE Homepage">
<img src="/assets/images/dfe-logo-alt.png" class="dfe-logo-hover" alt="DfE Homepage">
</a>
<header role="banner">
<partial name="CookiesBanner/_CookieBanner" />
<div class="dfe-header">
<div class="dfe-width-container dfe-header__container">
<div class="dfe-header__logo">
<a class="dfe-header__link dfe-header__link--service " href="/" aria-label="DfE homepage">
<img src="/assets/images/dfe-logo.png" class="dfe-logo" alt="DfE Homepage">
<img src="/assets/images/dfe-logo-alt.png" class="dfe-logo-hover" alt="DfE Homepage">
</a>
</div>
</div>
<div class="dfe-width-container dfe-header__service-name">
<a href="/self-assessment" class="dfe-header__link--service">Plan technology for your school</a>
</div>
</div>
<div class="dfe-width-container dfe-header__service-name">
<a href="/self-assessment" class="dfe-header__link--service">Plan technology for your school</a>
</div>
</div>
<partial name="_Hero" model="@Model.Heading"/>
</header>
54 changes: 8 additions & 46 deletions src/Dfe.ContentSupport.Web/Views/Shared/_CsLayout.cshtml
Original file line number Diff line number Diff line change
@@ -1,75 +1,37 @@
@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)
{
<!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({
'gtm.start':
new Date().getTime(), event: 'gtm.js'
}); var f = d.getElementsByTagName(s)[0],
j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', '@(TrackingOptions.Gtm)');</script>
<!-- End Google Tag Manager -->
}
}
<partial name="_Head"/>
}

@section Header {
<link rel="stylesheet" as="style" href="~/css/application.css">
<link rel="stylesheet" as="style" href="~/css/cands-site.css">
<header role="banner">
<partial name="_CookieConsent"/>
<partial name="_CsHeader"/>
<partial name="_Hero" model="@Model.Heading"/>
</header>
@RenderSection("Header", false)
<partial name="_CsHeader"/>
@await RenderSectionAsync("Header", false)
}

@section BeforeContent {
<script
defer>document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');</script>

@{
if (track)
{
<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src=@($"https://www.googletagmanager.com/ns.html?id={TrackingOptions.Gtm}") height="0" width="0"
style="display:none;visibility:hidden">
</iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
}
}

@RenderSection("BeforeContent", false)
<partial name="_CsBeforeContent"/>
@await RenderSectionAsync("BeforeContent", false)
}


@RenderBody()

@section Footer {
<partial name="_Footer"/>
}

@section BodyEnd {
<script defer type="module" nonce="@Context.Items["nonce"]">
import * as govuk from '/js/govuk-frontend.min.js';
govuk.initAll();
</script>

@RenderSection("BodyEnd", false)
<partial name="_BodyEnd"/>
@await RenderSectionAsync("BodyEnd", false)
}
14 changes: 14 additions & 0 deletions src/Dfe.ContentSupport.Web/Views/Shared/_Head.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@using Dfe.ContentSupport.Web.Configuration
@inject TrackingOptions TrackingOptions


<!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({
'gtm.start':
new Date().getTime(), event: 'gtm.js'
}); var f = d.getElementsByTagName(s)[0],
j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', '@(TrackingOptions.Gtm)');</script>
<!-- End Google Tag Manager -->
Loading