diff --git a/readme.py b/readme.py index 7b9b461..546e0d5 100644 --- a/readme.py +++ b/readme.py @@ -7,8 +7,10 @@ from flask import (Flask, redirect, render_template, request, send_from_directory, url_for) from markdown import markdown +from datetime import datetime from prefix import PrefixMiddleware + load_dotenv() PORT = os.environ.get("PORT", 3000) @@ -38,9 +40,11 @@ def render(): ], ) entries.append(html) - + + last_update = datetime.now().strftime('%d-%m-%y %H:%M:%S') + with open("index.html", "w") as r: - r.write(render_template("render.html", contents=entries)) + r.write(render_template("render.html", contents=entries, last_update=last_update)) return "rendered" diff --git a/static/style.css b/static/style.css index 98ef82f..c34c04e 100644 --- a/static/style.css +++ b/static/style.css @@ -8,6 +8,23 @@ html, body { font-family: serif; } + +header { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 64px; +} + +.last-update { + text-transform: lowercase; + font-family: sans-serif; + font-size: 0.75rem; + margin: 1em; + color: #aaa; +} + .chapter { max-width: 80ch; margin-inline: auto; @@ -24,7 +41,9 @@ h1, h2, h3 { } h2 { - color: tomato; + color: white; + background-color: black; + width: fit-content; margin: 128px auto; text-align: center; } diff --git a/templates/render.html b/templates/render.html index 5ffbe50..2b4406d 100644 --- a/templates/render.html +++ b/templates/render.html @@ -6,7 +6,12 @@
- + +