From b790e8fd8ed998033027e4f25e0c1a1256320360 Mon Sep 17 00:00:00 2001 From: stefan Date: Wed, 12 Jul 2023 00:08:49 +0200 Subject: [PATCH] Further markdown implementation --- 2021-06-01 22:47:04.921524848 +0200 | 0 blog/Keep It Simple/index.md | 5 +++-- blog/The Joy of One-Liners/index.md | 2 ++ start_site.py | 10 +++++----- static/rss.xml | 2 +- static/stylesheet.css | 9 +++++---- templates/blog.html | 2 +- 7 files changed, 17 insertions(+), 13 deletions(-) delete mode 100644 2021-06-01 22:47:04.921524848 +0200 diff --git a/2021-06-01 22:47:04.921524848 +0200 b/2021-06-01 22:47:04.921524848 +0200 deleted file mode 100644 index e69de29..0000000 diff --git a/blog/Keep It Simple/index.md b/blog/Keep It Simple/index.md index a8fec03..c7c8064 100644 --- a/blog/Keep It Simple/index.md +++ b/blog/Keep It Simple/index.md @@ -1,3 +1,5 @@ +2021-06-01 + # Keep It Simple While studying architecture not only had I so little money that I ate @@ -21,8 +23,7 @@ using your product. In proxy, any room, place or inanimate object created by a human speaks to the user. Even on an emotional level. Psychologists or product designers like computer and car designers are no strangers to this. Donald Norman wrote multiple books about it -[[2]]{#references){style="text-decoration:none"}, -[[3]](#references){style="text-decoration:none"}. Some good reads. +[[2]](#references), [[3]](#references). Schulz von Thun defined the [four-ears model](http://temp.chpfeiffer.de/Four-sides_model.pdf) in which a sender's message is received on four different levels. These are Factual diff --git a/blog/The Joy of One-Liners/index.md b/blog/The Joy of One-Liners/index.md index 60c9bd3..b6b5d9f 100644 --- a/blog/The Joy of One-Liners/index.md +++ b/blog/The Joy of One-Liners/index.md @@ -1,3 +1,5 @@ +2022-05-29 + # The Joy of One-Liners There is an engineering idiom which withstands time like no other. As diff --git a/start_site.py b/start_site.py index fdcdc69..0b80b2a 100644 --- a/start_site.py +++ b/start_site.py @@ -19,13 +19,13 @@ app = Flask(__name__) Markdown(app) meta_data = { - root[len("./blog/"):]: datetime.fromtimestamp( - os.path.getmtime( - os.path.join(root, "index.html") - ) + root[len("./blog/"):]: datetime.strptime( + open(os.path.join(root, "index.md"), encoding='UTF-8') + .readline().rstrip(), + "%Y-%m-%d" ) for root, dirs, files in os.walk("./blog") - if "index.html" in files + if "index.md" in files } app.config["blog"] = toml.load("settings.toml") diff --git a/static/rss.xml b/static/rss.xml index 080d95f..ef4578d 100644 --- a/static/rss.xml +++ b/static/rss.xml @@ -1,2 +1,2 @@ -Website of Stefan Friesehttps://stefan.workstesthttp://www.rssboard.org/rss-specificationpython-feedgenen-usSat, 08 Jul 2023 11:34:36 +0000The Joy of One-Linershttps://stefan.works/blog/The Joy of One-Liners/index.htmlhttps://stefan.works/blog/The Joy of One-Liners/index.htmlSun, 29 May 2022 22:52:44 +0200Keep It Simplehttps://stefan.works/blog/Keep It Simple/index.htmlhttps://stefan.works/blog/Keep It Simple/index.htmlTue, 01 Jun 2021 22:47:04 +0200 \ No newline at end of file +Website of Stefan Friesehttps://stefan.workstesthttp://www.rssboard.org/rss-specificationpython-feedgenen-usTue, 11 Jul 2023 21:32:56 +0000The Joy of One-Linershttps://stefan.works/blog/The Joy of One-Liners/index.htmlhttps://stefan.works/blog/The Joy of One-Liners/index.htmlSun, 29 May 2022 00:00:00 +0200Keep It Simplehttps://stefan.works/blog/Keep It Simple/index.htmlhttps://stefan.works/blog/Keep It Simple/index.htmlTue, 01 Jun 2021 00:00:00 +0200 \ No newline at end of file diff --git a/static/stylesheet.css b/static/stylesheet.css index 31d490e..afc8dc9 100644 --- a/static/stylesheet.css +++ b/static/stylesheet.css @@ -25,11 +25,12 @@ h2 { font-size: 22px; margin-bottom: 2px; } h3 { font-size: 14px; } p { font-size: 16px; } blockquote { text-align: center; font-size: 16px; font-style: normal; line-height: 30px;} -pre { border: 1px solid #ddd; font-size: 14px; padding-left: 2ch; line-height: 18px; overflow: auto; } -code { background-color: #282C34; color: #979FAD; } -hr { height: 1px; border: 0px;} +pre { border: 1px solid #ddd; font-size: 14px; padding: 1ch; line-height: 18px; overflow: auto; } +/* code { background-color: #282C34; color: #979FAD; } */ +code {padding-left: 0.5ch; padding-right: 0.5ch;} +/* hr { height: 1px; border: 0px;} */ a {color: inherit; text-decoration: solid underline;} -img { max-width: 100%; } +img { max-width: 100%; display: block; margin-left: auto; margin-right: auto; } .menu { line-height: 1em; font-size: 24px; line-height: 1em; text-decoration: none; } .index { color: inherit; text-decoration: solid underline; } .references { text-decoration: solid underline; text-underline-position: under; } diff --git a/templates/blog.html b/templates/blog.html index 842325f..5252ae2 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -4,7 +4,7 @@ {% endblock %} {% block content %} - {{ _date.date() }} + {{ md_doc|markdown }} {% endblock %}