generated from DFE-Digital/govuk-dotnet-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #574 from DFE-Digital/next
QuoteBox, InfoBox Styles, New Header, and Security Updates
- Loading branch information
Showing
29 changed files
with
942 additions
and
16,747 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,35 @@ jobs: | |
CPD_DELIVERY_KEY: ${{secrets.TF_VAR_CPD_DELIVERY_KEY}} | ||
CPD_CLARITY: ${{secrets.TF_VAR_CPD_CLARITY}} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build the Docker App Image | ||
run: cd Childrens-Social-Care-CPD; docker build . --file Dockerfile --tag childrens-social-care-cpd:latest | ||
|
||
- name: Install Docker Compose | ||
uses: ndeloof/[email protected] | ||
with: | ||
version: latest | ||
legacy: true # install in PATH as `docker-compose` | ||
|
||
- name: Verify Docker Compose installation | ||
run: docker-compose --version | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'latest' | ||
|
||
- name: Install latest NPM version | ||
run: npm install -g npm@latest | ||
|
||
- name: Verify NPM version | ||
run: npm version | ||
|
||
- name: Run the dev integration tests | ||
run: cd browser-tests/dev-integration-tests; docker-compose up --exit-code-from dev-integration-tests | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
name: Playwright report | ||
if: always() | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Contentful.Core.Models; | ||
|
||
namespace Childrens_Social_Care_CPD.Contentful.Models; | ||
|
||
public static class QuoteAttributionAlignment | ||
{ | ||
public const string Left = "Left"; | ||
public const string Centre = "Centre"; | ||
public const string Right = "Right"; | ||
} | ||
|
||
public class QuoteBox : IContent | ||
{ | ||
public string Name { get; set; } | ||
public Document QuoteText { get; set; } | ||
public Document Attribution { get ; set; } | ||
public string AttributionAlignment { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@using Childrens_Social_Care_CPD.Contentful.Models; | ||
@using Childrens_Social_Care_CPD.Contentful; | ||
@using Childrens_Social_Care_CPD.Contentful.Renderers; | ||
|
||
@model QuoteBox | ||
|
||
|
||
<div class="blockquote-container"> | ||
<div class="govuk-grid-row"> | ||
<blockquote class="quote"> | ||
@{ | ||
await Html.RenderPartialAsync("_RichText", Model.QuoteText); | ||
} | ||
@if (Model.Attribution != null) | ||
{ | ||
string attributionCss; | ||
switch (Model.AttributionAlignment) | ||
{ | ||
case QuoteAttributionAlignment.Left: attributionCss = "quote-attribution-left"; break; | ||
case QuoteAttributionAlignment.Centre: attributionCss = "quote-attribution-centre"; break; | ||
case QuoteAttributionAlignment.Right: | ||
default: | ||
attributionCss = "quote-attribution-right"; | ||
break; | ||
} | ||
|
||
<div class="@attributionCss"> | ||
@{ | ||
await Html.RenderPartialAsync("_RichText", Model.Attribution); | ||
} | ||
</div> | ||
} | ||
</blockquote> | ||
</div> | ||
</div> |
Oops, something went wrong.