+
+ @foreach (var blog in Model.Blogs)
+ {
+ if (index % 6 < 4) { col = 4; }
+ if (index % 6 >= 4) { col = 6; }
+ if (index % 6 == 0) { col = 12; }
+ index++;
+
+
+
+
+ @if (!ContentReference.IsNullOrEmpty(blog.CurrentContent.PageImage))
+ {
+
![]()
+ }
-
-
-
- @blog.CurrentContent.StartPublish.Value.ToString("dd MMM yyyy")
-
-
+
+
+
+
+
+ @blog.CurrentContent.StartPublish.Value.ToString("dd MMM yyyy")
+
+
+
-
-
-
-
- }
+ }
+
+
-
\ No newline at end of file
diff --git a/src/Foundation/Features/Blog/BlogListPage/_GridTemplate.cshtml b/src/Foundation/Features/Blog/BlogListPage/_GridTemplate.cshtml
index e4c882f4b..c07d0296b 100644
--- a/src/Foundation/Features/Blog/BlogListPage/_GridTemplate.cshtml
+++ b/src/Foundation/Features/Blog/BlogListPage/_GridTemplate.cshtml
@@ -30,7 +30,7 @@
- @Html.Partial("Preview", firstBlog)
+ @Html.Partial("_GridTemplateBlock", firstBlog)
@foreach (var list in listGridBlogs)
{
@@ -38,7 +38,7 @@
@foreach (var blog in list)
{
- @Html.Partial("Preview", blog)
+ @Html.Partial("_GridTemplateBlock", blog)
}
@@ -46,7 +46,7 @@
@foreach (var blog in listLargeBlogs)
{
- @Html.Partial("Preview", blog)
+ @Html.Partial("_GridTemplateBlock", blog)
}
diff --git a/src/Foundation/Features/Blog/BlogListPage/_GridTemplateBlock.cshtml b/src/Foundation/Features/Blog/BlogListPage/_GridTemplateBlock.cshtml
new file mode 100644
index 000000000..8b336b1a5
--- /dev/null
+++ b/src/Foundation/Features/Blog/BlogListPage/_GridTemplateBlock.cshtml
@@ -0,0 +1,34 @@
+@using EPiServer.AddOns.Helpers
+@using ImageProcessor.Web.Episerver
+
+@model Foundation.Features.Blog.BlogItemPage.BlogItemPageViewModel
+
+
+
+ @if (!ContentReference.IsNullOrEmpty(Model.CurrentContent.PageImage))
+ {
+
![]()
+ }
+
+
+
+
+ @foreach (var tag in Model.Tags)
+ {
+ #@tag.Title
+ }
+
+
+ @if (Model.ShowPublishDate)
+ {
+
@Model.CurrentContent.StartPublish.Value.ToString("dd MMM yyyy")
+ }
+ @if (Model.ShowIntroduction)
+ {
+
@Html.Raw(Model.PreviewText)
+ }
+
+
+
\ No newline at end of file
diff --git a/src/Foundation/Features/Blog/BlogListPage/_HighLightTemplate.cshtml b/src/Foundation/Features/Blog/BlogListPage/_HighLightTemplate.cshtml
new file mode 100644
index 000000000..d29c88387
--- /dev/null
+++ b/src/Foundation/Features/Blog/BlogListPage/_HighLightTemplate.cshtml
@@ -0,0 +1,98 @@
+@using EPiServer.AddOns.Helpers
+@using Foundation.Features.Blog.BlogItemPage
+@using Foundation.Features.Shared.SelectionFactories
+@using Foundation.Features.Blog.BlogListPage
+@using ImageProcessor.Web.Episerver
+
+@model BlogItemPageViewModel
+
+@{
+ var imageCol = Model.PreviewOption == PreviewOptions.Half ? 6 : 4;
+ var textCol = imageCol == 12 ? 12 : 12 - imageCol;
+ var flip = ViewData["Flip"] != null ? ((bool)ViewData["Flip"]) : false;
+}
+
+
+@if (!Model.CurrentContent.Highlight)
+{
+
+ @if (!flip)
+ {
+
+
+ @if (!ContentReference.IsNullOrEmpty(Model.CurrentContent.PageImage))
+ {
+
![]()
+ }
+
+
+ }
+
+
+ @foreach (var tag in Model.Tags)
+ {
+ #@tag.Title
+ }
+
+
+ @if (Model.ShowPublishDate)
+ {
+
@Model.CurrentContent.StartPublish.Value.ToString("dd MMM yyyy")
+ }
+ @if (Model.ShowIntroduction)
+ {
+
+
@Html.Raw(Model.PreviewText)
+ }
+
+ @if (flip)
+ {
+
+
+ @if (!ContentReference.IsNullOrEmpty(Model.CurrentContent.PageImage))
+ {
+
![]()
+ }
+
+
+ }
+
+}
+else
+{
+
+
+
+
+ @if (!ContentReference.IsNullOrEmpty(Model.CurrentContent.PageImage))
+ {
+
![]()
+ }
+
+
+
+
+ @foreach (var tag in Model.Tags)
+ {
+ #@tag.Title
+ }
+
+
+ @if (Model.ShowPublishDate)
+ {
+
@Model.CurrentContent.StartPublish.Value.ToString("dd MMM yyyy")
+ }
+ @if (Model.ShowIntroduction)
+ {
+
+
@Html.Raw(Model.PreviewText)
+ }
+
+
+
+}
+
\ No newline at end of file
diff --git a/src/Foundation/Features/Blog/BlogListPage/_ImageLeftTemplate.cshtml b/src/Foundation/Features/Blog/BlogListPage/_ImageLeftTemplate.cshtml
new file mode 100644
index 000000000..af6e80422
--- /dev/null
+++ b/src/Foundation/Features/Blog/BlogListPage/_ImageLeftTemplate.cshtml
@@ -0,0 +1,47 @@
+@using EPiServer.AddOns.Helpers
+@using EPiServer.Web.Mvc.Html
+@using ImageProcessor.Web.Episerver
+@using Foundation.Features.Shared.SelectionFactories
+@using Foundation.Features.Blog.BlogListPage
+
+@model BlogListPageViewModel
+
+@if (Model.Blogs != null && Model.Blogs.Any())
+{
+ foreach (var blog in Model.Blogs)
+ {
+ var imageCol = blog.PreviewOption == PreviewOptions.Full ? 12 : (blog.PreviewOption == PreviewOptions.Half ? 6 : 4);
+ var textCol = imageCol == 12 ? 12 : 12 - imageCol;
+
+
+
+ @if (!ContentReference.IsNullOrEmpty(blog.CurrentContent.PageImage))
+ {
+
![]()
+ }
+
+
+
+
+ @foreach (var tag in blog.Tags)
+ {
+ #@tag.Title
+ }
+
+
+ @if (blog.ShowPublishDate)
+ {
+
@blog.CurrentContent.StartPublish.Value.ToString("dd MMM yyyy")
+ }
+ @if (blog.ShowIntroduction)
+ {
+
+
@Html.Raw(blog.PreviewText)
+ }
+
+
+
+ }
+}
diff --git a/src/Foundation/Features/Blog/BlogListPage/_ImageTopTemplate.cshtml b/src/Foundation/Features/Blog/BlogListPage/_ImageTopTemplate.cshtml
new file mode 100644
index 000000000..89e57002f
--- /dev/null
+++ b/src/Foundation/Features/Blog/BlogListPage/_ImageTopTemplate.cshtml
@@ -0,0 +1,45 @@
+@using EPiServer.AddOns.Helpers
+@using Foundation.Features.Shared.SelectionFactories
+@using ImageProcessor.Web.Episerver
+@using Foundation.Features.Blog.BlogListPage
+
+
+@model BlogListPageViewModel
+
+@if (Model.Blogs != null && Model.Blogs.Any())
+{
+ foreach (var blog in Model.Blogs)
+ {
+ var imageCol = blog.PreviewOption == PreviewOptions.Full ? 12 : (blog.PreviewOption == PreviewOptions.Half ? 6 : 4);
+
+
+ @if (!ContentReference.IsNullOrEmpty(blog.CurrentContent.PageImage))
+ {
+
![]()
+ }
+
+
+
+ @foreach (var tag in blog.Tags)
+ {
+ #@tag.Title
+ }
+
+ @if (blog.ShowPublishDate)
+ {
+
@blog.CurrentContent.StartPublish.Value.ToString("dd MMM yyyy")
+ }
+
+
+ @if (blog.ShowIntroduction)
+ {
+
+
@Html.Raw(blog.PreviewText)
+ }
+
+
+ }
+}
+
diff --git a/src/Foundation/Features/Blog/BlogListPage/_InsightTemplate.cshtml b/src/Foundation/Features/Blog/BlogListPage/_InsightTemplate.cshtml
index 11ee2b280..16fb2a34e 100644
--- a/src/Foundation/Features/Blog/BlogListPage/_InsightTemplate.cshtml
+++ b/src/Foundation/Features/Blog/BlogListPage/_InsightTemplate.cshtml
@@ -8,132 +8,133 @@
var insightBlogs = Model.Blogs.Take(3);
var insightReverseBlogs = Model.Blogs.Skip(3).Take(3).Reverse();
}
-
-
-@if (insightBlogs.Any())
-{
- var index = 0;
-
- @foreach (var blog in insightBlogs)
- {
- var typeIndex = index % 3;
- var insightClass = "insight__large";
- switch (typeIndex)
+
+
+ @if (insightBlogs.Any())
+ {
+ var index = 0;
+
+ @foreach (var blog in insightBlogs)
{
- case 1:
- insightClass = "insight__small--image";
- break;
- case 2:
- insightClass = "insight__small--text";
- break;
- default:
- break;
-
- }
- index++;
-
-
- @if (typeIndex == 0)
+ var typeIndex = index % 3;
+ var insightClass = "insight__large";
+ switch (typeIndex)
{
-
- @if (!ContentReference.IsNullOrEmpty(blog.CurrentContent.PageImage))
- {
-
![]()
- }
-
- }
- @if (typeIndex == 1)
- {
-
- @if (!ContentReference.IsNullOrEmpty(blog.CurrentContent.PageImage))
- {
-
![]()
- }
-
+ case 1:
+ insightClass = "insight__small--image";
+ break;
+ case 2:
+ insightClass = "insight__small--text";
+ break;
+ default:
+ break;
+
}
-
-
- @foreach (var tag in blog.Tags)
- {
-
#@tag.Title
- }
-
-
- @blog.CurrentContent.MetaTitle
-
-
- @blog.CurrentContent.StartPublish.Value.ToString("dd MMM yyyy")
+ index++;
+
+
+ @if (typeIndex == 0)
+ {
+
+ @if (!ContentReference.IsNullOrEmpty(blog.CurrentContent.PageImage))
+ {
+
![]()
+ }
+
+ }
+ @if (typeIndex == 1)
+ {
+
+ @if (!ContentReference.IsNullOrEmpty(blog.CurrentContent.PageImage))
+ {
+
![]()
+ }
+
+ }
+
-
@Html.Raw(blog.PreviewText)
-
- Read more
-
-
- }
-
-}
-
-
-@if (insightReverseBlogs.Any())
-{
- var index = 0;
-
- @foreach (var blog in insightReverseBlogs)
- {
- var typeIndex = index % 3;
- var insightClass = "insight__large";
- switch (typeIndex)
- {
- case 1:
- insightClass = "insight__small--image";
- break;
- case 2:
- insightClass = "insight__small--text";
- break;
- default:
- break;
}
- index++;
+
+ }
-
- @if (typeIndex == 0)
- {
-
- @if (!ContentReference.IsNullOrEmpty(blog.CurrentContent.PageImage))
- {
-
![]()
- }
-
- }
- @if (typeIndex == 1)
+
+ @if (insightReverseBlogs.Any())
+ {
+ var index = 0;
+
+ @foreach (var blog in insightReverseBlogs)
+ {
+ var typeIndex = index % 3;
+ var insightClass = "insight__large";
+ switch (typeIndex)
{
-
- @if (!ContentReference.IsNullOrEmpty(blog.CurrentContent.PageImage))
- {
-
![]()
- }
-
+ case 1:
+ insightClass = "insight__small--image";
+ break;
+ case 2:
+ insightClass = "insight__small--text";
+ break;
+ default:
+ break;
}
-
-
- @foreach (var tag in blog.Tags)
- {
-
#@tag.Title
- }
-
-
- @blog.CurrentContent.MetaTitle
-
-
- @blog.CurrentContent.StartPublish.Value.ToString("dd MMM yyyy")
+ index++;
+
+
+ @if (typeIndex == 0)
+ {
+
+ @if (!ContentReference.IsNullOrEmpty(blog.CurrentContent.PageImage))
+ {
+
![]()
+ }
+
+ }
+ @if (typeIndex == 1)
+ {
+
+ @if (!ContentReference.IsNullOrEmpty(blog.CurrentContent.PageImage))
+ {
+
![]()
+ }
+
+ }
+
-
@Html.Raw(blog.PreviewText)
-
- Read more
-
-
- }
-
-}
\ No newline at end of file
+ }
+
+ }
+
diff --git a/src/Foundation/Features/Blog/BlogListPage/_NoImageTemplate.cshtml b/src/Foundation/Features/Blog/BlogListPage/_NoImageTemplate.cshtml
new file mode 100644
index 000000000..ea0041af5
--- /dev/null
+++ b/src/Foundation/Features/Blog/BlogListPage/_NoImageTemplate.cshtml
@@ -0,0 +1,38 @@
+@using EPiServer.AddOns.Helpers
+@using Foundation.Features.Blog.BlogItemPage
+@using Foundation.Features.Shared.SelectionFactories
+@using Foundation.Features.Blog.BlogListPage
+
+@model BlogListPageViewModel
+
+@if (Model.Blogs != null && Model.Blogs.Any())
+{
+ foreach (var blog in Model.Blogs)
+ {
+ var imageCol = blog.PreviewOption == PreviewOptions.Full ? 12 : (blog.PreviewOption == PreviewOptions.Half ? 6 : 4);
+
+
+
+ @foreach (var tag in blog.Tags)
+ {
+ #@tag.Title
+ }
+
+
+ @if (blog.ShowPublishDate)
+ {
+
@blog.CurrentContent.StartPublish.Value.ToString("dd MMM yyyy")
+ }
+ @if (blog.ShowIntroduction)
+ {
+
+
@Html.Raw(blog.PreviewText)
+ }
+
+
+ }
+}
+
+
diff --git a/src/Foundation/Features/Blog/BlogListPage/_Paging.cshtml b/src/Foundation/Features/Blog/BlogListPage/_Paging.cshtml
index 303a63b7c..00bcb2df5 100644
--- a/src/Foundation/Features/Blog/BlogListPage/_Paging.cshtml
+++ b/src/Foundation/Features/Blog/BlogListPage/_Paging.cshtml
@@ -1,61 +1,87 @@
@using Foundation.Features.Blog.BlogListPage
+@using Foundation.Features.Shared.SelectionFactories
@model BlogListPageViewModel
-