From 46c50c1a273d7b1ca99118fb23a1303c669fb49c Mon Sep 17 00:00:00 2001 From: chimchooree Date: Sun, 11 Jul 2021 19:19:10 -0500 Subject: [PATCH] tags box working for diary --- src/index.py | 2 +- src/static/css/diary_original.css | 375 ----------------------------- src/views/diary-boxes.tpl | 6 +- src/views/diary-boxes_original.tpl | 45 ---- src/views/diary-original.tpl | 232 ------------------ 5 files changed, 6 insertions(+), 654 deletions(-) delete mode 100644 src/static/css/diary_original.css delete mode 100644 src/views/diary-boxes_original.tpl delete mode 100644 src/views/diary-original.tpl diff --git a/src/index.py b/src/index.py index 406ec81..9f800f9 100644 --- a/src/index.py +++ b/src/index.py @@ -415,7 +415,7 @@ def diary(page): """diary page""" loc = 'diary/entries/' assert isinstance(page, int) - info = {'css': 'diary', 'title': 'blessfrey - developer diary', 'year': find_year(), 'snippets': list_snippets(gather_and_sort(loc)), 'latest': list_headlines(gather_and_sort(loc)[0:5]), 'word_cloud': fill_word_cloud(curate_files(gather_files(loc))), 'total': len(curate_files(gather_files(loc))), 'limit': 8, 'cluster': 3, 'page': page} + info = {'css': 'diary', 'title': 'blessfrey - developer diary', 'year': find_year(), 'snippets': list_snippets(gather_and_sort(loc)), 'latest': list_headlines(gather_and_sort(loc)[0:5]), 'tags': fill_word_cloud(curate_files(gather_files(loc))), 'total': len(curate_files(gather_files(loc))), 'limit': 8, 'cluster': 3, 'page': page} return template('diary.tpl', info) # Entry Page - Feature Template - for articles diff --git a/src/static/css/diary_original.css b/src/static/css/diary_original.css deleted file mode 100644 index d90d618..0000000 --- a/src/static/css/diary_original.css +++ /dev/null @@ -1,375 +0,0 @@ -* { - padding:0; - margin:0; - font-family: "Ubuntu", "Open Sans", "Calibri", "Arial", sans-serif; -} - -a { - text-decoration: none; -} - -ul { list-style-position: inside; } - -.grid { - display: grid; - grid-template-columns: auto 533px 267px auto; - grid-template-rows: 25px 90px 40px auto 40px auto; - grid-column-gap: 0px; - grid-row-gap: 0px; -} - -.whitespace { - grid-area: 1 / 1 / 2 / 5; - display: flex; - flex-direction:column; - justify-content:center; - align-items: center; - background-color: #900C3F; -} - -.blessfrey-logo { - grid-area: 1 / 2 / 2 / 4; - padding-top: 5px; - color: #FBDAEC; -} - -/* navigation pane */ - -.nav-row { - grid-area: 2 / 1 / 3 / 5; - background-color: #900C3F; -} - -.nav-grid { - grid-area: 2 / 2 / 3 / 4; - display: flex; - flex-direction:column; - justify-content:flex-end; - display: grid; - grid-template-columns: auto repeat(4, 70px) auto; - grid-template-rows: 90px; - grid-column-gap: 17px; - grid-row-gap: 0px; - align-items: end; - justify-items: center; -} -.nav-bar { - grid-area: 1 / 1 / 2 / 7; - background-image: url(../img/ele/navbar.png); - height: 86px; - width: 800px; -} -.nav-index { - grid-area: 1 / 2 / 2 / 3; - padding-bottom: 3px; - position: relative; -} -.nav-game { - grid-area: 1 / 3 / 2 / 4; - padding-bottom: 3px; - position: relative; -} -.nav-diary { - grid-area: 1 / 4 / 2 / 5; - padding-bottom: 3px; - position: relative; -} -.nav-presskit { - grid-area: 1 / 5 / 2 / 6; - padding-bottom: 3px; - position: relative; -} -.nav-link { - position: absolute; - top: 45%; - left: 50%; - transform: translate(-50%, -50%) -} -.nav-link a { - font-size: 21px; - color: #E6E8EF; - font-weight: bold; - text-shadow: - -1px -1px 1px black, - 0 -1px 1px black, - 2px -1px 1px black, - 2px 0 1px black, - 2px 2px 1px black, - 0 2px 1px black, - -1px 2px 1px black, - -1px 0 1px black; -} -.nav-link a:hover { - font-size: 21px; - color: #ecd5d2; - font-weight: bold; - text-shadow: - -1px -1px 1px black, - 0 -1px 1px black, - 2px -1px 1px black, - 2px 0 1px black, - 2px 2px 1px black, - 0 2px 1px black, - -1px 2px 1px black, - -1px 0 1px black; -} - -/* Body */ - -.dir-row { - grid-area: 3 / 2 / 4 / 4; - background-color: #080410; - color: #F9B3D7; -} - -.diary-dir { - background-color: #080410; - font-size: 23px; - padding: 0px; - margin: 0px; - color: #AAA39D; - font-weight: bold; - text-shadow: - -1px -1px 1px #080410, - 0 -1px 1px #080410, - 2px -1px 1px #080410, - 2px 0 1px #080410, - 2px 2px 1px #080410, - 0 2px 1px #080410, - -1px 2px 1px #080410, - -1px 0 1px #080410; -} -.diary-dir a { - color: #E6E8EF; - font-weight: bold; - text-shadow: - -1px -1px 1px #080410, - 0 -1px 1px #080410, - 2px -1px 1px #080410, - 2px 0 1px #080410, - 2px 2px 1px #080410, - 0 2px 1px #080410, - -1px 2px 1px #080410, - -1px 0 1px #080410; -} -.diary-dir.top { - grid-area: 3 / 1 / 4 / 5; - padding-top: 3px; -} -.diary-dir-left { - display: inline-block; - vertical-align: middle; -} -.diary-dir-numbers { - height: 29px; - display: inline-block; - white-space: nowrap; -} -.diary-dir-number { - background-color: #404664; - display: inline-block; - white-space: nowrap; - border-radius: 25px; - padding-left: 4px; - padding-right: 4px; -} -.diary-dir-right { - display: inline-block; - vertical-align: middle; -} - -.body-row { - grid-area: 4 / 1 / 5 / 5; - background-color: #080410; -} - -.diary-pages { - grid-area: 4 / 2 / 5 / 3; -} - -.snippet { - margin-top: 0px; - margin-bottom: 50px; -} - -.snippet-title { - background-image: url(../img/ele/diaryheader.png); - background-size: 100%; - height: 40px; - padding: 10px; - font-size: 10px; -} -.snippet-title a { - color: #E3E0DE; - font-weight: bold; - text-shadow: - -1px -1px 1px #324832, - 0 -1px 1px #324832, - 2px -1px 1px #324832, - 2px 0 1px #324832, - 2px 2px 1px #324832, - 0 2px 1px #324832, - -1px 2px 1px #324832, - -1px 0 1px #324832; -} -.snippet-title a:hover { - color: #ecd5d2; - font-weight: bold; - text-shadow: - -1px -1px 1px #324832, - 0 -1px 1px #324832, - 2px -1px 1px #324832, - 2px 0 1px #324832, - 2px 2px 1px #324832, - 0 2px 1px #324832, - -1px 2px 1px #324832, - -1px 0 1px #324832; -} -.snippet-content { - background-color: #ecd5d2; - color: #080410; - padding: 10px; - font-size: 15px; -} -.date-line { - background-color: #ecd5d2; - color: #080410; - padding: 5px; - padding-left: 15px; - font-size: 15px; - text-align: left; -} -.snippet-tags { - background-color: #ecd5d2; - padding: 10px; - font-size: 15px; -} -.snippet-tag { - background-color: #b9b4af; - border-radius: 25px; - padding: 3px; - padding-left: 4px; - padding-right: 4px; - color: black; - font-size: 15px; - font-weight: bold; - display: inline-block; -} -.social-line { - background-color: #404664; - padding-top: 5px; - padding-left: 15px; - -} -.social-line a { - color: #E3E0DE; - font-weight: bold; -} -.snippet-link { - margin-top: -35px; - float: right; - font-size: 15px; -} -.snippet-bottom { - background-image: url(../img/ele/diarybottom.png); - background-size: 100%; - height: 25px; -} - -.sidebar { - grid-area: 4 / 3 / 5 / 4; - display: grid; - grid-template-columns: auto; - grid-template-rows: repeat(5, auto); - grid-column-gap: 0px; - grid-row-gap: 0px; - align-content: start; - padding-left: 7px; -} -.sidebar a:link { - color: #213021; -} -.sidebar a:hover { - color: #486438; -} -.sidebar a:visited { - color: #213021; -} -.sidebar a:active { - color: #945634; -} -.about-box { - grid-area: 1 / 1 / 2 / 2; - border-radius: 25px; - background-color: #95939F; - color: #111718; - text-align: center; - margin: 15px; - padding: 5px; - margin-top: 0px; - padding-bottom: 15px; -} -.twitter-box { - grid-area: 2 / 1 / 3 / 2; - border-radius: 25px; - background-color: #95939F; - color: #111718; - text-align: center; - margin: 15px; - padding: 5px; - padding-bottom: 15px; -} -.latest { - grid-area: 3 / 1 / 4 / 2; - border-radius: 25px; - background-color: #95939F; - color: #111718; - text-align: center; - list-style-position: inside; - margin: 15px; - padding: 5px; -} -.latest-text { - text-align: left; - list-style-position: inside; - padding: 5px; -} -.wordcloud { - grid-area: 4 / 1 / 5 / 2; - border-radius: 25px; - background-color: #95939F; - color: #111718; - text-align: center; - margin: 15px; - padding: 5px; - padding-bottom: 15px; -} -.disclosure { - grid-area: 5 / 1 / 6 / 2; - border-radius: 25px; - background-color: #95939F; - color: #111718; - text-align: center; - margin: 15px; - padding: 5px; - padding-bottom: 15px; -} - -.diary-dir.bottom { - grid-area: 5 / 1 / 6 / 5; -} - -.footer-row { - grid-area: 6 / 1 / 7 / 5; - background-color: #080410; -} - -.footer-content { - background-color: #080410; - color: #ecd5d2; - padding-top: 5px; - padding-right: 25px; - box-shadow: 0 100vh 0 100vh #581845; - text-align: right; - overflow: hidden; -} diff --git a/src/views/diary-boxes.tpl b/src/views/diary-boxes.tpl index 0dc71c4..9fe394e 100644 --- a/src/views/diary-boxes.tpl +++ b/src/views/diary-boxes.tpl @@ -33,10 +33,14 @@

