article renders in article css; the article text is squished to the left and begins in the nav row

small-nav
chimchooree 4 years ago
parent a69c3215d7
commit a08d9c6e29

@ -22,13 +22,16 @@ def collect_raw(d):
return glob.glob(d) return glob.glob(d)
def clear_articles(): def clear_articles():
files = glob.glob('../*.tpl') files = glob.glob('../*')
print(files)
if '../raw' in files:
files.remove('../raw')
for f in files: for f in files:
os.remove(f) os.remove(f)
def main(): def main():
clear_articles() clear_articles()
create_files(collect_raw('entries/*.tpl'), '..') create_files(collect_raw('entries/*'), '..')
## Start Program ## ## Start Program ##

@ -21,9 +21,12 @@ def list_headlines(articles):
def retrieve_article(page): def retrieve_article(page):
text = [] text = []
with open(loc + page) as f: string = ""
text = f.readlines() with open(loc + str(page)) as f:
return text text = f.readlines()
for line in text:
string += line
return string
def list_snippets(articles): def list_snippets(articles):
limit = 4 limit = 4
@ -136,14 +139,12 @@ def diary(page):
@route('/diary/entries/<page:int>') @route('/diary/entries/<page:int>')
def entry(page): def entry(page):
info = {'css': 'box', 'title': 'blessfrey - credits', 'year': datetime.datetime.now()} """diary entry"""
info = {'css': 'diary', 'title': 'blessfrey - developer diary', 'year': datetime.datetime.now(), 'entry': retrieve_article(page), 'latest': list_headlines(sort_files(gather_files())[0:5]), 'page': page}
abs_app_dir_path = os.path.dirname(os.path.realpath(__file__)) abs_app_dir_path = os.path.dirname(os.path.realpath(__file__))
abs_views_path = os.path.join(abs_app_dir_path, 'views') abs_views_path = os.path.join(abs_app_dir_path, 'views')
TEMPLATE_PATH.insert(0, abs_views_path ) TEMPLATE_PATH.insert(0, abs_views_path )
return template(os.path.join(abs_views_path,'contact.tpl'), info) return template(os.path.join(abs_views_path,'feature.tpl'), info)
# """diary entry"""
# info = {'css': 'diary', 'title': 'blessfrey - developer diary', 'year': datetime.datetime.now(), 'entry': retrieve_article(page), 'latest': list_headlines(sort_files(gather_files())[0:5]), 'page': page}
# return template('feature.tpl', info)
@route('/box') @route('/box')
def box(): def box():

@ -150,7 +150,7 @@ mark {
.diary-entry { .diary-entry {
grid-area: 3 / 2 / 7 / 3; grid-area: 3 / 2 / 7 / 3;
background-color: #F4A5AE; background-color: #Ff0000;
padding: 5px; padding: 5px;
} }

@ -5,7 +5,7 @@
<!--left column--> <!--left column-->
<div class="diary-entry"> <div class="diary-entry">
{{entry}} {{!entry}}
<br> <br>
</div> </div>

Loading…
Cancel
Save