Content { get; init; } = [];
public bool DisplayBackButton { get; init; }
-
public bool IsSitemap { get; init; }
public DateTime? CreatedAt { get; init; }
diff --git a/src/Dfe.ContentSupport.Web/Models/ErrorViewModel.cs b/src/Dfe.ContentSupport.Web/ViewModels/ErrorViewModel.cs
similarity index 56%
rename from src/Dfe.ContentSupport.Web/Models/ErrorViewModel.cs
rename to src/Dfe.ContentSupport.Web/ViewModels/ErrorViewModel.cs
index a53f719..55cb1d5 100644
--- a/src/Dfe.ContentSupport.Web/Models/ErrorViewModel.cs
+++ b/src/Dfe.ContentSupport.Web/ViewModels/ErrorViewModel.cs
@@ -1,8 +1,10 @@
-namespace Dfe.ContentSupport.Web.Models;
-
-public class ErrorViewModel
-{
- public string? RequestId { get; set; }
-
- public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
+using System.Diagnostics.CodeAnalysis;
+
+namespace Dfe.ContentSupport.Web.ViewModels;
+
+[ExcludeFromCodeCoverage]
+public class ErrorViewModel
+{
+ public string? RequestId { get; set; }
+ public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
}
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Home/Index.cshtml b/src/Dfe.ContentSupport.Web/Views/Home/Index.cshtml
index 93dc385..d584bbb 100644
--- a/src/Dfe.ContentSupport.Web/Views/Home/Index.cshtml
+++ b/src/Dfe.ContentSupport.Web/Views/Home/Index.cshtml
@@ -1,8 +1,6 @@
-@{
- ViewData["Title"] = "Home Page";
-}
+@model ContentSupportPage
-
\ No newline at end of file
+@foreach (var content in @Model.Content)
+{
+
+}
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_Accordion.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_Accordion.cshtml
new file mode 100644
index 0000000..ee52d52
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_Accordion.cshtml
@@ -0,0 +1,24 @@
+@model Target
+
+
+ @{
+ foreach (var element in Model.Content)
+ {
+
+ }
+ }
+
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_Attachment.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_Attachment.cshtml
new file mode 100644
index 0000000..5f0abcc
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_Attachment.cshtml
@@ -0,0 +1,49 @@
+@model ContentItemBase
+@{
+ var target = Model.Data.Target;
+}
+
+
+
+
+
+
+
+ @target.Asset.File.ContentType.Split('/').Last().ToUpper(),
+
+ @(target.Asset.File.Details.Size / 1024) KB
+
+
+
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_Card.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_Card.cshtml
new file mode 100644
index 0000000..3809ae4
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_Card.cshtml
@@ -0,0 +1,22 @@
+@model Target
+
+@{
+
+ @if (Model.Image is not null)
+ {
+
+ }
+
+
+
+
+ @if (string.IsNullOrEmpty(Model.Description) is false)
+ {
+
@Model.Description
+ }
+ @if (string.IsNullOrEmpty(Model.Meta) is false)
+ {
+
@Model.Meta
+ }
+
+
}
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_GridContainer.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_GridContainer.cshtml
new file mode 100644
index 0000000..6eb63de
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/Custom/_GridContainer.cshtml
@@ -0,0 +1,9 @@
+@model ContentItemBase
+
+@{
+
+ @foreach (var item in Model.Data.Target.Content)
+ {
+
+ }
+
}
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Asset.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Asset.cshtml
new file mode 100644
index 0000000..bbe1bbc
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Asset.cshtml
@@ -0,0 +1,20 @@
+@model ContentItemBase
+
+@{
+ var asset = Model.Data.Target.Fields.File;
+}
+
+
+ @switch (asset.ContentType)
+ {
+ case "image/jpeg" or "image/png":
+
+ break;
+ case "video/mp4" or "video/quicktime":
+
+ break;
+ }
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Document.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Document.cshtml
new file mode 100644
index 0000000..98aa8c7
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Document.cshtml
@@ -0,0 +1,11 @@
+@model ContentItemBase
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+
+ }
+ }
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Entry.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Entry.cshtml
new file mode 100644
index 0000000..66307ff
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Entry.cshtml
@@ -0,0 +1,20 @@
+@model ContentItemBase
+
+@{
+ var target = Model.Data.Target;
+
+ if (target.JumpIdentifier is not null)
+ {
+
+ }
+
+ else if (target.Sys.ContentType?.Sys.Id is not null)
+ {
+
+ }
+
+ if (target.RichText is { NodeType: not null })
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_GDSComponent.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_GDSComponent.cshtml
new file mode 100644
index 0000000..c67e634
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_GDSComponent.cshtml
@@ -0,0 +1,22 @@
+@model ContentItemBase
+
+@{
+ var contentTypeId = Model.Data.Target.Sys.ContentType?.Sys.Id;
+ switch (contentTypeId)
+ {
+ case "Attachment":
+
+ break;
+ case "CSAccordion":
+
+ break;
+ case "csCard":
+
+ break;
+ case "GridContainer":
+
+ break;
+ default:
+ break;
+ }
+}
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H2.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H2.cshtml
new file mode 100644
index 0000000..73abc1d
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H2.cshtml
@@ -0,0 +1,11 @@
+@model ContentItemBase
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+
+ }
+ }
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H3.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H3.cshtml
new file mode 100644
index 0000000..1d3f96d
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H3.cshtml
@@ -0,0 +1,11 @@
+@model ContentItemBase
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+
+ }
+ }
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H4.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H4.cshtml
new file mode 100644
index 0000000..38ae90c
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H4.cshtml
@@ -0,0 +1,11 @@
+@model ContentItemBase
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+
+ }
+ }
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H5.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H5.cshtml
new file mode 100644
index 0000000..150cbc0
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H5.cshtml
@@ -0,0 +1,11 @@
+@model ContentItemBase
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+
+ }
+ }
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H6.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H6.cshtml
new file mode 100644
index 0000000..8cd7c0f
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_H6.cshtml
@@ -0,0 +1,11 @@
+@model ContentItemBase
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+
+ }
+ }
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_HyperLink.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_HyperLink.cshtml
new file mode 100644
index 0000000..65e95f5
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_HyperLink.cshtml
@@ -0,0 +1,19 @@
+@model ContentItemBase
+
+@* check if video is vimeo link - if so render vimeo partial instead *@
+@if (Model.Data.Uri.ToString().Contains("vimeo.com"))
+{
+
+}
+else
+{
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_ListItem.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_ListItem.cshtml
new file mode 100644
index 0000000..dd6a5a2
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_ListItem.cshtml
@@ -0,0 +1,11 @@
+@model ContentItemBase
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+
+ }
+ }
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_OrderedList.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_OrderedList.cshtml
new file mode 100644
index 0000000..8a37aa0
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_OrderedList.cshtml
@@ -0,0 +1,11 @@
+@model ContentItemBase
+
+
+ @if (Model.Content .Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+
+ }
+ }
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Paragraph.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Paragraph.cshtml
new file mode 100644
index 0000000..a8fd040
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Paragraph.cshtml
@@ -0,0 +1,11 @@
+@model ContentItemBase
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+
+ }
+ }
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_RichText.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_RichText.cshtml
new file mode 100644
index 0000000..9ddb55b
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_RichText.cshtml
@@ -0,0 +1,68 @@
+@using Dfe.ContentSupport.Web.Common
+@model ContentItemBase
+
+@{
+ var nodeType = Model.NodeType;
+
+ switch (nodeType)
+ {
+ case RichTextTags.Document:
+
+ break;
+ case RichTextTags.Paragraph:
+
+ break;
+ case RichTextTags.Heading2:
+
+ break;
+ case RichTextTags.Heading3:
+
+ break;
+ case RichTextTags.Heading4:
+
+ break;
+ case RichTextTags.Heading5:
+
+ break;
+ case RichTextTags.Heading6:
+
+ break;
+ case RichTextTags.UnorderedList:
+
+ break;
+ case RichTextTags.OrderedList:
+
+ break;
+ case RichTextTags.ListItem:
+
+ break;
+ case RichTextTags.Hyperlink:
+
+ break;
+ case RichTextTags.Table:
+
+ break;
+ case RichTextTags.TableRow:
+
+ break;
+ case RichTextTags.TableHeaderCell:
+
+ break;
+ case RichTextTags.TableCell:
+
+ break;
+ case RichTextTags.Hr:
+
+ break;
+ case RichTextTags.EmbeddedAsset:
+
+ break;
+ case RichTextTags.Text:
+
+ break;
+ case RichTextTags.EmbeddedEntry:
+ case RichTextTags.EmbeddedEntryInline:
+
+ break;
+ }
+}
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Table.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Table.cshtml
new file mode 100644
index 0000000..c1ff6c7
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Table.cshtml
@@ -0,0 +1,31 @@
+@using Dfe.ContentSupport.Web.Common
+@model ContentItemBase
+
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+ if (childNode.NodeType == RichTextTags.TableRow && childNode.Content[0].NodeType ==
+ RichTextTags.TableHeaderCell)
+ {
+
+ }
+ }
+ }
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+ if (childNode.NodeType == RichTextTags.TableRow && childNode.Content[0].NodeType ==
+ RichTextTags.TableCell)
+ {
+
+ }
+ }
+ }
+
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_TableCell.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_TableCell.cshtml
new file mode 100644
index 0000000..db6008c
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_TableCell.cshtml
@@ -0,0 +1,11 @@
+@model ContentItemBase
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+
+ }
+ }
+ |
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_TableHeaderCell.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_TableHeaderCell.cshtml
new file mode 100644
index 0000000..c60cc77
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_TableHeaderCell.cshtml
@@ -0,0 +1,22 @@
+@using Dfe.ContentSupport.Web.Common
+@model ContentItemBase
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+ if (childNode.NodeType == RichTextTags.Paragraph)
+ {
+ foreach (var grandChildNode in childNode.Content)
+ {
+
+ }
+ }
+ else
+ {
+
+ }
+ }
+ }
+ |
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_TableRow.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_TableRow.cshtml
new file mode 100644
index 0000000..41837f4
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_TableRow.cshtml
@@ -0,0 +1,11 @@
+@model ContentItemBase
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+
+ }
+ }
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Text.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Text.cshtml
new file mode 100644
index 0000000..f7c4c40
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Text.cshtml
@@ -0,0 +1,13 @@
+@model ContentItem
+
+@{
+ var isBold = Model.Marks.Any(mark => mark.Type == "bold");
+ if (isBold)
+ {
+ @Model.Value
+ }
+ else
+ {
+ @Model.Value
+ }
+}
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_UnorderedList.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_UnorderedList.cshtml
new file mode 100644
index 0000000..83e130b
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_UnorderedList.cshtml
@@ -0,0 +1,11 @@
+@model ContentItemBase
+
+
+ @if (Model.Content.Any())
+ {
+ foreach (var childNode in Model.Content)
+ {
+
+ }
+ }
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Vimeo.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Vimeo.cshtml
new file mode 100644
index 0000000..01f03ba
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/RichText/_Vimeo.cshtml
@@ -0,0 +1,10 @@
+@model ContentItemBase
+
+@{
+ var vimeoId = Model.Data.Uri.ToString().Split('/').Last();
+}
+
+
+
+
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml
index e511979..53d7ea6 100644
--- a/src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/_BetaHeader.cshtml
@@ -1,9 +1,11 @@
-
- Beta
- This is a new service - your
-
- feedback
- will
- help us to improve it.
-
\ No newline at end of file
+
+
+ @* Beta *@
+ Beta
+ This is a new service - your
+
+ feedback
+ will
+ help us to improve it.
+
+
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_Content.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/_Content.cshtml
new file mode 100644
index 0000000..5ed5ce2
--- /dev/null
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/_Content.cshtml
@@ -0,0 +1,10 @@
+@model Entry;
+
+@{
+ var richText = Model.RichText;
+
+ if (richText is { NodeType: not null })
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/Dfe.ContentSupport.Web/Views/Shared/_Header.cshtml b/src/Dfe.ContentSupport.Web/Views/Shared/_Header.cshtml
index 016620b..a5602ac 100644
--- a/src/Dfe.ContentSupport.Web/Views/Shared/_Header.cshtml
+++ b/src/Dfe.ContentSupport.Web/Views/Shared/_Header.cshtml
@@ -1,27 +1,14 @@
-