tags

+ % for t in tags: + % tagless = t.replace('#','') + {{t}} + % end
- Blessfrey.me is not using sponsored posts or affiliate links.
+
Blessfrey.me is not using sponsored posts or affiliate links.

Blessfrey.me is not collecting personal information + has no cookies.

diff --git a/src/views/diary-boxes_original.tpl b/src/views/diary-boxes_original.tpl deleted file mode 100644 index 4289beb..0000000 --- a/src/views/diary-boxes_original.tpl +++ /dev/null @@ -1,45 +0,0 @@ - - diff --git a/src/views/diary-original.tpl b/src/views/diary-original.tpl deleted file mode 100644 index 308f874..0000000 --- a/src/views/diary-original.tpl +++ /dev/null @@ -1,232 +0,0 @@ -% rebase('frame.tpl') -% import re -
-
-
- % max_pages = int((total - 1) / limit) -<% - # page never below 0 - if page <= 0: - page = 0 - end - # page never over maximum - if page > max_pages: - page = max_pages - end -%> -
- % # << is always active link pointing to 0 - % #<< - - << - - - % # < points to 0 if page 0 or below - % if page <= 0: - % #< - - < - - % # < points to previous page otherwise - % else: - % #< - - < - - % end - -
-
- - % # fill out number cluster to the left when page is high - % if max_pages > cluster and page > max_pages - cluster: - % for j in range(cluster - max_pages + page): - - % end - % end - - % # form cluster of number links around page - % for i in range(max(0,page - cluster), min(max_pages + 1,page + cluster + 1)): - % # bold current page number - % if i == page: -
- {{i}} -
- % # form neighboring numbers into links - % else: -
- {{i}} -
- % end - % end - - % # fill out number cluster to the right when page is low - % if page <= cluster - 1 and max_pages > page + cluster: - % for j in range(cluster - page): - - % end - % end - -
-
- - % # > points to max if page is at or above maximum - % if page >= max_pages: - % #> - - > - - % # > point to next page otherwise - % else: - % #> - - > - - % end - - % # >> is always active link to maximum page - % #>> - - >> - -
-
-
- - - -
- % for s in snippets[page * limit:page * limit + limit]: -
-
-

