Update
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
{"tags": [" kekse ", " kekese ", " ekskeks"], "published": [2019, 6, 23, 19, 16, 45, 6, 174, 1], "title": "Ih mag kekse", "content": "kesek sindd toll"}
|
|
@@ -16,9 +16,9 @@ except:
|
|||||||
# Zeug zeigen
|
# Zeug zeigen
|
||||||
print("Content-type: text/html\n")
|
print("Content-type: text/html\n")
|
||||||
print("<head><style>")
|
print("<head><style>")
|
||||||
print("body {background-color: coral;}")
|
print("body {background-color: mintcream;}")
|
||||||
print("</style></head>")
|
print("</style></head>")
|
||||||
print("""<h1 style="color:blue;">ALLE TAGS</h1>""")
|
print("""<h1 style="color:blue;">Tags</h1>""")
|
||||||
file_names= [f for f in os.listdir('posts') if os.path.isfile(os.path.join('posts', f))]
|
file_names= [f for f in os.listdir('posts') if os.path.isfile(os.path.join('posts', f))]
|
||||||
tag_set = []
|
tag_set = []
|
||||||
if tag:
|
if tag:
|
||||||
@@ -27,8 +27,8 @@ if tag:
|
|||||||
data = open(f, "r")
|
data = open(f, "r")
|
||||||
data = json.load(data)
|
data = json.load(data)
|
||||||
if tag in data['tags']:
|
if tag in data['tags']:
|
||||||
print('<div style="background-color: palevioletred; border: 5px solid seagreen; border-radius: 10px; padding: 10px;">')
|
print('<div style="background-color: mintcream; border: 5px solid seagreen; border-radius: 10px; padding: 10px;">')
|
||||||
print(str(data['title']) + '<br>Datum: ' + str(data['prettytime']))
|
print(str(data['title']) + '<br>Datum: ' + str(data['published']))
|
||||||
print('<hr>')
|
print('<hr>')
|
||||||
print(str(data['content']) + '<br><hr>')
|
print(str(data['content']) + '<br><hr>')
|
||||||
for i in data['tags']:
|
for i in data['tags']:
|
||||||
@@ -45,7 +45,6 @@ else:
|
|||||||
print('<a href="tags-show.py?tag=' + str(i) + '">#' + str(i) + '</a><br>')
|
print('<a href="tags-show.py?tag=' + str(i) + '">#' + str(i) + '</a><br>')
|
||||||
print('</div><br>')
|
print('</div><br>')
|
||||||
|
|
||||||
|
|
||||||
print()
|
print()
|
||||||
print('<a href="posts-show.py">Alle Posts!</a><br>')
|
print('<a href="posts-show.py">Alle Posts!</a><br>')
|
||||||
print('<a href="tags-show.py">Alle Tags anzeigen.</a><br>')
|
print('<a href="tags-show.py">Alle Tags anzeigen.</a><br>')
|
||||||
|
Reference in New Issue
Block a user