From fc1d88e05eb53b4691d59c31d7373aab218f9e43 Mon Sep 17 00:00:00 2001 From: chimchooree Date: Sat, 2 Mar 2024 19:26:14 -0600 Subject: [PATCH] header --- src/index.py | 8 +++++++- src/views/header.tpl | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/index.py b/src/index.py index d4c5f1f..2a9577d 100644 --- a/src/index.py +++ b/src/index.py @@ -567,7 +567,13 @@ def entry(page_t): loc = 'diary/entries/' entry = prepare_diary_entry(page, loc) - info = {'css': 'entry', 'title': entry[0], 'year': find_year(), 'preview': prepare_article(entry[1], loc + page), 'entry': entry, 'recommends': list_rec(page, loc), 'articles': "Articles", 'latest': list_headlines(gather_and_sort(loc)[0:5], loc), 'tags': fill_word_cloud(curate_files(gather_files(loc)), loc), 'page': page, 'category': "diary"} + preview_t = prepare_article(entry[1], loc + page) + preview = preview_t.replace('

','') + preview = preview.replace('

','') + preview = preview.replace('<p>','') + print(preview) + + info = {'css': 'entry', 'title': entry[0], 'year': find_year(), 'preview': preview, 'entry': entry, 'recommends': list_rec(page, loc), 'articles': "Articles", 'latest': list_headlines(gather_and_sort(loc)[0:5], loc), 'tags': fill_word_cloud(curate_files(gather_files(loc)), loc), 'page': page, 'category': "diary"} 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/views/header.tpl b/src/views/header.tpl index 3f3f6c5..711ee2a 100644 --- a/src/views/header.tpl +++ b/src/views/header.tpl @@ -2,7 +2,7 @@ - +