mirror of
https://github.com/Xevion/thedrank.com.git
synced 2025-12-09 12:09:01 -06:00
viewcounter addition
This commit is contained in:
@@ -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')
|
||||
|
||||
1
app/static/viewcount.dat
Normal file
1
app/static/viewcount.dat
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -1,5 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
{{ viewcount }} idiots have bare witness to my worst creation yet
|
||||
<br>
|
||||
i don't know how to program html
|
||||
<br>
|
||||
Xevion#0001 if you know how tf i can make this meme site real lmao
|
||||
|
||||
Reference in New Issue
Block a user