ENHANCEMENT: Template changes

Updated template elements for 3.0.
Made html follow proper heading hierarchy
Optimized generated html so it can be more easily styled.
This commit is contained in:
Naomi Guyer 2012-08-17 15:55:08 +12:00
parent 448d34757e
commit d33e209ee5
10 changed files with 72 additions and 52 deletions

View File

@ -1,21 +1,21 @@
<% if DisplayMode == month %> <% if DisplayMode == month %>
<ul class="archiveMonths"> <ul class="archiveMonths">
<% control Dates %> <% loop Dates %>
<li> <li>
<a href="$Link"> <a href="$Link">
$Date.Format(F) $Date.Year $Date.Format(F) $Date.Year
</a> </a>
</li> </li>
<% end_control %> <% end_loop %>
</ul> </ul>
<% else %> <% else %>
<ul class="archiveYears"> <ul class="archiveYears">
<% control Dates %> <% loop Dates %>
<li> <li>
<a href="$Link"> <a href="$Link">
$Date.Year<% if Last %><% else %>,<% end_if %> $Date.Year<% if not Last %>,<% end_if %>
</a> </a>
</li> </li>
<% end_control %> <% end_loop %>
</ul> </ul>
<% end_if %> <% end_if %>

View File

@ -1,27 +1,41 @@
<% if BlogEntries.MoreThanOnePage %> <% if BlogEntries.MoreThanOnePage %>
<div id="PageNumbers"> <div class="pagination">
<p> <ul class="PageNumbers">
<% if BlogEntries.NotFirstPage %> <% if BlogEntries.NotFirstPage %>
<a class="prev" href="$BlogEntries.PrevLink" title="View the previous page">Prev</a> <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 %> <% end_if %>
<% end_loop %>
<span>
<% control BlogEntries.PaginationSummary(4) %> <% if BlogEntries.NotLastPage %>
<% if CurrentBool %> <li class="next">
<span class="current">$PageNum</span> <a class="next paginate-right" href="$BlogEntries.NextLink" title="View the next page">&gt;</a>
<% else %> </li>
<% if Link %> <% else %>
<a href="$Link" title="View page number $PageNum">$PageNum</a> <li class="next disabled">
<% else %> <a class="next paginate-right disabled">&gt;</a>
&hellip; </li>
<% end_if %> <% end_if %>
<% end_if %> </ul>
<% end_control %> </div>
</span>
<% if BlogEntries.NotLastPage %>
<a class="next" href="$BlogEntries.NextLink" title="View the next page">Next</a>
<% end_if %>
</p>
</div>
<% end_if %> <% end_if %>

View File

@ -4,9 +4,9 @@
<% if TagsCollection %> <% if TagsCollection %>
<p class="tags"> <p class="tags">
Tags: Tags:
<% control TagsCollection %> <% loop TagsCollection %>
<a href="$Link" title="View all posts tagged '$Tag'" rel="tag">$Tag</a><% if Last %><% else %>,<% end_if %> <a href="$Link" title="View all posts tagged '$Tag'" rel="tag">$Tag</a><% if not Last %>,<% end_if %>
<% end_control %> <% end_loop %>
</p> </p>
<% end_if %> <% end_if %>

View File

@ -1,5 +1,5 @@
<% if Level(2) %> <% if Level(2) %>
<div id="Breadcrumbs"> <div id="Breadcrumbs">
<p>$Breadcrumbs</p> $Breadcrumbs
</div> </div>
<% end_if %> <% end_if %>

View File

@ -3,12 +3,12 @@
<% if TrackBacks %> <% if TrackBacks %>
<ul id="TrackBacks"> <ul id="TrackBacks">
<% control TrackBacks %> <% loop TrackBacks %>
<li> <li>
<a href="$Url"><% if Title %>$Title<% else %>$Url<% end_if %></a> <span class="date">on $Created.Nice</span> <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 %> <% if Excerpt %><p class="excerpt">$Excerpt</p><% end_if %>
</li> </li>
<% end_control %> <% end_loop %>
</ul> </ul>
<% else %> <% else %>
<p>No TrackBacks have been submitted for this page.</p> <p>No TrackBacks have been submitted for this page.</p>

View File

@ -9,13 +9,11 @@
<p class="tags"> <p class="tags">
<% _t('TAGS', 'Tags:') %> <% _t('TAGS', 'Tags:') %>
<% control TagsCollection %> <% 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 %> <% end_control %>
</p> </p>
<% end_if %> <% end_if %>
$Content
$Content
</div> </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 %> <% 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 %>

View File

@ -5,17 +5,25 @@
<% include BreadCrumbs %> <% include BreadCrumbs %>
<% if SelectedTag %> <% 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 %> <% 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 %> <% end_if %>
<% if BlogEntries %> <% if BlogEntries %>
<% control BlogEntries %> <% loop BlogEntries %>
<% include BlogSummary %> <% include BlogSummary %>
<% end_control %> <% end_loop %>
<% else %> <% else %>
<h3><% _t('NOENTRIES', 'There are no blog entries') %></h3> <h2><% _t('NOENTRIES', 'There are no blog entries') %></h2>
<% end_if %> <% end_if %>
<% include BlogPagination %> <% include BlogPagination %>

View File

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

View File

@ -1,7 +1,7 @@
<ul> <ul>
<% control FeedItems %> <% loop FeedItems %>
<li> <li>
<a href="$Link">$Title</a> <a href="$Link">$Title</a>
</li> </li>
<% end_control %> <% end_loop %>
</ul> </ul>

View File

@ -1,5 +1,5 @@
<p class="tagcloud"> <p class="tagcloud">
<% control TagsCollection %> <% loop TagsCollection %>
<a href="$Link" class="$Class">$Tag</a> <a href="$Link" class="$Class">$Tag</a>
<% end_control %> <% end_loop %>
</p> </p>