diff --git a/src/index.py b/src/index.py
index e76702b..f68c88e 100644
--- a/src/index.py
+++ b/src/index.py
@@ -7,7 +7,32 @@ from bottle import error, route, run, static_file, template
# write diary
def build_nav():
- return "nav"
+ nav = "nav"
+ return nav
+
+#function build_nav($page, $total) {
+ # echo '
';
+
+ # $limit = 4;
+
+ # $min = max($page - $limit, 0);
+ #$max = min($page + $limit, $total);
+# if($min > 0) {
+ # echo "
first";
+ # }
+ # for($i = $min; $i < $max; $i++) {
+ # if ($i == $page) {
+ # echo "
$i";
+ # } else {
+ # echo "
$i";
+ #}
+# }
+ # if($max < $total) {
+ # $t = $total - 1;
+ # echo "
last";
+ #}
+# echo '
';
+#}
def make_latest():
# for article in array (just 5 or something)
@@ -120,7 +145,7 @@ def presskit():
@route('/diary')
def diary():
"""diary page"""
- info = {'css': 'diary', 'title': 'blessfrey - about the game', 'year': datetime.datetime.now(), 'snippets': list_snippets(sort_files(gather_files())), 'latest': make_latest()}
+ info = {'css': 'diary', 'title': 'blessfrey - about the game', 'year': datetime.datetime.now(), 'snippets': list_snippets(sort_files(gather_files())), 'latest': make_latest(), 'nav': build_nav()}
return template('diary.tpl', info)
if __name__ == '__main__':
diff --git a/src/views/diary.tpl b/src/views/diary.tpl
index 2329bc9..80d0e0a 100644
--- a/src/views/diary.tpl
+++ b/src/views/diary.tpl
@@ -1,7 +1,9 @@
% rebase('frame.tpl')
-
+
+ {{nav}}
+