2024-10-04 19:50:45 -04:00
|
|
|
from contextlib import contextmanager
|
|
|
|
|
from nicegui import ui
|
|
|
|
|
|
2024-10-07 18:14:27 -04:00
|
|
|
#Club Colors
|
|
|
|
|
tnt='rgba(30, 206, 0, 0.25)'
|
|
|
|
|
cubbies='rgba(25, 39, 255, 0.25)'
|
|
|
|
|
sparks='rgba(255, 0, 0, 0.25)'
|
2024-10-09 17:03:32 -04:00
|
|
|
dark_mode = ui.dark_mode(True)
|
2024-10-04 19:50:45 -04:00
|
|
|
|
|
|
|
|
@contextmanager
|
|
|
|
|
def frame(navigation_title: str):
|
|
|
|
|
"""Custom page frame to share the same styling and behavior across all pages"""
|
2024-10-08 17:35:04 -04:00
|
|
|
ui.colors(primary='#023047', secondary='#219ebc', accent='#8ecae6', positive='#ffb703', negative='#fb8500', header="#abb8c3", tnt='#02ba08', cubbies='#3a3ac9', sparks='#ba0202')
|
2024-10-07 18:14:27 -04:00
|
|
|
with ui.header().style('background-color: #abb8c3'):
|
|
|
|
|
ui.image('./assets/awana-clubs.png').classes('w-16')
|
2024-10-07 13:31:17 -04:00
|
|
|
ui.label('Awana Verse Practice').classes('font-bold font-16')
|
2024-10-04 19:50:45 -04:00
|
|
|
ui.space()
|
|
|
|
|
ui.space()
|
|
|
|
|
ui.space()
|
|
|
|
|
ui.space()
|
2024-10-07 13:31:17 -04:00
|
|
|
with ui.row():
|
2024-10-09 17:03:32 -04:00
|
|
|
# ui.switch('Dark Mode').bind_value(dark_mode)
|
2024-10-07 13:31:17 -04:00
|
|
|
ui.link('Admin', '/').classes(replace='text-white')
|
|
|
|
|
ui.link('Dashboard', '/dashboard').classes(replace='text-white')
|
2024-10-04 19:50:45 -04:00
|
|
|
with ui.column().classes('absolute-center items-center'):
|
|
|
|
|
yield
|
2024-10-09 17:03:32 -04:00
|
|
|
|