diff --git a/app.py b/app.py index dede819..bb29362 100644 --- a/app.py +++ b/app.py @@ -50,6 +50,11 @@ def index(): # Hole den aktuellen Text current_text = EXAMPLE_TEXTS[progress.current_text_index] + # Wenn der Fortschritt noch nicht initialisiert ist (z.B. beim ersten Start), + # dann setze den Textindex auf 0 und den Text + if progress.current_text_index == 0 and progress.current_position == 0: + current_text = EXAMPLE_TEXTS[0] + return render_template('index.html', current_text=current_text, current_position=progress.current_position,