Skip to content

Commit 2d77e26

Browse files
add header text variable
Signed-off-by: Jonathan Irvin <djfoxyslpr@gmail.com>
1 parent a2f41ae commit 2d77e26

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

main.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
# Global variable to track phrases.txt modification time.
1414
last_phrases_mtime = os.path.getmtime("phrases.txt")
1515

16+
HEADER_TEXT = "COMMIT !BINGO"
17+
HEADER_TEXT_COLOR = "#0CB2B3" # Color for header text
18+
1619
FREE_SPACE_TEXT = "FREE MEAT"
1720
FREE_SPACE_TEXT_COLOR = "#FF7f33"
1821

@@ -25,7 +28,7 @@
2528

2629
HOME_BG_COLOR = "#100079" # Background for home page
2730
STREAM_BG_COLOR = "#00FF00" # Background for stream page
28-
HEADER_TEXT_COLOR = "#0CB2B3" # Color for header text
31+
2932

3033
HEADER_FONT_FAMILY = "'Super Carnival', sans-serif"
3134
BOARD_TILE_FONT = "Inter" # Set the desired Google Font for board tiles
@@ -443,7 +446,7 @@ def setup_head(background_color: str):
443446

444447
# Use full width with padding so the header spans edge-to-edge
445448
with ui.element("div").classes("w-full"):
446-
ui.label("COMMIT !BINGO").classes("fit-header text-center").style(f"font-family: {HEADER_FONT_FAMILY}; color: {HEADER_TEXT_COLOR};")
449+
ui.label(f"{HEADER_TEXT}).classes("fit-header text-center").style(f"font-family: {HEADER_FONT_FAMILY}; color: {HEADER_TEXT_COLOR};")
447450

448451
def get_google_font_css(font_name: str, weight: str, style: str, uniquifier: str) -> str:
449452
"""
@@ -628,4 +631,4 @@ def generate_new_board():
628631
app.mount("/static", StaticFiles(directory="static"), name="static")
629632

630633
# Run the NiceGUI app
631-
ui.run(port=8080, title="Commit Bingo", dark=False)
634+
ui.run(port=8080, title=f"{HEADER_TEXT}, dark=False)

0 commit comments

Comments
 (0)