diff --git a/MANIFEST.in b/MANIFEST.in index 2b323f506b..30674bfe2c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -8,6 +8,7 @@ include panel/index.ts include panel/layout/*.html include panel/models/*.ts include panel/models/vtk/*.ts +include panel/_templates/*.css include panel/_templates/*.js include panel/_templates/*.html include panel/tests/test_data/*.png diff --git a/panel/_templates/jupyter.css b/panel/_templates/jupyter.css new file mode 100644 index 0000000000..61e5e21014 --- /dev/null +++ b/panel/_templates/jupyter.css @@ -0,0 +1,5 @@ +.bk-root, .bk-root .bk:before, .bk-root .bk:after { + font-family: var(--jp-ui-font-size1); + font-size: var(--jp-ui-font-size1); + color: var(--jp-ui-font-color1); +} diff --git a/panel/io/notebook.py b/panel/io/notebook.py index 5bbdd57f92..850f7576fc 100644 --- a/panel/io/notebook.py +++ b/panel/io/notebook.py @@ -36,7 +36,7 @@ from ..compiler import require_components from .embed import embed_state from .model import add_to_doc, diff -from .resources import Bundle, Resources, _env, bundle_resources +from .resources import PANEL_DIR, Bundle, Resources, _env, bundle_resources from .server import _server_url, _origin_url, get_server from .state import state @@ -260,8 +260,10 @@ def load_notebook(inline=True, load_timeout=5000): bokeh.io.notebook.curstate().output_notebook() # Publish comm manager + CSS = (PANEL_DIR / '_templates' / 'jupyter.css').read_text() JS = '\n'.join([PYVIZ_PROXY, _JupyterCommManager.js_manager, nb_mime_js]) publish_display_data(data={LOAD_MIME: JS, 'application/javascript': JS}) + publish_display_data(data={'text/html': f''}) def show_server(panel, notebook_url, port):