|
|
@ -4,16 +4,16 @@
|
|
|
|
<div class="diary-dir">
|
|
|
|
<div class="diary-dir">
|
|
|
|
|
|
|
|
|
|
|
|
<%
|
|
|
|
<%
|
|
|
|
if page <= 0:
|
|
|
|
if page <= 0:
|
|
|
|
page = 0
|
|
|
|
page = 0
|
|
|
|
end
|
|
|
|
end
|
|
|
|
if page > int(total - 1 / limit):
|
|
|
|
if page > int(total - 1 / limit):
|
|
|
|
page = int(total - 1 / limit)
|
|
|
|
page = int(total - 1 / limit)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
%>
|
|
|
|
%>
|
|
|
|
% if page >= limit + 1:
|
|
|
|
% if page >= limit + 1:
|
|
|
|
<a href=0>first</a>
|
|
|
|
<a href=0>first</a>
|
|
|
|
% end
|
|
|
|
% end
|
|
|
|
% for i in range(max(0,page - limit), min(total,page + limit)):
|
|
|
|
% for i in range(max(0,page - limit), min(total,page + limit)):
|
|
|
|
% if i == page:
|
|
|
|
% if i == page:
|
|
|
|
<b>{{i}}</b>
|
|
|
|
<b>{{i}}</b>
|
|
|
@ -21,6 +21,9 @@
|
|
|
|
<a href={{i}}>{{i}}</a>
|
|
|
|
<a href={{i}}>{{i}}</a>
|
|
|
|
% end
|
|
|
|
% end
|
|
|
|
% end
|
|
|
|
% end
|
|
|
|
|
|
|
|
% if page <= total - limit:
|
|
|
|
|
|
|
|
<a href={{total-1}}>last</a>
|
|
|
|
|
|
|
|
% end
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!--left column-->
|
|
|
|
<!--left column-->
|
|
|
|