async def main():
    'PyWebIO Output demo\n\n    Demonstrate various output usage supported by PyWebIO.\n    演示PyWebIO输出模块的使用\n    '
    put_markdown(t('# PyWebIO Output demo\n    \n    You can get the source code of this demo in [here](https://github.com/wang0618/PyWebIO/blob/dev/demos/output_usage.py)\n    \n    This demo only introduces part of the functions of the PyWebIO output module. For the complete features, please refer to the [User Guide](https://pywebio.readthedocs.io/zh_CN/latest/guide.html).\n    \n    The output functions are all defined in the `pywebio.output` module and can be imported using `from pywebio.output import *`.\n    \n    ', '# PyWebIO 输出演示\n    \n    在[这里](https://github.com/wang0618/PyWebIO/blob/dev/demos/output_usage.py)可以获取本Demo的源码。\n    \n    本Demo仅提供了PyWebIO输出模块的部分功能的演示，完整特性请参阅[用户指南](https://pywebio.readthedocs.io/zh_CN/latest/guide.html)。\n    \n    PyWebIO的输出函数都定义在 `pywebio.output` 模块中，可以使用 `from pywebio.output import *` 引入。\n\n    ### 基本输出\n    PyWebIO提供了一些便捷函数来输出表格、链接等格式:\n    '), strip_indent=4)
    code_block(t('\n    # Text Output\n    put_text("Hello world!")\n\n    # Table Output\n    put_table([\n        [\'Commodity\', \'Price\'],\n        [\'Apple\', \'5.5\'],\n        [\'Banana\', \'7\'],\n    ])\n    \n    # Markdown Output\n    put_markdown(\'~~Strikethrough~~\')\n    \n    # File Output\n    put_file(\'hello_word.txt\', b\'hello word!\')\n    ', '\n    # 文本输出\n    put_text("Hello world!")\n\n    # 表格输出\n    put_table([\n        [\'商品\', \'价格\'],\n        [\'苹果\', \'5.5\'],\n        [\'香蕉\', \'7\'],\n    ])\n\n    # Markdown输出\n    put_markdown(\'~~删除线~~\')\n\n    # 文件输出\n    put_file(\'hello_word.txt\', b\'hello word!\')\n    '))
    put_markdown(t('For all output functions provided by PyWebIO, please refer to the document.\n    \n    ### Combined Output\n    The output functions whose name starts with put_ can be combined with some output functions as part of the final output:\n\n    You can pass `put_xxx()` calls to `put_table()` as cell content:\n    ', 'PyWebIO提供的全部输出函数请参考PyWebIO文档\n    \n    ### 组合输出\n    \n    函数名以 `put_` 开始的输出函数，可以与一些输出函数组合使用，作为最终输出的一部分。\n\n    比如`put_table()`支持以`put_xxx()`调用作为单元格内容:\n    '), strip_indent=4)
    code_block("\n    put_table([\n        ['Type', 'Content'],\n        ['html', put_html('X<sup>2</sup>')],\n        ['text', '<hr/>'],  # equal to ['text', put_text('<hr/>')]\n        ['buttons', put_buttons(['A', 'B'], onclick=toast)],  \n        ['markdown', put_markdown('`Awesome PyWebIO!`')],\n        ['file', put_file('hello.text', b'hello world')],\n        ['table', put_table([['A', 'B'], ['C', 'D']])]\n    ])\n    ")
    put_markdown(t('Similarly, you can pass `put_xxx()` calls to `popup()` as the popup content:', '类似地，`popup()`也可以将`put_xxx()`调用作为弹窗内容:'), strip_indent=4)
    code_block("\n    popup('Popup title', [\n        put_html('<h3>Popup Content</h3>'),\n        'plain html: <br/>',  # equal to put_text('plain html: <br/>')\n        put_table([['A', 'B'], ['C', 'D']]),\n        put_buttons(['close_popup()'], onclick=lambda _: close_popup())\n    ])\n    ")
    put_markdown(t('For more output functions that accept `put_xxx()` calls as parameters, please refer to corresponding function documentation.', '更多接受`put_xxx()`作为参数的输出函数请参考函数文档。'))
    put_markdown((t('### Callback\n    PyWebIO allows you to output some buttons, and the provided callback function will be executed when the button is clicked.\n    \n    This is an example:%s\n    The call to `put_table()` will not block. When user clicks a button, the corresponding callback function will be invoked:\n    ', '### 事件回调\n    PyWebIO允许你输出一些控件，当控件被点击时执行提供的回调函数，就像编写GUI程序一样。\n    \n    下面是一个例子:%s\n    `put_table()`的调用不会阻塞。当用户点击了某行中的按钮时，PyWebIO会自动调用相应的回调函数:\n    ') % '\n    ```python\n    from functools import partial\n\n    def edit_row(choice, row):\n        put_markdown("> You click`%s` button ar row `%s`" % (choice, row))\n\n    put_table([\n        [\'Idx\', \'Actions\'],\n        [1, put_buttons([\'edit\', \'delete\'], onclick=partial(edit_row, row=1))],\n        [2, put_buttons([\'edit\', \'delete\'], onclick=partial(edit_row, row=2))],\n        [3, put_buttons([\'edit\', \'delete\'], onclick=partial(edit_row, row=3))],\n    ])\n    ```\n    '), strip_indent=4)
    from functools import partial

    @use_scope('table-callback')
    def edit_row(choice, row):
        put_markdown(('> You click `%s` button ar row `%s`' % (choice, row)))
    put_table([['Idx', 'Actions'], [1, put_buttons(['edit', 'delete'], onclick=partial(edit_row, row=1))], [2, put_buttons(['edit', 'delete'], onclick=partial(edit_row, row=2))], [3, put_buttons(['edit', 'delete'], onclick=partial(edit_row, row=3))]])
    set_scope('table-callback')
    put_markdown((t('Of course, PyWebIO also supports outputting individual button:', '当然，PyWebIO还支持单独的按钮控件:') + '\n    ```python\n    def btn_click(btn_val):\n        put_markdown("> You click `%s` button" % btn_val)\n\n    put_buttons([\'A\', \'B\', \'C\'], onclick=btn_click)\n    ```\n    '), strip_indent=4)

    @use_scope('button-callback')
    def btn_click(btn_val):
        put_markdown(('> You click `%s` button' % btn_val))
    put_buttons(['A', 'B', 'C'], onclick=btn_click)
    set_scope('button-callback')
    put_markdown((t('### Output Scope\n    \n    PyWebIO uses the scope model to give more control to the location of content output. The output area of PyWebIO can be divided into different output domains. The output domain is called Scope in PyWebIO.\n\n    The output domain is a container of output content, and each output domain is arranged vertically, and the output domains can also be nested.\n\n    Each output function (function name like `put_xxx()`) will output its content to a scope, the default is "current scope". "current scope" is determined by the runtime context. The output function can also manually specify the scope to output. The scope name is unique within the session.\n    \n    You can use `use_scope()` to open and enter a new output scope, or enter an existing output scope: %s\n    The above code will generate the following Scope layout:\n    ', '### 输出域Scope\n\n    PyWebIO使用Scope模型来对内容输出的位置进行灵活地控制，PyWebIO的内容输出区可以划分出不同的输出域，PyWebIO将输出域称作`Scope`。\n    \n    输出域为输出内容的容器，各个输出域之间上下排列，输出域也可以进行嵌套。\n    \n    每个输出函数（函数名形如 `put_xxx()` ）都会将内容输出到一个Scope，默认为”当前Scope”，”当前Scope”由运行时上下文确定，输出函数也可以手动指定输出到的Scope。Scope名在会话内唯一。\n    \n    可以使用 `use_scope()` 开启并进入一个新的输出域，或进入一个已经存在的输出域: %s\n    以上代码将会产生如下Scope布局:\n    ') % "\n    ```python\n    with use_scope('A'):\n        put_text('Text in scope A')\n    \n        with use_scope('B'):\n            put_text('Text in scope B')\n    \n    with use_scope('C'):\n        put_text('Text in scope C')\n    ```\n    "), strip_indent=4)
    with use_scope('A'):
        put_text('Text in scope A')
        with use_scope('B'):
            put_text('Text in scope B')
    with use_scope('C'):
        put_text('Text in scope C')
    put_html('<style>                                           \n    #pywebio-scope-A {border: 1px solid red;}                    \n    #pywebio-scope-B {border: 1px solid blue;margin:2px}         \n    #pywebio-scope-C {border: 1px solid green;margin-top:2px}    \n    </style><br/>')
    put_markdown(t('The output function (function name like `put_xxx()`) will output the content to the "current scope" by default, and the "current scope" of the runtime context can be set by `use_scope()`.\n    \n    In addition, you can use the `scope` parameter of the output function to specify the destination scope to output:\n    ', '\n    输出函数（函数名形如 `put_xxx()` ）在默认情况下，会将内容输出到”当前Scope”，可以通过 `use_scope()` 设置运行时上下文的”当前Scope”。\n    \n    此外，也可以通过输出函数的 scope 参数指定输出的目的Scope:\n    '), strip_indent=4)
    put_grid([[put_code("put_text('A', scope='A')", 'python'), None, put_buttons([t('Run', '运行')], [(lambda : put_text('A', scope='A'))])], [put_code("put_text('B', scope='B')", 'python'), None, put_buttons([t('Run', '运行')], [(lambda : put_text('B', scope='B'))])], [put_code("put_text('C', scope='C')", 'python'), None, put_buttons([t('Run', '运行')], [(lambda : put_text('C', scope='C'))])]], cell_widths='1fr 10px auto')
    put_markdown((t('The output content can be inserted into any positions of the target scope by using the `position` parameter of the output function.', '输出函数可以使用`position`参数指定内容在Scope中输出的位置') + "\n    ```python\n    put_text(now(), scope='A', position=...)\n    ```\n    "), strip_indent=4)
    import datetime
    put_buttons([(('position=%s' % i), i) for i in [1, 2, 3, (- 1), (- 2), (- 3)]], (lambda i: put_text(datetime.datetime.now(), position=i, scope='A')), small=True)
    put_markdown(t('In addition to `use_scope()`, PyWebIO also provides the following scope control functions:', '除了 `use_scope()` , PyWebIO同样提供了以下scope控制函数： '))
    put_grid([[put_code("clear('B')  # Clear content of Scope B", 'python'), None, put_buttons(['运行'], [(lambda : clear('B'))])], [put_code("remove('C')  # Remove Scope C", 'python'), None, put_buttons(['运行'], [(lambda : remove('C'))])], [put_code("scroll_to('A')  # Scroll the page to position of Scope A", 'python'), None, put_buttons(['运行'], [(lambda : scroll_to('A'))])]], cell_widths='1fr 10px auto')
    put_markdown(t('### Layout\n    \n    In general, using the various output functions introduced above is enough to output what you want, but these outputs are arranged vertically. If you want to make a more complex layout (such as displaying a code block on the left side of the page and an image on the right), you need to use layout functions.\n    \n    The `pywebio.output` module provides 3 layout functions, and you can create complex layouts by combining them:\n    \n     - `put_row()` : Use row layout to output content. The content is arranged horizontally\n     - `put_column()` : Use column layout to output content. The content is arranged vertically\n     - `put_grid()` : Output content using grid layout\n    \n    Here is an example by combining `put_row()` and `put_column()`:\n    ', '### 布局\n    一般情况下，使用上文介绍的各种输出函数足以完成各种内容的展示，但直接调用输出函数产生的输出之间都是竖直排列的，如果想实现更复杂的布局（比如在页 面左侧显示一个代码块，在右侧显示一个图像），就需要借助布局函数。\n\n    `pywebio.output` 模块提供了3个布局函数，通过对他们进行组合可以完成各种复杂的布局:\n    \n     - `put_row()` : 使用行布局输出内容. 内容在水平方向上排列\n     - `put_column()` : 使用列布局输出内容. 内容在竖直方向上排列\n     - `put_grid()` : 使用网格布局输出内容\n\n    比如，通过通过组合 `put_row()` 和 `put_column()` 实现的布局:\n    '), strip_indent=4)
    code_block(("\n    put_row([\n        put_column([\n            put_code('A'),\n            put_row([\n                put_code('B1'), None,  # %s\n                put_code('B2'), None,\n                put_code('B3'),\n            ]),\n            put_code('C'),\n        ]), None,\n        put_code('D'), None,\n        put_code('E')\n    ])\n    " % t('None represents the space between the output', 'None 表示输出之间的空白')))
    put_markdown(t('### Style\n    If you are familiar with CSS styles, you can use the `style()` function to set a custom style for the output.\n\n    You can set the CSS style for a single `put_xxx()` output:\n    ', '### 样式\n    \n    如果你熟悉 CSS样式 ，你还可以使用 `style()` 函数给输出设定自定义样式。\n\n    可以给单个的 `put_xxx()` 输出设定CSS样式，也可以配合组合输出使用:\n    '), strip_indent=4)
    code_block("\n    style(put_text('Red'), 'color: red')\n    \n    put_table([\n        ['A', 'B'],\n        ['C', style(put_text('Red'), 'color: red')],\n    ])\n    ", strip_indent=4)
    put_markdown(t('`style()` also accepts a list of output calls:', '`style()` 也接受列表作为输入:'))
    code_block("\n    style([\n        put_text('Red'),\n        put_markdown('~~del~~')\n    ], 'color: red')\n    \n    put_collapse('title', style([\n        put_text('text'),\n        put_markdown('~~del~~'),\n    ], 'margin-left: 20px'))\n\n    ", strip_indent=4)
    put_markdown(t('----\n    For more information about output of PyWebIO, please visit PyWebIO [User Guide](https://pywebio.readthedocs.io/zh_CN/latest/guide.html) and [output module documentation](https://pywebio.readthedocs.io/zh_CN/latest/output.html).\n    ', '----\n    PyWebIO的输出演示到这里就结束了，更多内容请访问PyWebIO[用户指南](https://pywebio.readthedocs.io/zh_CN/latest/guide.html)和[output模块文档](https://pywebio.readthedocs.io/zh_CN/latest/output.html)。\n    '), lstrip=True)
    (await hold())
