Skip to content

Commit

Permalink
Refine tpl:block for pagination and archive
Browse files Browse the repository at this point in the history
  • Loading branch information
franck-paul committed Sep 20, 2021
1 parent 8c8c27c commit ca1b774
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 23 deletions.
20 changes: 13 additions & 7 deletions inc/public/default-templates/dotty/_pagination.html
Expand Up @@ -2,13 +2,19 @@
<tpl:Block name="_pagination-content">
<tpl:Pagination>
<nav class="pagination" aria-label="{{tpl:lang Pagination}}" role="navigation">
<tpl:PaginationIf end="0">
<a href="{{tpl:PaginationURL offset="+1"}}" class="prev"><span aria-hidden="true">&#171; </span>{{tpl:lang previous entries}}</a> -
</tpl:PaginationIf>
<span class="visually-hidden">{{tpl:lang Active page}}</span>{{tpl:lang page}} {{tpl:PaginationCurrent}} {{tpl:lang of}} {{tpl:PaginationCounter}}
<tpl:PaginationIf start="0"> - <a href="{{tpl:PaginationURL offset="-1"}}" class="next">
{{tpl:lang next entries}}<span aria-hidden="true"> &#187;</span></a>
</tpl:PaginationIf>
<tpl:Block name="_pagination-content-prev">
<tpl:PaginationIf end="0">
<a href="{{tpl:PaginationURL offset="+1"}}" class="prev"><span aria-hidden="true">&#171; </span>{{tpl:lang previous entries}}</a> -
</tpl:PaginationIf>
</tpl:Block>
<tpl:Block name="_pagination-content-current">
<span class="visually-hidden">{{tpl:lang Active page}}</span>{{tpl:lang page}} {{tpl:PaginationCurrent}} {{tpl:lang of}} {{tpl:PaginationCounter}}
</tpl:Block>
<tpl:Block name="_pagination-content-next">
<tpl:PaginationIf start="0"> - <a href="{{tpl:PaginationURL offset="-1"}}" class="next">
{{tpl:lang next entries}}<span aria-hidden="true"> &#187;</span></a>
</tpl:PaginationIf>
</tpl:Block>
</nav>
</tpl:Pagination>
</tpl:Block>
Expand Down
36 changes: 20 additions & 16 deletions inc/public/default-templates/dotty/archive.html
Expand Up @@ -30,22 +30,26 @@ <h2>{{tpl:lang Archives}}</h2>
<article id="time-criteria">
<!-- # entries sorted by date -->
<div id="arch-by-year" class="arch-block arch-by-year">
<h3>{{tpl:lang By date}}</h3>
<p class="fromto">{{tpl:lang FromDay}} <tpl:Entries no_content="1" order="asc" lastn="1"><a href="{{tpl:EntryURL}}"><time datetime="{{tpl:EntryDate iso8601="1"}}">{{tpl:EntryDate format="%e %B %Y"}}</time></a></tpl:Entries> {{tpl:lang toDay}} <tpl:Entries no_content="1" order="desc" lastn="1"><a href="{{tpl:EntryURL}}"><time datetime="{{tpl:EntryDate iso8601="1"}}">{{tpl:EntryDate format="%e %B %Y"}}</time></a></tpl:Entries>
</p>
<tpl:Archives order="asc">
<tpl:ArchivesYearHeader>
<div class="arch-by-year__each-year">
<h4><time datetime="{{tpl:ArchiveDate format="%Y"}}">{{tpl:ArchiveDate format="%Y"}}</time></h4>
<ul class="arch-list arch-year-list">
</tpl:ArchivesYearHeader>
<li><a href="{{tpl:ArchiveURL}}" title="{{tpl:ArchiveDate encode_html="1"}}"><time datetime="{{tpl:ArchiveDate format="%Y-%m"}}">{{tpl:ArchiveDate encode_html="1" format="%B"}}</time></a>
<span>({{tpl:ArchiveEntriesCount}})</span></li>
<tpl:ArchivesYearFooter>
</ul>
</div>
</tpl:ArchivesYearFooter>
</tpl:Archives>
<tpl:Block name="main-content-time-title">
<h3>{{tpl:lang By date}}</h3>
<p class="fromto">{{tpl:lang FromDay}} <tpl:Entries no_content="1" order="asc" lastn="1"><a href="{{tpl:EntryURL}}"><time datetime="{{tpl:EntryDate iso8601="1"}}">{{tpl:EntryDate format="%e %B %Y"}}</time></a></tpl:Entries> {{tpl:lang toDay}} <tpl:Entries no_content="1" order="desc" lastn="1"><a href="{{tpl:EntryURL}}"><time datetime="{{tpl:EntryDate iso8601="1"}}">{{tpl:EntryDate format="%e %B %Y"}}</time></a></tpl:Entries>
</p>
</tpl:Block>
<tpl:Block name="main-content-time-content">
<tpl:Archives order="asc">
<tpl:ArchivesYearHeader>
<div class="arch-by-year__each-year">
<h4><time datetime="{{tpl:ArchiveDate format="%Y"}}">{{tpl:ArchiveDate format="%Y"}}</time></h4>
<ul class="arch-list arch-year-list">
</tpl:ArchivesYearHeader>
<li><a href="{{tpl:ArchiveURL}}" title="{{tpl:ArchiveDate encode_html="1"}}"><time datetime="{{tpl:ArchiveDate format="%Y-%m"}}">{{tpl:ArchiveDate encode_html="1" format="%B"}}</time></a>
<span>({{tpl:ArchiveEntriesCount}})</span></li>
<tpl:ArchivesYearFooter>
</ul>
</div>
</tpl:ArchivesYearFooter>
</tpl:Archives>
</tpl:Block>
</div>
</article>
</tpl:Block>
Expand Down

0 comments on commit ca1b774

Please sign in to comment.