Skip to content

Commit

Permalink
ENHANCEMENT: Template changes
Browse files Browse the repository at this point in the history
Updated template elements for 3.0.
Made html follow proper heading hierarchy
Optimized generated html so it can be more easily styled.
  • Loading branch information
Naomi Guyer committed Aug 17, 2012
1 parent 448d347 commit d33e209
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 52 deletions.
10 changes: 5 additions & 5 deletions templates/ArchiveWidget.ss
@@ -1,21 +1,21 @@
<% if DisplayMode == month %>
<ul class="archiveMonths">
<% control Dates %>
<% loop Dates %>
<li>
<a href="$Link">
$Date.Format(F) $Date.Year
</a>
</li>
<% end_control %>
<% end_loop %>
</ul>
<% else %>
<ul class="archiveYears">
<% control Dates %>
<% loop Dates %>
<li>
<a href="$Link">
$Date.Year<% if Last %><% else %>,<% end_if %>
$Date.Year<% if not Last %>,<% end_if %>
</a>
</li>
<% end_control %>
<% end_loop %>
</ul>
<% end_if %>
62 changes: 38 additions & 24 deletions templates/Includes/BlogPagination.ss
@@ -1,27 +1,41 @@
<% if BlogEntries.MoreThanOnePage %>
<div id="PageNumbers">
<p>
<% if BlogEntries.NotFirstPage %>
<a class="prev" href="$BlogEntries.PrevLink" title="View the previous page">Prev</a>
<div class="pagination">
<ul class="PageNumbers">
<% if BlogEntries.NotFirstPage %>
<li class="prev">
<a class="paginate-left" href="$BlogEntries.PrevLink" title="View the previous page">&lt;</a>
</li>
<% else %>
<li class="prev disabled">
<a class="paginate-left disabled">&lt;</a>
</li>
<% end_if %>

<% loop BlogEntries.PaginationSummary(4) %>
<% if CurrentBool %>
<li class="active"><a class="disabled">$PageNum</a></li>
<% else %>
<% if Link %>
<li>
<a class="<% if BeforeCurrent %>paginate-left<% else %>paginate-right<% end_if %>" href="$Link">
$PageNum
</a>
</li>
<% else %>
<li class="disabled"><a class="disabled">&hellip;</a></li>
<% end_if %>
<% end_if %>

<span>
<% control BlogEntries.PaginationSummary(4) %>
<% if CurrentBool %>
<span class="current">$PageNum</span>
<% else %>
<% if Link %>
<a href="$Link" title="View page number $PageNum">$PageNum</a>
<% else %>
&hellip;
<% end_if %>
<% end_if %>
<% end_control %>
</span>

<% if BlogEntries.NotLastPage %>
<a class="next" href="$BlogEntries.NextLink" title="View the next page">Next</a>
<% end_if %>
</p>
</div>
<% end_loop %>

<% if BlogEntries.NotLastPage %>
<li class="next">
<a class="next paginate-right" href="$BlogEntries.NextLink" title="View the next page">&gt;</a>
</li>
<% else %>
<li class="next disabled">
<a class="next paginate-right disabled">&gt;</a>
</li>
<% end_if %>
</ul>
</div>
<% end_if %>
6 changes: 3 additions & 3 deletions templates/Includes/BlogSummary.ss
Expand Up @@ -4,9 +4,9 @@
<% if TagsCollection %>
<p class="tags">
Tags:
<% control TagsCollection %>
<a href="$Link" title="View all posts tagged '$Tag'" rel="tag">$Tag</a><% if Last %><% else %>,<% end_if %>
<% end_control %>
<% loop TagsCollection %>
<a href="$Link" title="View all posts tagged '$Tag'" rel="tag">$Tag</a><% if not Last %>,<% end_if %>
<% end_loop %>
</p>
<% end_if %>

Expand Down
2 changes: 1 addition & 1 deletion templates/Includes/BreadCrumbs.ss
@@ -1,5 +1,5 @@
<% if Level(2) %>
<div id="Breadcrumbs">
<p>$Breadcrumbs</p>
$Breadcrumbs
</div>
<% end_if %>
4 changes: 2 additions & 2 deletions templates/Includes/TrackBacks.ss
Expand Up @@ -3,12 +3,12 @@