{{!s[0]}}

-
- -
- {{!s[1]}} -
- % if len(s[5]) >= 1: -
- % for j in s[5]: -
- {{j}} -
- % end -
- % end - - -
-
-
- % end -
-
-
- % max_pages = int((total - 1) / limit) -<% - # page never below 0 - if page <= 0: - page = 0 - end - # page never over maximum - if page > max_pages: - page = max_pages - end -%> -
- % # << is always active link pointing to 0 - % #<< - - << - - - % # < points to 0 if page 0 or below - % if page <= 0: - % #< - - < - - % # < points to previous page otherwise - % else: - % #< - - < - - % end - -
-
- - % # fill out number cluster to the left when page is high - % if max_pages > cluster and page > max_pages - cluster: - % for j in range(cluster - max_pages + page): - - % end - % end - - % # form cluster of number links around page - % for i in range(max(0,page - cluster), min(max_pages + 1,page + cluster + 1)): - % # bold current page number - % if i == page: -
- {{i}} -
- % # form neighboring numbers into links - % else: -
- {{i}} -
- % end - % end - - % # fill out number cluster to the right when page is low - % if page <= cluster - 1 and max_pages > page + cluster: - % for j in range(cluster - page): - - % end - % end - -
-
- - % # > points to max if page is at or above maximum - % if page >= max_pages: - % #> - - > - - % # > point to next page otherwise - % else: - % #> - - > - - % end - - % # >> is always active link to maximum page - % #>> - - >> - -
-
-
-% include diary-boxes.tpl