pages.py 390 B

123456789101112
  1. import custom
  2. def create() -> None:
  3. for name in ['A', 'B', 'C', 'D']:
  4. # here we store the custom page builder in a variable and pass the specific contend for every page
  5. page_builder = custom.page(f'/{name.lower()}', navtitle=f'- {name} -')
  6. page_builder(create_content, title=name)
  7. def create_content(title: str) -> None:
  8. custom.headline(f'Page {title}')