<% if TrackBacks %>
<ul id="TrackBacks">
<% control TrackBacks %>
<% loop TrackBacks %>
<li>
<a href="$Url"><% if Title %>$Title<% else %>$Url<% end_if %></a> <span class="date">on $Created.Nice</span>
<% if Excerpt %><p class="excerpt">$Excerpt</p><% end_if %>
</li>
<% end_control %>
<% end_loop %>
</ul>
<% else %>
<p>No TrackBacks have been submitted for this page.</p>
Expand Down
8 changes: 3 additions & 5 deletions templates/Layout/BlogEntry.ss
Expand Up @@ -9,13 +9,11 @@
<p class="tags">
<% _t('TAGS', 'Tags:') %>
<% control TagsCollection %>
<a href="$Link" title="<% _t('VIEWALLPOSTTAGGED', 'View all posts tagged') %> '$Tag'" rel="tag">$Tag</a><% if Last %><% else %>,<% end_if %>
<a href="$Link" title="<% _t('VIEWALLPOSTTAGGED', 'View all posts tagged') %> '$Tag'" rel="tag">$Tag</a><% if not Last %>,<% end_if %>
<% end_control %>
</p>
<% end_if %>

$Content

<% end_if %>
$Content
</div>

<% if IsOwner %><p class="edit-post"><a href="$EditURL" id="editpost" title="<% _t('EDITTHIS', 'Edit this post') %>"><% _t('EDITTHIS', 'Edit this post') %></a> | <a href="$Link(unpublishPost)" id="unpublishpost"><% _t('UNPUBLISHTHIS', 'Unpublish this post') %></a></p><% end_if %>
Expand Down
20 changes: 14 additions & 6 deletions templates/Layout/BlogHolder.ss
Expand Up @@ -5,17 +5,25 @@
<% include BreadCrumbs %>

<% if SelectedTag %>
<h3><% _t('VIEWINGTAGGED', 'Viewing entries tagged with') %> '$SelectedTag'</h3>
<div class="selectedTag">
<em>
<% _t('VIEWINGTAGGED', 'Viewing entries tagged with') %> '$SelectedTag'
</em>
</div>
<% else_if SelectedDate %>
<h3><% _t('VIEWINGPOSTEDIN', 'Viewing entries posted in') %> $SelectedNiceDate</h3>
<div class="selectedTag">
<em>
<% _t('VIEWINGPOSTEDIN', 'Viewing entries posted in') %> $SelectedNiceDate
</em>
</div>
<% end_if %>

<% if BlogEntries %>
<% control BlogEntries %>
<% include BlogSummary %>
<% end_control %>
<% loop BlogEntries %>
<% include BlogSummary %>
<% end_loop %>
<% else %>
<h3><% _t('NOENTRIES', 'There are no blog entries') %></h3>
<h2><% _t('NOENTRIES', 'There are no blog entries') %></h2>
<% end_if %>

<% include BlogPagination %>
Expand Down
4 changes: 2 additions & 2 deletions templates/Layout/BlogTree.ss
Expand Up @@ -12,10 +12,10 @@

<% if BlogEntries %>
<% control BlogEntries %>
<% include BlogSummary %>
<% include BlogSummary %>
<% end_control %>
<% else %>
<h3><% _t('NOENTRIES', 'There are no blog entries') %></h3>
<h2><% _t('NOENTRIES', 'There are no blog entries') %></h2>
<% end_if %>

<% include BlogPagination %>
Expand Down
4 changes: 2 additions & 2 deletions templates/RSSWidget.ss
@@ -1,7 +1,7 @@
<ul>
<% control FeedItems %>
<% loop FeedItems %>
<li>
<a href="$Link">$Title</a>
</li>
<% end_control %>
<% end_loop %>
</ul>
4 changes: 2 additions & 2 deletions templates/TagCloudWidget.ss
@@ -1,5 +1,5 @@
<p class="tagcloud">
<% control TagsCollection %>
<% loop TagsCollection %>
<a href="$Link" class="$Class">$Tag</a>
<% end_control %>
<% end_loop %>
</p>

0 comments on commit d33e209

Please sign in to comment.