added templates to blog module

This commit is contained in:
Mark Anderson 2015-02-20 16:59:02 +00:00
parent c4c3c3c010
commit 8e8dea0ff5
6 changed files with 84 additions and 0 deletions

3
css/blog.css Normal file
View File

@ -0,0 +1,3 @@
.no-sidebar .content-container.size3of4 {
width: 75%;
}

View File

@ -0,0 +1,17 @@
<div class="post-summary">
<% if $FeaturedImage %>
<p class="post-image"><a href="$Link">
$FeaturedImage.setWidth(795)
</a></p>
<% end_if %>
<h2><a href="$Link">$Title</a></h2>
<p>$Content.Summary(30,0)</p>
<div class="post-controls">
<p class="post-stats">
<%t Blog.Posted 'Posted' %> $PublishDate.Ago
| <%t Blog.Tags 'Tags' %>: <% loop $Tags %><a href="$Link">$Title</a><%if not $Last%>,<% end_if %> <% end_loop %>
| <%t Blog.Categories 'Categories' %>: <% loop $Categories %><a href="$Link">$Title</a><%if not $Last%>,<% end_if %> <% end_loop %>
</p>
<p><a href="$Link"><%t Blog.ReadMore 'Read More' %> &gt;</a></p>
</div>
</div>

View File

@ -0,0 +1,5 @@
<div class="typography unit size1of4 lastUnit">
<% if SideBarView %>
$SideBarView
<% end_if %>
</div>

View File

@ -0,0 +1,25 @@
<%-- NOTE: Before including this, you will need to wrap the include in a with block --%>
<% if $MoreThanOnePage %>
<p class="pagination">
<% if $NotFirstPage %>
<a class="prev" href="{$PrevLink}">&larr;</a>
<% end_if %>
<% loop $Pages %>
<% if $CurrentBool %>
<span>$PageNum</span>
<% else %>
<% if $Link %>
<a href="$Link">$PageNum</a>
<% else %>
<span>...</span>
<% end_if %>
<% end_if %>
<% end_loop %>
<% if $NotLastPage %>
<a class="next" href="{$NextLink}">&rarr;</a>
<% end_if %>
</p>
<% end_if %>

17
templates/Layout/Blog.ss Normal file
View File

@ -0,0 +1,17 @@
<% require css(blog/css/blog.css) %>
<div class="content-container <% if SideBarView %>unit size3of4<% end_if %>">
<article>
<h1>$Title</h1>
<div class="content">$Content</div>
<% loop $PaginatedList %>
<% include BlogPostSummary %>
<% end_loop %>
</article>
$Form
$PageComments
<% with $PaginatedList %>
<% include Pagination %>
<% end_with %>
</div>
<% if SideBarView %><% include BlogSidebar %><% end_if %>

View File

@ -0,0 +1,17 @@
<div class="content-container <% if $Menu(2) || SideBarView %>unit size3of4<% end_if %>">
<article>
<h1>$Title</h1>
<% if $FeaturedImage %>
<p>$FeaturedImage.setWidth(795)</p>
<% end_if %>
<div class="content">$Content</div>
<p class="post-stats">
<%t Blog.Posted 'Posted' %> $PublishDate.Ago
| <%t Blog.Tags 'Tags' %>: <% loop $Tags %><a href="$Link">$Title</a><%if not $Last%>,<% end_if %> <% end_loop %>
| <%t Blog.Categories 'Categories' %>: <% loop $Categories %><a href="$Link">$Title</a><%if not $Last%>,<% end_if %> <% end_loop %>
</p>
</article>
$Form
$PageComments
</div>
<% include BlogSidebar %>