1
0
Эх сурвалжийг харах

fix image url error of theme demo

wangweimin 3 жил өмнө
parent
commit
37d24996ee

+ 1 - 1
demos/theme.py

@@ -349,7 +349,7 @@ def page():
     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))
                 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``.
         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
 
             The dark theme is modified from ForEvolve's `bootstrap-dark <https://github.com/ForEvolve/bootstrap-dark>`_.