add variables for snippet and latest

This commit is contained in:
Mimi Momo
2020-09-24 14:52:25 -05:00
parent e917c6d958
commit 08f187c300
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -1,6 +1,10 @@
import datetime import datetime
from bottle import route, run, template from bottle import route, run, template
# diary
# Webpages
@route('/') @route('/')
def index(): def index():
"""home page""" """home page"""
@@ -22,7 +26,7 @@ def presskit():
@route('/diary') @route('/diary')
def diary(): def diary():
"""diary page""" """diary page"""
info = {'title': 'blessfrey - about the game', 'year': datetime.datetime.now()} info = {'title': 'blessfrey - about the game', 'year': datetime.datetime.now(), 'snippets': 'snippet', 'latest': 'latest'}
return template('diary.tpl', info) return template('diary.tpl', info)
if __name__ == '__main__': if __name__ == '__main__':
+2 -2
View File
@@ -7,7 +7,7 @@
<!--left column--> <!--left column-->
<div class="diary-pages"> <div class="diary-pages">
diary pages {{snippets}}
</div> </div>
<!--right column--> <!--right column-->
@@ -24,7 +24,7 @@
<div class="latest"> <div class="latest">
<h1>latest</h1> <h1>latest</h1>
<div class="latest-text"> <div class="latest-text">
latest text {{latest}}
</div> </div>
</div> </div>