example_c.py 551 B

1234567891011121314151617181920
  1. import theme
  2. from nicegui import APIRouter, ui
  3. router = APIRouter(prefix='/c')
  4. @router.page('/')
  5. def example_page():
  6. with theme.frame('- Example C -'):
  7. with ui.column().classes('items-center'):
  8. ui.label('Example C').classes('text-h4 text-grey-8')
  9. for i in range(1, 4):
  10. ui.link(f'Item {i}', f'/c/items/{i}').classes('text-xl text-grey-8')
  11. @router.page('/items/{id}')
  12. def item(id: str):
  13. with theme.frame(f'- Example C{id} -'):
  14. ui.label(f'Item #{id}').classes('text-h4 text-grey-8')