trikiff: better spaces for dumb renderers
This commit is contained in:
parent
159d7eac84
commit
d8ed7d2921
13
trikiff
13
trikiff
|
@ -19,14 +19,15 @@ def get_day_file(year, month, day):
|
||||||
|
|
||||||
def reply_home():
|
def reply_home():
|
||||||
scgi.header(20, "text/gemini")
|
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/today", "Add kiffs of today")
|
||||||
scgi.link("/new/yesterday", "Add kiffs of yesterday")
|
scgi.link("/new/yesterday", "Add kiffs of yesterday")
|
||||||
scgi.link("/new", "Add kiffs for another day")
|
scgi.link("/new", "Add kiffs for another day")
|
||||||
|
print()
|
||||||
|
|
||||||
print("## This month")
|
print("## This month\n")
|
||||||
today = datetime.date.today()
|
today = datetime.date.today()
|
||||||
month_dir = get_month_dir(today.year, today.month)
|
month_dir = get_month_dir(today.year, today.month)
|
||||||
if month_dir.is_dir():
|
if month_dir.is_dir():
|
||||||
|
@ -34,7 +35,7 @@ def reply_home():
|
||||||
else:
|
else:
|
||||||
print("No kiffs yet!")
|
print("No kiffs yet!")
|
||||||
|
|
||||||
print("## Past months")
|
print("## Past months\n")
|
||||||
scgi.link("/browse", "Browse archives")
|
scgi.link("/browse", "Browse archives")
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,11 +79,11 @@ def reply_browse(directory=None):
|
||||||
if not path.is_dir():
|
if not path.is_dir():
|
||||||
scgi.not_found()
|
scgi.not_found()
|
||||||
scgi.header(20, "text/gemini")
|
scgi.header(20, "text/gemini")
|
||||||
print(f"# Kiffs for {directory}")
|
print(f"# Kiffs for {directory}\n")
|
||||||
print_month(path)
|
print_month(path)
|
||||||
else:
|
else:
|
||||||
scgi.header(20, "text/gemini")
|
scgi.header(20, "text/gemini")
|
||||||
print("# Trikiff archives 📜")
|
print("# Trikiff archives 📜\n")
|
||||||
for path in sorted(scgi.get_user_dir().iterdir(), reverse=True):
|
for path in sorted(scgi.get_user_dir().iterdir(), reverse=True):
|
||||||
if not path.is_dir():
|
if not path.is_dir():
|
||||||
continue
|
continue
|
||||||
|
|
Reference in a new issue