diff --git a/app/routes.py b/app/routes.py index d1ce119..150183b 100644 --- a/app/routes.py +++ b/app/routes.py @@ -3,9 +3,16 @@ from flask import render_template import os import sys +i = int(open(os.path.join('app', 'static', 'viewcount.dat'), 'r').read()) +def getIncrement(n=1): + global i + i += n + open(os.path.join, 'w').write(str(i)) + return i + @app.route('/') def index(): - return render_template('index.html') + return render_template('index.html', viewcount=getIncrement()) @app.route('/keybase.txt') @app.route('/.well-known/keybase.txt') diff --git a/app/static/viewcount.dat b/app/static/viewcount.dat new file mode 100644 index 0000000..c227083 --- /dev/null +++ b/app/static/viewcount.dat @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/app/templates/index.html b/app/templates/index.html index 2ce633a..73f9855 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -1,5 +1,7 @@ + {{ viewcount }} idiots have bare witness to my worst creation yet +
i don't know how to program html
Xevion#0001 if you know how tf i can make this meme site real lmao