|
|
@ -30,6 +30,8 @@ bp = Blueprint(
|
|
|
|
@bp.route("/")
|
|
|
|
@bp.route("/")
|
|
|
|
def blocks():
|
|
|
|
def blocks():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print = request.args.get('print')
|
|
|
|
|
|
|
|
|
|
|
|
color = request.cookies.get("color", "purple")
|
|
|
|
color = request.cookies.get("color", "purple")
|
|
|
|
|
|
|
|
|
|
|
|
# temporary, eventually we will dump contents only when they are updated in git (git hooks + git pull ?)
|
|
|
|
# temporary, eventually we will dump contents only when they are updated in git (git hooks + git pull ?)
|
|
|
@ -38,16 +40,19 @@ def blocks():
|
|
|
|
with open("postit/contents.json", "r") as f:
|
|
|
|
with open("postit/contents.json", "r") as f:
|
|
|
|
contributions = json.load(f)
|
|
|
|
contributions = json.load(f)
|
|
|
|
|
|
|
|
|
|
|
|
return render_template("postit.html", contributions=contributions, color=color)
|
|
|
|
return render_template("postit.html", contributions=contributions, color=color, print=print)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@bp.route("/<slug>")
|
|
|
|
@bp.route("/<slug>")
|
|
|
|
def block(slug=None):
|
|
|
|
def block(slug=None):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print = request.args.get('print', default=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
color = request.cookies.get("color", "purple")
|
|
|
|
color = request.cookies.get("color", "purple")
|
|
|
|
|
|
|
|
|
|
|
|
dump.dump([slug])
|
|
|
|
dump.dump([slug])
|
|
|
|
with open("postit/contents.json", "r") as f:
|
|
|
|
with open("postit/contents.json", "r") as f:
|
|
|
|
contributions = json.load(f)
|
|
|
|
contributions = json.load(f)
|
|
|
|
|
|
|
|
|
|
|
|
return render_template("postit.html", contributions=contributions, color=color)
|
|
|
|
return render_template("postit.html", contributions=contributions, color=color, print=print)
|
|
|
|