diff --git a/src/ez_lan_manager/pages/RulesPage.py b/src/ez_lan_manager/pages/RulesPage.py index 7344bb1..5077c55 100644 --- a/src/ez_lan_manager/pages/RulesPage.py +++ b/src/ez_lan_manager/pages/RulesPage.py @@ -1,4 +1,4 @@ -from rio import Column, Component, event, TextStyle, Text +from rio import Column, Component, event, TextStyle, Text, Revealer from src.ez_lan_manager import ConfigurationService from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox @@ -6,7 +6,7 @@ from src.ez_lan_manager.pages import BasePage RULES: list[str] = [ "Respektvolles Verhalten: Sei höflich und respektvoll gegenüber anderen Gästen und dem Team.", - "Alkohol und Drogen: Konsumiere Alkohol in Maßen und halte dich an die eventuellen Regeln der Veranstaltung bezüglich Alkohol- und Drogenkonsum.", + "Alkohol und Drogen: Konsumiere Alkohol in Maßen und halte dich an die gültige Gesetzeslage.", "Sitzplätze: Respektiere die zugewiesenen Plätze und ändere sie nicht ohne Genehmigung.", "Notausgänge und Sicherheitsvorschriften: Informiere dich über die Notausgänge und beachte die Sicherheitsanweisungen.", "Müllentsorgung: Benutze die vorgesehenen Mülleimer und halte den Veranstaltungsort sauber.", @@ -99,90 +99,94 @@ class RulesPage(Component): margin_bottom=1, align_x=0.5 ), - Text( - text="§ 1 Allgemeine Bestimmungen", - style=TextStyle( + Revealer( + header="§ 1 Allgemeine Bestimmungen", + header_style=TextStyle( fill=self.session.theme.background_color, font_size=1 ), + margin=1, margin_top=2, - margin_bottom=1, - align_x=0.5 + content=Column( + *[Text( + f"{idx + 1}. {rule}", + style=TextStyle( + fill=self.session.theme.background_color, + font_size=0.8 + ), + margin_bottom=0.8, + margin_left=1, + margin_right=1, + wrap=True + ) for idx, rule in enumerate(AGB["§1"])] + ) ), - *[Text( - f"{idx + 1}. {rule}", - style=TextStyle( - fill=self.session.theme.background_color, - font_size=0.8 - ), - margin_bottom=0.8, - margin_left=1, - margin_right=1, - wrap=True - ) for idx, rule in enumerate(AGB["§1"])], - Text( - text="§ 2 Teilnahmevoraussetzungen", - style=TextStyle( + Revealer( + header="§ 2 Teilnahmevoraussetzungen", + header_style=TextStyle( fill=self.session.theme.background_color, font_size=1 ), - margin_top=1, - margin_bottom=1, - align_x=0.5 + margin=1, + margin_top=0, + content=Column( + *[Text( + f"{idx + 1}. {rule}", + style=TextStyle( + fill=self.session.theme.background_color, + font_size=0.8 + ), + margin_bottom=0.8, + margin_left=1, + margin_right=1, + wrap=True + ) for idx, rule in enumerate(AGB["§2"])] + ) ), - *[Text( - f"{idx + 1}. {rule}", - style=TextStyle( - fill=self.session.theme.background_color, - font_size=0.8 - ), - margin_bottom=0.8, - margin_left=1, - margin_right=1, - wrap=True - ) for idx, rule in enumerate(AGB["§2"])], - Text( - text="§ 3 Verhaltensregeln", - style=TextStyle( + Revealer( + header="§ 3 Verhaltensregeln", + header_style=TextStyle( fill=self.session.theme.background_color, font_size=1 ), - margin_top=1, - margin_bottom=1, - align_x=0.5 + margin=1, + margin_top=0, + content=Column( + *[Text( + f"{idx + 1}. {rule}", + style=TextStyle( + fill=self.session.theme.background_color, + font_size=0.8 + ), + margin_bottom=0.8, + margin_left=1, + margin_right=1, + wrap=True + ) for idx, rule in enumerate(AGB["§3"])] + ) ), - *[Text( - f"{idx + 1}. {rule}", - style=TextStyle( - fill=self.session.theme.background_color, - font_size=0.8 - ), - margin_bottom=0.8, - margin_left=1, - margin_right=1, - wrap=True - ) for idx, rule in enumerate(AGB["§3"])], - Text( - text="§ 4 Internetzugang", - style=TextStyle( + Revealer( + header="§ 4 Internetzugang", + header_style=TextStyle( fill=self.session.theme.background_color, font_size=1 ), - margin_top=1, - margin_bottom=1, - align_x=0.5 - ), - *[Text( - f"{idx + 1}. {rule}", - style=TextStyle( - fill=self.session.theme.background_color, - font_size=0.8 - ), - margin_bottom=0.8, - margin_left=1, - margin_right=1, - wrap=True - ) for idx, rule in enumerate(AGB["§4"])], + margin=1, + margin_top=0, + content=Column( + *[Text( + f"{idx + 1}. {rule}", + style=TextStyle( + fill=self.session.theme.background_color, + font_size=0.8 + ), + margin_bottom=0.8, + margin_left=1, + margin_right=1, + wrap=True + ) for idx, rule in enumerate(AGB["§4"])] + ) + ) ) ), align_y=0