mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
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:
parent
448d34757e
commit
d33e209ee5
@ -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 %>
|
@ -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"><</a>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="prev disabled">
|
||||
<a class="paginate-left disabled"><</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">…</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 %>
|
||||
…
|
||||
<% 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">></a>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="next disabled">
|
||||
<a class="next paginate-right disabled">></a>
|
||||
</li>
|
||||
<% end_if %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end_if %>
|
@ -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 %>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<% if Level(2) %>
|
||||
<div id="Breadcrumbs">
|
||||
<p>$Breadcrumbs</p>
|
||||
$Breadcrumbs
|
||||
</div>
|
||||
<% end_if %>
|
@ -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>
|
||||
|
@ -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 %>
|
||||
|
@ -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 %>
|
||||
|
@ -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 %>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<ul>
|
||||
<% control FeedItems %>
|
||||
<% loop FeedItems %>
|
||||
<li>
|
||||
<a href="$Link">$Title</a>
|
||||
</li>
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
</ul>
|
@ -1,5 +1,5 @@
|
||||
<p class="tagcloud">
|
||||
<% control TagsCollection %>
|
||||
<% loop TagsCollection %>
|
||||
<a href="$Link" class="$Class">$Tag</a>
|
||||
<% end_control %>
|
||||
<% end_loop %>
|
||||
</p>
|
Loading…
Reference in New Issue
Block a user