From 0effb0c13a10c366e98042bac70e9990c032aa0d Mon Sep 17 00:00:00 2001 From: chimchooree Date: Fri, 9 Oct 2020 20:24:43 -0500 Subject: [PATCH] feature recommend python ends --- src/index.py | 2 +- src/static/css/feature.css | 4 +++- src/views/feature.tpl | 9 ++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/index.py b/src/index.py index 6c0a05f..ce5298a 100644 --- a/src/index.py +++ b/src/index.py @@ -140,7 +140,7 @@ def diary(page): @route('/diary/entries/') def entry(page): """diary entry""" - info = {'css': 'feature', 'title': 'blessfrey - developer diary', 'year': datetime.datetime.now(), 'entry': retrieve_article(page), 'header': "More Articles", 'dates': "Dates", 'articles': "Articles", 'latest': list_headlines(sort_files(gather_files())[0:5]), 'page': page} + info = {'css': 'feature', 'title': 'blessfrey - developer diary', 'year': datetime.datetime.now(), 'entry': retrieve_article(page), 'recommends': [['title','content','anchor'],['title','content','anchor'],['title','content','anchor']], 'articles': "Articles", 'latest': list_headlines(sort_files(gather_files())[0:5]), 'page': page} abs_app_dir_path = os.path.dirname(os.path.realpath(__file__)) abs_views_path = os.path.join(abs_app_dir_path, 'views') TEMPLATE_PATH.insert(0, abs_views_path ) diff --git a/src/static/css/feature.css b/src/static/css/feature.css index 0dde077..00d521a 100644 --- a/src/static/css/feature.css +++ b/src/static/css/feature.css @@ -146,7 +146,7 @@ ul { list-style-position: inside; } .diary-entry { grid-area: 3 / 2 / 6 / 3; - background-color: #ff0000; + background-color: #aa2055; padding: 5px; } @@ -183,6 +183,8 @@ ul { list-style-position: inside; } grid-template-rows: 15% 35% auto; grid-column-gap: 0px; grid-row-gap: 0px; + overflow-y: scroll; + overflow-x: hidden; } .footer-row { diff --git a/src/views/feature.tpl b/src/views/feature.tpl index 9b1b71c..9fbe7bd 100644 --- a/src/views/feature.tpl +++ b/src/views/feature.tpl @@ -9,7 +9,14 @@ % include diary-boxes.tpl
- {{!articles}} + % for r in recommends: +
+ {{!r[0]}} +
+
+ {{!r[1]}} +
+ % end