use new dir structure for /people

This commit is contained in:
2020-07-28 01:48:52 +02:00
parent 5ead5fb292
commit 7e86039e87
2 changed files with 4 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ SECTIONS_DIR = "sections/"
NEWS_DIR = "news/" NEWS_DIR = "news/"
PICTURES_DIR = "pictures/" PICTURES_DIR = "pictures/"
MAIN_LINKS_DIR = "mainLinks/" MAIN_LINKS_DIR = "mainLinks/"
PEOPLE_DIR = "people/"
CACHE_FILE = "cache.json" CACHE_FILE = "cache.json"
# json config keys # json config keys
@@ -156,8 +157,8 @@ def impressum():
@app.route("/people") @app.route("/people")
def people(): def people():
return flask.render_template("people.html", conf=app.config, peopleDict = readJsonDir(os.path.join(app.config["CONTENT_DIR"], PEOPLE_DIR))
people=readJsonDir("people/")) return flask.render_template("people.html", conf=app.config, people=peopleDict)
@app.route("/content/") @app.route("/content/")
def content(): def content():

View File

@@ -22,7 +22,7 @@
</div> </div>
<div class="col image-min-dimensions"> <div class="col image-min-dimensions">
<img class="img-responsive w-100 image-max-dimensions" <img class="img-responsive w-100 image-max-dimensions"
src="/pictures/{{ p['image'] }}"></img> src="{{ p['image'] }}"></img>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}