36 lines
958 B
HTML
36 lines
958 B
HTML
$def with (links, span, base, offset, limit, total)
|
|
|
|
$ last_date = None
|
|
|
|
$for link in links:
|
|
$ date = link.to_datestr()
|
|
$if date != last_date:
|
|
<h1 class="entry-title">
|
|
<a href="links/$link.to_date_link()">$date</a>
|
|
</h1>
|
|
$ last_date = date
|
|
|
|
<div class="entry-summary">
|
|
$if not link.URL:
|
|
$link.title
|
|
$else:
|
|
<a href="$link.URL">$:link.URL_description</a>
|
|
$:link.description
|
|
$if link.extended:
|
|
<a href="link/$link.linkID" class="more-link">more inside</a>
|
|
</div>
|
|
<div class="entry-meta">
|
|
posted by <a href="user/$link.user.username">$link.user.username</a>
|
|
$link.ago() ago
|
|
-
|
|
<a href="link/$link.linkID">$len(link.comments) comments</a>
|
|
</div>
|
|
|
|
$if total > limit:
|
|
Page
|
|
$ at = 1 + offset // limit
|
|
$for i in range(0, total, limit):
|
|
$if loop.index == at: <b>
|
|
<a href="$base?offset=$i">$loop.index</a>
|
|
$if loop.index == at: </b>
|