mirror of
https://github.com/tiyn/beaker-blog.git
synced 2026-02-22 12:54:48 +01:00
added imprint, improved css for it
This commit is contained in:
14
src/app.py
14
src/app.py
@@ -7,35 +7,41 @@ import config
|
||||
app = Flask(__name__)
|
||||
|
||||
TITLE = config.TITLE
|
||||
STITLE = config.STITLE
|
||||
STYLE = config.STYLE
|
||||
LANGUAGE = config.LANGUAGE
|
||||
DESCRIPTION = config.DESCRIPTION
|
||||
WEBSITE = config.WEBSITE
|
||||
MAIL = config.MAIL
|
||||
|
||||
@app.errorhandler(404)
|
||||
def page_not_found(e):
|
||||
return render_template("error.html", title=TITLE, errorcode="404", style=STYLE, language=LANGUAGE), 404
|
||||
return render_template("error.html", title=STITLE, errorcode="404", style=STYLE, language=LANGUAGE), 404
|
||||
|
||||
|
||||
@app.route("/")
|
||||
@app.route("/index.html")
|
||||
def index():
|
||||
content = con_gen.gen_index_string()
|
||||
return render_template("index.html", title=TITLE, content_string=content, style=STYLE, language=LANGUAGE)
|
||||
return render_template("index.html", title=STITLE, content_string=content, style=STYLE, language=LANGUAGE)
|
||||
|
||||
@app.route("/imprint")
|
||||
@app.route("/imprint.html")
|
||||
def imprint():
|
||||
return render_template("imprint.html", title=STITLE, mail=MAIL, style=STYLE, language=LANGUAGE)
|
||||
|
||||
@app.route("/archive")
|
||||
@app.route("/archive.html")
|
||||
def archive():
|
||||
content = con_gen.gen_arch_string()
|
||||
return render_template("archive.html", title=TITLE, content_string=content, style=STYLE, language=LANGUAGE)
|
||||
return render_template("archive.html", title=STITLE, content_string=content, style=STYLE, language=LANGUAGE)
|
||||
|
||||
|
||||
@app.route("/entry/<path>")
|
||||
def entry(path):
|
||||
content = con_gen.gen_stand_string(path)
|
||||
if content != "":
|
||||
return render_template("standalone.html", title=TITLE, content_string=content, style=STYLE, language=LANGUAGE)
|
||||
return render_template("standalone.html", title=STITLE, content_string=content, style=STYLE, language=LANGUAGE)
|
||||
abort(404)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user