trikiff: better spaces for dumb renderers

This commit is contained in:
dece 2021-12-13 23:43:53 +01:00
parent 159d7eac84
commit d8ed7d2921

13
trikiff
View file

@ -19,14 +19,15 @@ def get_day_file(year, month, day):
def reply_home():
scgi.header(20, "text/gemini")
print("# Trikiff! 🌄🥰🌃")
print("# Trikiff! 🌄🥰🌃\n")
print("## Actions")
print("## Actions\n")
scgi.link("/new/today", "Add kiffs of today")
scgi.link("/new/yesterday", "Add kiffs of yesterday")
scgi.link("/new", "Add kiffs for another day")
print()
print("## This month")
print("## This month\n")
today = datetime.date.today()
month_dir = get_month_dir(today.year, today.month)
if month_dir.is_dir():
@ -34,7 +35,7 @@ def reply_home():
else:
print("No kiffs yet!")
print("## Past months")
print("## Past months\n")
scgi.link("/browse", "Browse archives")
@ -78,11 +79,11 @@ def reply_browse(directory=None):
if not path.is_dir():
scgi.not_found()
scgi.header(20, "text/gemini")
print(f"# Kiffs for {directory}")
print(f"# Kiffs for {directory}\n")
print_month(path)
else:
scgi.header(20, "text/gemini")
print("# Trikiff archives 📜")
print("# Trikiff archives 📜\n")
for path in sorted(scgi.get_user_dir().iterdir(), reverse=True):
if not path.is_dir():
continue