diff --git a/game.py b/game.py index c8a289b..1a2b64c 100755 --- a/game.py +++ b/game.py @@ -26,7 +26,7 @@ def log_the_request(response): remote_user = "-" else: remote_user = request.remote_user - + if not request.referrer: referrer = "-" else: @@ -68,7 +68,10 @@ def hello(): {'A': str(ab[0]), 'B': str(ab[1])} ) - return render_template('index.html', title=title, separator=separator, content=ablines) + with open("ab.txt", "rbU") as f: + num_lines = sum(1 for _ in f) + + return render_template('index.html', title=title, separator=separator, content=ablines, num_lines=num_lines) def getContent(): lines = [a.strip() for a in open("ab.txt").readlines()] diff --git a/static/css/ab.css b/static/css/ab.css index f25b3c2..6f6d9ba 100644 --- a/static/css/ab.css +++ b/static/css/ab.css @@ -27,7 +27,7 @@ html, body { position: absolute; top: 50%; left: 50%; - transform: translate(-50%, -50%); + transform: translate(-50%, -50%); } .ab { @@ -75,6 +75,15 @@ html, body { align-items: center; } +#footer { + margin-top: 15px; +} + +#questions { + font-size: small; + text-align: center; +} + @media only screen and (max-width:480px) { #content { min-width: 95%; @@ -82,9 +91,9 @@ html, body { position: absolute; top: 5px; left: 50%; - transform: translate(-50%); + transform: translate(-50%); } - + .a { font-size: small; } diff --git a/templates/index.html b/templates/index.html index 2b0dd5b..ca4de51 100644 --- a/templates/index.html +++ b/templates/index.html @@ -16,6 +16,9 @@
B) {{ question['B'] }}
{% endfor %} +