"""Normalize middle-screen templates: centered layout, no redundant button wrappers.""" import re from pathlib import Path ROOT = Path(__file__).resolve().parents[1] MIDDLE_GLOBS = [ "Risk/templates/Risk/Middle_Screen.html", "Ambiguity_New/templates/Ambiguity_New/Middle_Screen1.html", "Ambiguity_New/templates/Ambiguity_New/Middle_Screen2.html", "Ambiguity_New/templates/Ambiguity_New/Quiz_Middle_Screen.html", "Time_Adaptive_CE/templates/Time_Adaptive_CE/Middle_Screen.html", "Time_Adaptive_CE/templates/Time_Adaptive_CE/Middle_Screen_8w.html", "Time_Adaptive_CE_84/templates/Time_Adaptive_CE_84/Middle_Screen.html", "Time_Adaptive_CE_84/templates/Time_Adaptive_CE_84/Middle_Screen_8w.html", "Time_Adaptive_Lot_1/templates/Time_Adaptive_Lot_1/Middle_Screen.html", "Time_Adaptive_Lot_1/templates/Time_Adaptive_Lot_1/Middle_Screen_8w.html", "Time_Adaptive_Lot_1_84/templates/Time_Adaptive_Lot_1_84/Middle_Screen.html", "Time_Adaptive_Lot_1_84/templates/Time_Adaptive_Lot_1_84/Middle_Screen_8w.html", "Time_Adaptive_Lot_2/templates/Time_Adaptive_Lot_2/Middle_Screen.html", "Time_Adaptive_Lot_2/templates/Time_Adaptive_Lot_2/Middle_Screen_8w.html", "Time_Adaptive_Lot_2_84/templates/Time_Adaptive_Lot_2_84/Middle_Screen.html", "Time_Adaptive_Lot_2_84/templates/Time_Adaptive_Lot_2_84/Middle_Screen_8w.html", ] TRANSITION_CSS = """/* Transition / middle / end screens */ .transition-screen { font-family: Arial, Helvetica, sans-serif; font-size: 18px; line-height: 1.45; text-align: center; padding: 4rem 1.5rem; min-height: 50vh; width: 100%; max-width: 100%; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; align-items: center; } .transition-screen p { margin-bottom: 1rem; text-align: center; width: 100%; max-width: 42em; } .transition-screen button, .transition-screen .btn { margin-top: 1rem; } """ RE_BTN_WRAP = re.compile( r"