From 6c3e89dc13cdb59982cbfad52ce06eb66b7b7b0f Mon Sep 17 00:00:00 2001 From: gpkvt Date: Mon, 5 Jun 2023 13:12:05 +0200 Subject: [PATCH] Improved help options --- config.ini | 1 + game.py | 3 ++- templates/index.html | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config.ini b/config.ini index 11f1587..397f8c6 100644 --- a/config.ini +++ b/config.ini @@ -18,6 +18,7 @@ help_1 = Wähle die Antworten durch Klicken oder mit der Tastatur (a/b) aus. Sob help_2 = Möchtest du nicht alle Fragen beantworten, klicke einfach auf die Schaltfläche "Weiter" unten rechts (das klappt auch, während der Countdown läuft). help_3 = Klicke/tippe außerhalb dieses Fensters oder bewege die Maus, um fortzufahren. help_4 = Diese Webseite zeichnet keine Daten auf und verwendet keine Cookies. +help_5 = separator = oder questions_prefix = Es gibt derzeit questions_suffix = Fragen. diff --git a/game.py b/game.py index 27b1017..0b76dd5 100755 --- a/game.py +++ b/game.py @@ -96,6 +96,7 @@ def hello(): help2 = config.get('i18n', 'help_2') help3 = config.get('i18n', 'help_3') help4 = config.get('i18n', 'help_4') + help5 = config.get('i18n', 'help_5') url = config.get('main', 'base_url') theme = config.get('main', 'theme') animations = config.get('main', 'animations') @@ -120,7 +121,7 @@ def hello(): with open("ab.txt", "r") as f: num_lines = sum(1 for _ in f) - return render_template('index.html', title=title, separator=separator, content=ablines, num_lines=num_lines, epoch=epoch, mailto=mail, more=more, questions_prefix=questions_prefix, questions_suffix=questions_suffix, send_questions=send_questions, lang=lang, url=url, desc=desc, theme=theme, mailtext=mailtext, help=help, help_1=help1, help_2=help2, help_3=help3, help_4=help4, animations=animations) + return render_template('index.html', title=title, separator=separator, content=ablines, num_lines=num_lines, epoch=epoch, mailto=mail, more=more, questions_prefix=questions_prefix, questions_suffix=questions_suffix, send_questions=send_questions, lang=lang, url=url, desc=desc, theme=theme, mailtext=mailtext, help=help, help_1=help1, help_2=help2, help_3=help3, help_4=help4, help_5=help5, animations=animations) def getContent(): lines = [a.strip() for a in open("ab.txt", "r").readlines()] diff --git a/templates/index.html b/templates/index.html index 985e670..1901185 100644 --- a/templates/index.html +++ b/templates/index.html @@ -31,6 +31,9 @@ {%- if help_4 %}

{{ help_4 }}

{%- endif %} + {%- if help_5 %} +

{{ help_5 }}

+ {%- endif %}