theme.py 555 B

123456789101112131415161718
  1. from contextlib import contextmanager
  2. from menu import menu
  3. from nicegui import ui
  4. @contextmanager
  5. def frame(navtitle: str):
  6. '''Custom page frame to share the same styling and behavior across all pages'''
  7. ui.colors(primary='#6E93D6', secondary='#53B689', accent='#111B1E', positive='#53B689')
  8. with ui.header().classes('justify-between text-white'):
  9. ui.label('Modularization Demo').classes('text-bold')
  10. ui.label(navtitle)
  11. with ui.row():
  12. menu()
  13. with ui.row().classes('absolute-center'):
  14. yield