diary and entry are functional

This commit is contained in:
chimchooree
2022-07-20 23:54:48 -05:00
parent a6c8e13e5f
commit 3d1bb99def
53 changed files with 1238 additions and 58 deletions
+16 -20
View File
@@ -1,9 +1,8 @@
% rebase('frame.tpl')
% import re
% rebase('frame.tpl')
% import re
<div class="content-grid">
<div class="diary-dir top">
<center>
% max_pages = int((total - 1) / limit)
<%
# page never below 0
@@ -18,18 +17,18 @@
<div class="diary-dir-left">
% # << is always active link pointing to 0
<a href=/diary/0>
<img src="/static/img/btn/nav_ll.png" alt="&lt;&lt;" width="33" height="29">
<img src="/static/img/dia/nav_ll.png" alt="&lt;&lt;">
</a>
% # < points to 0 if page 0 or below
% if page <= 0:
<a href=/diary/0>
<img src="/static/img/btn/nav_l.png" alt="&lt;" width="27" height="29">
<img src="/static/img/dia/nav_l.png" alt="&lt;">
</a>
% # < points to previous page otherwise
% else:
<a href=/diary/{{page - 1}}>
<img src="/static/img/btn/nav_l.png" alt="&lt;" width="27" height="29">
<img src="/static/img/dia/nav_l.png" alt="&lt;">
</a>
% end
</div>
@@ -73,28 +72,27 @@
% # > points to max if page is at or above maximum
% if page >= max_pages:
<a href=/diary/{{max_pages}}>
<img src="/static/img/btn/nav_r.png" alt="&gt;" width="27" height="29">
<img src="/static/img/dia/nav_r.png" alt="&gt;">
</a>
% # > point to next page otherwise
% else:
<a href=/diary/{{page + 1}}>
<img src="/static/img/btn/nav_r.png" alt="&gt;" width="27" height="29">
<img src="/static/img/dia/nav_r.png" alt="&gt;">
</a>
% end
% # >> is always active link to maximum page
<a href=/diary/{{max_pages}}>
<img src="/static/img/btn/nav_rr.png" alt="&gt;&gt;" width="33" height="29">
<img src="/static/img/dia/nav_rr.png" alt="&gt;&gt;">
</a>
</div>
</center>
</div>
<div class="diary-pages">
% for s in snippets[page * limit:page * limit + limit]:
<div class="snippet">
<div class="snippet-title">
<a href={{s[3]}} rel="nofollow"><h1>{{!s[0]}}</h1></a>
<a href={{s[3]}} rel="nofollow"><h2>{{!s[0]}}</h2></a>
</div>
<div class="date-line">
<b>chimchooree</b>
@@ -118,7 +116,7 @@
</div>
<div class="snippet-link">
<a href={{s[3]}}>
<img src="/static/img/btn/diaryreadmore.png" alt="read more" width="99" height="84">
<img src="/static/img/dia/diaryreadmore.png" alt="read more">
</a>
</div>
<div class="snippet-bottom">
@@ -130,7 +128,6 @@
% include diary-boxes.tpl
<div class="diary-dir bottom">
<center>
% max_pages = int((total - 1) / limit)
<%
# page never below 0
@@ -145,18 +142,18 @@
<div class="diary-dir-left">
% # << is always active link pointing to 0
<a href=/diary/0>
<img src="/static/img/btn/nav_ll.png" alt="&lt;&lt;" width="33" height="29">
<img src="/static/img/dia/nav_ll.png" alt="&lt;&lt;">
</a>
% # < points to 0 if page 0 or below
% if page <= 0:
<a href=/diary/0>
<img src="/static/img/btn/nav_l.png" alt="&lt;" width="27" height="29">
<img src="/static/img/dia/nav_l.png" alt="&lt;">
</a>
% # < points to previous page otherwise
% else:
<a href=/diary/{{page - 1}}>
<img src="/static/img/btn/nav_l.png" alt="&lt;" width="27" height="29">
<img src="/static/img/dia/nav_l.png" alt="&lt;">
</a>
% end
</div>
@@ -201,20 +198,19 @@
% # > points to max if page is at or above maximum
% if page >= max_pages:
<a href=/diary/{{max_pages}}>
<img src="/static/img/btn/nav_r.png" alt="&gt;" width="27" height="29">
<img src="/static/img/dia/nav_r.png" alt="&gt;">
</a>
% # > point to next page otherwise
% else:
<a href=/diary/{{page + 1}}>
<img src="/static/img/btn/nav_r.png" alt="&gt;" width="27" height="29">
<img src="/static/img/dia/nav_r.png" alt="&gt;">
</a>
% end
% # >> is always active link to maximum page
<a href=/diary/{{max_pages}}>
<img src="/static/img/btn/nav_rr.png" alt="&gt;&gt;" width="33" height="29">
<img src="/static/img/dia/nav_rr.png" alt="&gt;&gt;">
</a>
</div>
</center>
</div>