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
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.