mirror of
https://github.com/openresty/openresty.git
synced 2024-10-13 00:29:41 +00:00
checked in mising files in the blog demo.
This commit is contained in:
28
demo/Blog/template/elem/recent-posts.tt
Normal file
28
demo/Blog/template/elem/recent-posts.tt
Normal file
@ -0,0 +1,28 @@
|
||||
<ul class="module-list">
|
||||
[% last_id %]
|
||||
[% FOREACH post IN posts -%]
|
||||
<li class="module-list-item">
|
||||
<a href="#post-[% post.id %]">[% post.title %]</a>
|
||||
</li>
|
||||
[%- last_id = post.id %]
|
||||
[% END -%]
|
||||
</ul>
|
||||
|
||||
<p class="module-more">
|
||||
|
||||
[% IF offset > 0 %]
|
||||
<a href="javascript:getRecentPosts([% offset - count %])"><<</a>
|
||||
[% END %]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[% IF last_id > 1 && posts.size == count %]
|
||||
<a id="more-recent-posts" href="javascript:getRecentPosts([% offset + count %]);">
|
||||
Next...
|
||||
</a>
|
||||
[% END %]
|
||||
|
||||
</p>
|
||||
|
Reference in New Issue
Block a user