fix anchors, introduce top anchor and link to it

This commit is contained in:
fordprefect
2022-02-25 12:05:22 +01:00
parent 34d3e68aac
commit 2ae6135180

View File

@@ -76,7 +76,7 @@ with open("index.html", "w") as f:
f.write("""<html>
<head>
</head>
<body>
<body id='top'>
""")
f.write(f"zuletzt aktualisiert: {datetime.datetime.now().strftime('%d.%m.%Y %H:%M')}<br>")
@@ -87,13 +87,14 @@ with open("index.html", "w") as f:
f.write("</list>\n<br><br>\n")
for b in bistros:
f.write(f"<h1><a name='#{b}'></a>{b}</h1>\n")
f.write(f"<h1><a id='{b}'></a>{b}</h1>\n")
try:
f.write(bistros[b]['f']())
f.write("\n")
except Exception as e:
print(f"Speiseplan: Aktualisierung von {b} fehlgeschlagen mit {e}")
f.write("fehlgeschlagen<br>\n")
f.write("<p align=right><a href=#top>zurück nach oben</a></p>\n")
f.write("<br><br>\n")