From 8e8dea0ff539574f18c24c18edbf5341280b0201 Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Fri, 20 Feb 2015 16:59:02 +0000 Subject: [PATCH] added templates to blog module --- css/blog.css | 3 +++ templates/Includes/BlogPostSummary.ss | 17 +++++++++++++++++ templates/Includes/BlogSidebar.ss | 5 +++++ templates/Includes/Pagination.ss | 25 +++++++++++++++++++++++++ templates/Layout/Blog.ss | 17 +++++++++++++++++ templates/Layout/BlogPost.ss | 17 +++++++++++++++++ 6 files changed, 84 insertions(+) create mode 100644 css/blog.css create mode 100644 templates/Includes/BlogPostSummary.ss create mode 100644 templates/Includes/BlogSidebar.ss create mode 100644 templates/Includes/Pagination.ss create mode 100644 templates/Layout/Blog.ss create mode 100644 templates/Layout/BlogPost.ss diff --git a/css/blog.css b/css/blog.css new file mode 100644 index 0000000..0d89c0e --- /dev/null +++ b/css/blog.css @@ -0,0 +1,3 @@ +.no-sidebar .content-container.size3of4 { + width: 75%; +} diff --git a/templates/Includes/BlogPostSummary.ss b/templates/Includes/BlogPostSummary.ss new file mode 100644 index 0000000..b81146d --- /dev/null +++ b/templates/Includes/BlogPostSummary.ss @@ -0,0 +1,17 @@ +
+ <% if $FeaturedImage %> +

+ $FeaturedImage.setWidth(795) +

+ <% end_if %> +

$Title

+

$Content.Summary(30,0)

+
+

+ <%t Blog.Posted 'Posted' %> $PublishDate.Ago + | <%t Blog.Tags 'Tags' %>: <% loop $Tags %>$Title<%if not $Last%>,<% end_if %> <% end_loop %> + | <%t Blog.Categories 'Categories' %>: <% loop $Categories %>$Title<%if not $Last%>,<% end_if %> <% end_loop %> +

+

<%t Blog.ReadMore 'Read More' %> >

+
+
diff --git a/templates/Includes/BlogSidebar.ss b/templates/Includes/BlogSidebar.ss new file mode 100644 index 0000000..0c5ec6c --- /dev/null +++ b/templates/Includes/BlogSidebar.ss @@ -0,0 +1,5 @@ +
+ <% if SideBarView %> + $SideBarView + <% end_if %> +
diff --git a/templates/Includes/Pagination.ss b/templates/Includes/Pagination.ss new file mode 100644 index 0000000..1a20c7e --- /dev/null +++ b/templates/Includes/Pagination.ss @@ -0,0 +1,25 @@ +<%-- NOTE: Before including this, you will need to wrap the include in a with block --%> + +<% if $MoreThanOnePage %> +

+ <% if $NotFirstPage %> + + <% end_if %> + + <% loop $Pages %> + <% if $CurrentBool %> + $PageNum + <% else %> + <% if $Link %> + $PageNum + <% else %> + ... + <% end_if %> + <% end_if %> + <% end_loop %> + + <% if $NotLastPage %> + + <% end_if %> +

+<% end_if %> diff --git a/templates/Layout/Blog.ss b/templates/Layout/Blog.ss new file mode 100644 index 0000000..7bcd52f --- /dev/null +++ b/templates/Layout/Blog.ss @@ -0,0 +1,17 @@ +<% require css(blog/css/blog.css) %> + +
+
+

$Title

+
$Content
+ <% loop $PaginatedList %> + <% include BlogPostSummary %> + <% end_loop %> +
+ $Form + $PageComments + <% with $PaginatedList %> + <% include Pagination %> + <% end_with %> +
+<% if SideBarView %><% include BlogSidebar %><% end_if %> diff --git a/templates/Layout/BlogPost.ss b/templates/Layout/BlogPost.ss new file mode 100644 index 0000000..02ec530 --- /dev/null +++ b/templates/Layout/BlogPost.ss @@ -0,0 +1,17 @@ +
+
+

$Title

+ <% if $FeaturedImage %> +

$FeaturedImage.setWidth(795)

+ <% end_if %> +
$Content
+

+ <%t Blog.Posted 'Posted' %> $PublishDate.Ago + | <%t Blog.Tags 'Tags' %>: <% loop $Tags %>$Title<%if not $Last%>,<% end_if %> <% end_loop %> + | <%t Blog.Categories 'Categories' %>: <% loop $Categories %>$Title<%if not $Last%>,<% end_if %> <% end_loop %> +

+
+ $Form + $PageComments +
+<% include BlogSidebar %>