浏览代码

fix image url error of theme demo

wangweimin 3 年之前
父节点
当前提交
37d24996ee
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1 1
      demos/theme.py
  2. 2 0
      pywebio/platform/utils.py

+ 1 - 1
demos/theme.py

@@ -349,7 +349,7 @@ def page():
     put_table(
     put_table(
         [
         [
             [
             [
-                put_image(f"https://cdn.jsdelivr.net/gh/wang0618/PyWebIO/docs/assets/theme/{name}.png").onclick(
+                put_image(f"https://cdn.jsdelivr.net/gh/wang0618/PyWebIO@dev/docs/assets/theme/{name}.png").onclick(
                     partial(go_app, name=name, new_window=False))
                     partial(go_app, name=name, new_window=False))
                 for name in ALL_THEME if name != theme],
                 for name in ALL_THEME if name != theme],
         ]
         ]

+ 2 - 0
pywebio/platform/utils.py

@@ -327,6 +327,8 @@ def config(*, title=None, description=None, theme=None, js_code=None, js_file=[]
     :param str theme: Application theme. Available themes are: ``dark``, ``sketchy``, ``minty``, ``yeti``.
     :param str theme: Application theme. Available themes are: ``dark``, ``sketchy``, ``minty``, ``yeti``.
         You can also use environment variable ``PYWEBIO_THEME`` to specify the theme (with high priority).
         You can also use environment variable ``PYWEBIO_THEME`` to specify the theme (with high priority).
 
 
+        :demo_host:`Theme preview demo </theme>`
+
         .. collapse:: Open Source Credits
         .. collapse:: Open Source Credits
 
 
             The dark theme is modified from ForEvolve's `bootstrap-dark <https://github.com/ForEvolve/bootstrap-dark>`_.
             The dark theme is modified from ForEvolve's `bootstrap-dark <https://github.com/ForEvolve/bootstrap-dark>`_.