From e9f37257065314a5d820db666c2dd35064a1c2b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Sat, 4 Sep 2021 00:26:10 +0200 Subject: [PATCH] Render with style. --- _scripts/generate.py | 20 +++++++++++++++++--- static/style.css | 13 +++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 static/style.css diff --git a/_scripts/generate.py b/_scripts/generate.py index 1a71cab..d47cf15 100644 --- a/_scripts/generate.py +++ b/_scripts/generate.py @@ -87,7 +87,7 @@ def main(src_top, dest_top): endpath = os.path.join(dest_top, headline.id + ".node.html") with open(endpath, "wt") as f: - f.write(render(headline, doc)) + f.write(as_document(render(headline, doc))) files_generated += 1 logging.info("Generated {} files".format(files_generated)) @@ -175,7 +175,7 @@ def render(headline, doc): else: todo_state = "done" return f""" -
+
+ """ +def as_document(html): + return f""" + + + + + + + {html} + + + """ + + def save_changes(doc): assert doc.path is not None with open(doc.path, "wt") as f: diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..1574183 --- /dev/null +++ b/static/style.css @@ -0,0 +1,13 @@ +.node .node { + margin-left: 1ex; + padding-left: 1ex; + border-left: 1px solid #444; +} + +li .tag { + font-weight: bold; +} + +li .tag::after { + content: ": "; +}