|
@@ -38,8 +38,7 @@ def subheading(text: str, *, make_menu_entry: bool = True, more_link: Optional[s
|
|
ui.html(f'<div id="{name}"></div>').style('position: relative; top: -90px')
|
|
ui.html(f'<div id="{name}"></div>').style('position: relative; top: -90px')
|
|
with ui.row().classes('gap-2 items-center relative'):
|
|
with ui.row().classes('gap-2 items-center relative'):
|
|
if more_link:
|
|
if more_link:
|
|
- with ui.link(text, f'documentation/{more_link}').classes('text-2xl'):
|
|
|
|
- ui.icon('open_in_new', size='0.75em').classes('mb-1 ml-2')
|
|
|
|
|
|
+ ui.link(text, f'documentation/{more_link}').classes('text-2xl')
|
|
else:
|
|
else:
|
|
ui.label(text).classes('text-2xl')
|
|
ui.label(text).classes('text-2xl')
|
|
with ui.link(target=f'#{name}').classes('absolute').style('transform: translateX(-150%)'):
|
|
with ui.link(target=f'#{name}').classes('absolute').style('transform: translateX(-150%)'):
|
|
@@ -99,7 +98,10 @@ class element_demo:
|
|
with ui.column().classes('w-full mb-8 gap-2'):
|
|
with ui.column().classes('w-full mb-8 gap-2'):
|
|
subheading(title, more_link=more_link)
|
|
subheading(title, more_link=more_link)
|
|
render_docstring(documentation, with_params=more_link is None)
|
|
render_docstring(documentation, with_params=more_link is None)
|
|
- return demo(f)
|
|
|
|
|
|
+ result = demo(f)
|
|
|
|
+ if more_link:
|
|
|
|
+ ui.markdown(f'See [more...](documentation/{more_link})').classes('bold-links arrow-links')
|
|
|
|
+ return result
|
|
|
|
|
|
|
|
|
|
def load_demo(api: Union[type, Callable, str]) -> None:
|
|
def load_demo(api: Union[type, Callable, str]) -> None:
|