PyWebIO Output demo

Demonstrate various output usage supported by PyWebIO.
演示PyWebIO输出模块的使用
async def main():
    'PyWebIO Output demo\n\n    Demonstrate various output usage supported by PyWebIO.\n    演示PyWebIO输出模块的使用\n    '
    put_markdown(t('# PyWebIO Output demo\n    \n    You can get the source code of this demo in [here](https://github.com/wang0618/PyWebIO/blob/dev/demos/output_usage.py)\n    \n    This demo only introduces part of the functions of the PyWebIO output module. For the complete features, please refer to the [User Guide](https://pywebio.readthedocs.io/zh_CN/latest/guide.html).\n    \n    The output functions are all defined in the `pywebio.output` module and can be imported using `from pywebio.output import *`.\n    \n    ', '# PyWebIO 输出演示\n    \n    在[这里](https://github.com/wang0618/PyWebIO/blob/dev/demos/output_usage.py)可以获取本Demo的源码。\n    \n    本Demo仅提供了PyWebIO输出模块的部分功能的演示，完整特性请参阅[用户指南](https://pywebio.readthedocs.io/zh_CN/latest/guide.html)。\n    \n    PyWebIO的输出函数都定义在 `pywebio.output` 模块中，可以使用 `from pywebio.output import *` 引入。\n\n    ### 基本输出\n    PyWebIO提供了一些便捷函数来输出表格、链接等格式:\n    '), strip_indent=4)
    code_block(t('\n    # Text Output\n    put_text("Hello world!")\n\n    # Table Output\n    put_table([\n        [\'Commodity\', \'Price\'],\n        [\'Apple\', \'5.5\'],\n        [\'Banana\', \'7\'],\n    ])\n    \n    # Markdown Output\n    put_markdown(\'~~Strikethrough~~\')\n    \n    # File Output\n    put_file(\'hello_word.txt\', b\'hello word!\')\n    ', '\n    # 文本输出\n    put_text("Hello world!")\n\n    # 表格输出\n    put_table([\n        [\'商品\', \'价格\'],\n        [\'苹果\', \'5.5\'],\n        [\'香蕉\', \'7\'],\n    ])\n\n    # Markdown输出\n    put_markdown(\'~~删除线~~\')\n\n    # 文件输出\n    put_file(\'hello_word.txt\', b\'hello word!\')\n    '))
    put_markdown(t('For all output functions provided by PyWebIO, please refer to the document.\n    \n    ### Combined Output\n    The output functions whose name starts with put_ can be combined with some output functions as part of the final output:\n\n    You can pass `put_xxx()` calls to `put_table()` as cell content:\n    ', 'PyWebIO提供的全部输出函数请参考PyWebIO文档\n    \n    ### 组合输出\n    \n    函数名以 `put_` 开始的输出函数，可以与一些输出函数组合使用，作为最终输出的一部分。\n\n    比如`put_table()`支持以`put_xxx()`调用作为单元格内容:\n    '), strip_indent=4)
    code_block("\n    put_table([\n        ['Type', 'Content'],\n        ['html', put_html('X<sup>2</sup>')],\n        ['text', '<hr/>'],  # equal to ['text', put_text('<hr/>')]\n        ['buttons', put_buttons(['A', 'B'], onclick=toast)],  \n        ['markdown', put_markdown('`Awesome PyWebIO!`')],\n        ['file', put_file('hello.text', b'hello world')],\n        ['table', put_table([['A', 'B'], ['C', 'D']])]\n    ])\n    ")
    put_markdown(t('Similarly, you can pass `put_xxx()` calls to `popup()` as the popup content:', '类似地，`popup()`也可以将`put_xxx()`调用作为弹窗内容:'), strip_indent=4)
    code_block("\n    popup('Popup title', [\n        put_html('<h3>Popup Content</h3>'),\n        'plain html: <br/>',  # equal to put_text('plain html: <br/>')\n        put_table([['A', 'B'], ['C', 'D']]),\n        put_buttons(['close_popup()'], onclick=lambda _: close_popup())\n    ])\n    ")
    put_markdown(t('For more output functions that accept `put_xxx()` calls as parameters, please refer to corresponding function documentation.', '更多接受`put_xxx()`作为参数的输出函数请参考函数文档。'))
    put_markdown((t('### Callback\n    PyWebIO allows you to output some buttons, and the provided callback function will be executed when the button is clicked.\n    \n    This is an example:%s\n    The call to `put_table()` will not block. When user clicks a button, the corresponding callback function will be invoked:\n    ', '### 事件回调\n    PyWebIO允许你输出一些控件，当控件被点击时执行提供的回调函数，就像编写GUI程序一样。\n    \n    下面是一个例子:%s\n    `put_table()`的调用不会阻塞。当用户点击了某行中的按钮时，PyWebIO会自动调用相应的回调函数:\n    ') % '\n    ```python\n    from functools import partial\n\n    def edit_row(choice, row):\n        put_markdown("> You click`%s` button ar row `%s`" % (choice, row))\n\n    put_table([\n        [\'Idx\', \'Actions\'],\n        [1, put_buttons([\'edit\', \'delete\'], onclick=partial(edit_row, row=1))],\n        [2, put_buttons([\'edit\', \'delete\'], onclick=partial(edit_row, row=2))],\n        [3, put_buttons([\'edit\', \'delete\'], onclick=partial(edit_row, row=3))],\n    ])\n    ```\n    '), strip_indent=4)
    from functools import partial

    @use_scope('table-callback')
    def edit_row(choice, row):
        put_markdown(('> You click `%s` button ar row `%s`' % (choice, row)))
    put_table([['Idx', 'Actions'], [1, put_buttons(['edit', 'delete'], onclick=partial(edit_row, row=1))], [2, put_buttons(['edit', 'delete'], onclick=partial(edit_row, row=2))], [3, put_buttons(['edit', 'delete'], onclick=partial(edit_row, row=3))]])
    set_scope('table-callback')
    put_markdown((t('Of course, PyWebIO also supports outputting individual button:', '当然，PyWebIO还支持单独的按钮控件:') + '\n    ```python\n    def btn_click(btn_val):\n        put_markdown("> You click `%s` button" % btn_val)\n\n    put_buttons([\'A\', \'B\', \'C\'], onclick=btn_click)\n    ```\n    '), strip_indent=4)

    @use_scope('button-callback')
    def btn_click(btn_val):
        put_markdown(('> You click `%s` button' % btn_val))
    put_buttons(['A', 'B', 'C'], onclick=btn_click)
    set_scope('button-callback')
    put_markdown((t('### Output Scope\n    \n    PyWebIO uses the scope model to give more control to the location of content output. The output area of PyWebIO can be divided into different output domains. The output domain is called Scope in PyWebIO.\n\n    The output domain is a container of output content, and each output domain is arranged vertically, and the output domains can also be nested.\n\n    Each output function (function name like `put_xxx()`) will output its content to a scope, the default is "current scope". "current scope" is determined by the runtime context. The output function can also manually specify the scope to output. The scope name is unique within the session.\n    \n    You can use `use_scope()` to open and enter a new output scope, or enter an existing output scope: %s\n    The above code will generate the following Scope layout:\n    ', '### 输出域Scope\n\n    PyWebIO使用Scope模型来对内容输出的位置进行灵活地控制，PyWebIO的内容输出区可以划分出不同的输出域，PyWebIO将输出域称作`Scope`。\n    \n    输出域为输出内容的容器，各个输出域之间上下排列，输出域也可以进行嵌套。\n    \n    每个输出函数（函数名形如 `put_xxx()` ）都会将内容输出到一个Scope，默认为”当前Scope”，”当前Scope”由运行时上下文确定，输出函数也可以手动指定输出到的Scope。Scope名在会话内唯一。\n    \n    可以使用 `use_scope()` 开启并进入一个新的输出域，或进入一个已经存在的输出域: %s\n    以上代码将会产生如下Scope布局:\n    ') % "\n    ```python\n    with use_scope('A'):\n        put_text('Text in scope A')\n    \n        with use_scope('B'):\n            put_text('Text in scope B')\n    \n    with use_scope('C'):\n        put_text('Text in scope C')\n    ```\n    "), strip_indent=4)
    with use_scope('A'):
        put_text('Text in scope A')
        with use_scope('B'):
            put_text('Text in scope B')
    with use_scope('C'):
        put_text('Text in scope C')
    put_html('<style>                                           \n    #pywebio-scope-A {border: 1px solid red;}                    \n    #pywebio-scope-B {border: 1px solid blue;margin:2px}         \n    #pywebio-scope-C {border: 1px solid green;margin-top:2px}    \n    </style><br/>')
    put_markdown(t('The output function (function name like `put_xxx()`) will output the content to the "current scope" by default, and the "current scope" of the runtime context can be set by `use_scope()`.\n    \n    In addition, you can use the `scope` parameter of the output function to specify the destination scope to output:\n    ', '\n    输出函数（函数名形如 `put_xxx()` ）在默认情况下，会将内容输出到”当前Scope”，可以通过 `use_scope()` 设置运行时上下文的”当前Scope”。\n    \n    此外，也可以通过输出函数的 scope 参数指定输出的目的Scope:\n    '), strip_indent=4)
    put_grid([[put_code("put_text('A', scope='A')", 'python'), None, put_buttons([t('Run', '运行')], [(lambda : put_text('A', scope='A'))])], [put_code("put_text('B', scope='B')", 'python'), None, put_buttons([t('Run', '运行')], [(lambda : put_text('B', scope='B'))])], [put_code("put_text('C', scope='C')", 'python'), None, put_buttons([t('Run', '运行')], [(lambda : put_text('C', scope='C'))])]], cell_widths='1fr 10px auto')
    put_markdown((t('The output content can be inserted into any positions of the target scope by using the `position` parameter of the output function.', '输出函数可以使用`position`参数指定内容在Scope中输出的位置') + "\n    ```python\n    put_text(now(), scope='A', position=...)\n    ```\n    "), strip_indent=4)
    import datetime
    put_buttons([(('position=%s' % i), i) for i in [1, 2, 3, (- 1), (- 2), (- 3)]], (lambda i: put_text(datetime.datetime.now(), position=i, scope='A')), small=True)
    put_markdown(t('In addition to `use_scope()`, PyWebIO also provides the following scope control functions:', '除了 `use_scope()` , PyWebIO同样提供了以下scope控制函数： '))
    put_grid([[put_code("clear('B')  # Clear content of Scope B", 'python'), None, put_buttons(['运行'], [(lambda : clear('B'))])], [put_code("remove('C')  # Remove Scope C", 'python'), None, put_buttons(['运行'], [(lambda : remove('C'))])], [put_code("scroll_to('A')  # Scroll the page to position of Scope A", 'python'), None, put_buttons(['运行'], [(lambda : scroll_to('A'))])]], cell_widths='1fr 10px auto')
    put_markdown(t('### Layout\n    \n    In general, using the various output functions introduced above is enough to output what you want, but these outputs are arranged vertically. If you want to make a more complex layout (such as displaying a code block on the left side of the page and an image on the right), you need to use layout functions.\n    \n    The `pywebio.output` module provides 3 layout functions, and you can create complex layouts by combining them:\n    \n     - `put_row()` : Use row layout to output content. The content is arranged horizontally\n     - `put_column()` : Use column layout to output content. The content is arranged vertically\n     - `put_grid()` : Output content using grid layout\n    \n    Here is an example by combining `put_row()` and `put_column()`:\n    ', '### 布局\n    一般情况下，使用上文介绍的各种输出函数足以完成各种内容的展示，但直接调用输出函数产生的输出之间都是竖直排列的，如果想实现更复杂的布局（比如在页 面左侧显示一个代码块，在右侧显示一个图像），就需要借助布局函数。\n\n    `pywebio.output` 模块提供了3个布局函数，通过对他们进行组合可以完成各种复杂的布局:\n    \n     - `put_row()` : 使用行布局输出内容. 内容在水平方向上排列\n     - `put_column()` : 使用列布局输出内容. 内容在竖直方向上排列\n     - `put_grid()` : 使用网格布局输出内容\n\n    比如，通过通过组合 `put_row()` 和 `put_column()` 实现的布局:\n    '), strip_indent=4)
    code_block(("\n    put_row([\n        put_column([\n            put_code('A'),\n            put_row([\n                put_code('B1'), None,  # %s\n                put_code('B2'), None,\n                put_code('B3'),\n            ]),\n            put_code('C'),\n        ]), None,\n        put_code('D'), None,\n        put_code('E')\n    ])\n    " % t('None represents the space between the output', 'None 表示输出之间的空白')))
    put_markdown(t('### Style\n    If you are familiar with CSS styles, you can use the `style()` function to set a custom style for the output.\n\n    You can set the CSS style for a single `put_xxx()` output:\n    ', '### 样式\n    \n    如果你熟悉 CSS样式 ，你还可以使用 `style()` 函数给输出设定自定义样式。\n\n    可以给单个的 `put_xxx()` 输出设定CSS样式，也可以配合组合输出使用:\n    '), strip_indent=4)
    code_block("\n    style(put_text('Red'), 'color: red')\n    \n    put_table([\n        ['A', 'B'],\n        ['C', style(put_text('Red'), 'color: red')],\n    ])\n    ", strip_indent=4)
    put_markdown(t('`style()` also accepts a list of output calls:', '`style()` 也接受列表作为输入:'))
    code_block("\n    style([\n        put_text('Red'),\n        put_markdown('~~del~~')\n    ], 'color: red')\n    \n    put_collapse('title', style([\n        put_text('text'),\n        put_markdown('~~del~~'),\n    ], 'margin-left: 20px'))\n\n    ", strip_indent=4)
    put_markdown(t('----\n    For more information about output of PyWebIO, please visit PyWebIO [User Guide](https://pywebio.readthedocs.io/zh_CN/latest/guide.html) and [output module documentation](https://pywebio.readthedocs.io/zh_CN/latest/output.html).\n    ', '----\n    PyWebIO的输出演示到这里就结束了，更多内容请访问PyWebIO[用户指南](https://pywebio.readthedocs.io/zh_CN/latest/guide.html)和[output模块文档](https://pywebio.readthedocs.io/zh_CN/latest/output.html)。\n    '), lstrip=True)
    (await hold())