|
@@ -15,18 +15,18 @@ def example(element: Element):
|
|
|
|
|
|
callFrame = inspect.currentframe().f_back.f_back
|
|
callFrame = inspect.currentframe().f_back.f_back
|
|
begin = callFrame.f_lineno
|
|
begin = callFrame.f_lineno
|
|
- with ui.row(classes='flex w-screen'):
|
|
|
|
|
|
+ with ui.row(classes='flex w-full'):
|
|
|
|
|
|
doc = element.__init__.__doc__
|
|
doc = element.__init__.__doc__
|
|
if doc:
|
|
if doc:
|
|
html = docutils.core.publish_parts(doc, writer_name='html')['html_body']
|
|
html = docutils.core.publish_parts(doc, writer_name='html')['html_body']
|
|
- html = html.replace('<p>', '<h3 class="text-2xl mb-3">', 1)
|
|
|
|
|
|
+ html = html.replace('<p>', '<h3>', 1)
|
|
html = html.replace('</p>', '</h3>', 1)
|
|
html = html.replace('</p>', '</h3>', 1)
|
|
- ui.html(html, classes='w-4/12 pr-12')
|
|
|
|
|
|
+ ui.html(html, classes='mr-8 w-4/12')
|
|
else:
|
|
else:
|
|
ui.label(element.__name__, 'h5')
|
|
ui.label(element.__name__, 'h5')
|
|
|
|
|
|
- with ui.card(classes='mt-12 w-1/12'):
|
|
|
|
|
|
+ with ui.card(classes='mt-12 w-2/12'):
|
|
yield
|
|
yield
|
|
callFrame = inspect.currentframe().f_back.f_back
|
|
callFrame = inspect.currentframe().f_back.f_back
|
|
end = callFrame.f_lineno
|
|
end = callFrame.f_lineno
|
|
@@ -37,7 +37,7 @@ def example(element: Element):
|
|
code.insert(1, 'from nicegui import ui')
|
|
code.insert(1, 'from nicegui import ui')
|
|
code.append('```')
|
|
code.append('```')
|
|
code = '\n'.join(code)
|
|
code = '\n'.join(code)
|
|
- ui.markdown(code, classes='mt-12 w-6/12 overflow-auto')
|
|
|
|
|
|
+ ui.markdown(code, classes='mt-12 w-5/12 overflow-auto')
|
|
|
|
|
|
|
|
|
|
with open('README.md', 'r') as file:
|
|
with open('README.md', 'r') as file:
|
|
@@ -47,7 +47,8 @@ with example(ui.timer):
|
|
from datetime import datetime
|
|
from datetime import datetime
|
|
|
|
|
|
clock = ui.label()
|
|
clock = ui.label()
|
|
- ui.timer(interval=0.1, callback=lambda: clock.set_text(datetime.now().strftime("%X")))
|
|
|
|
|
|
+ t = ui.timer(interval=0.1, callback=lambda: clock.set_text(datetime.now().strftime("%X")))
|
|
|
|
+ ui.checkbox('active').bind_value(t.active)
|
|
|
|
|
|
with example(ui.button):
|
|
with example(ui.button):
|
|
|
|
|