Skip to content

Commit

Permalink
Disambiguate voilà frontend via html data attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
timkpaine committed Apr 5, 2024
1 parent d9850e7 commit add721a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion share/jupyter/voila/templates/base/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

</head>

<body data-base-url="{{ base_url }}voila/">
<body data-base-url="{{ base_url }}voila/" data-in-voila>

<noscript>
<div id='noscript'>
Expand Down
2 changes: 1 addition & 1 deletion share/jupyter/voila/templates/classic/index.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
{%- endblock html_head_js_mathjax -%}

{% block body_header %}
<body data-base-url="{{resources.base_url}}voila/">
<body data-base-url="{{resources.base_url}}voila/" data-in-voila>
{{ spinner.html() }}
{{ voila_setup_helper_functions() }}
<div tabindex="-1" id="notebook" class="border-box-sizing">
Expand Down
6 changes: 3 additions & 3 deletions share/jupyter/voila/templates/lab/index.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@
{%- block body_header -%}
<link rel="icon" href="data:;base64,=">
{% if resources.theme == 'dark' or resources.theme == 'JupyterLab Dark' %}
<body class="jp-Notebook theme-dark" data-base-url="{{resources.base_url}}voila/" data-jp-theme-light="false" data-jp-theme-name="JupyterLab Dark">
<body class="jp-Notebook theme-dark" data-base-url="{{resources.base_url}}voila/" data-jp-theme-light="false" data-jp-theme-name="JupyterLab Dark" data-in-voila>
{% elif resources.theme == 'light' or resources.theme == 'JupyterLab Light' %}
<body class="jp-Notebook theme-light" data-base-url="{{resources.base_url}}voila/" data-jp-theme-light="true" data-jp-theme-name="JupyterLab Light">
<body class="jp-Notebook theme-light" data-base-url="{{resources.base_url}}voila/" data-jp-theme-light="true" data-jp-theme-name="JupyterLab Light" data-in-voila>
{% else %}
<body class="jp-Notebook" data-base-url="{{resources.base_url}}voila/" data-jp-theme-name="{{resources.theme}}">
<body class="jp-Notebook" data-base-url="{{resources.base_url}}voila/" data-jp-theme-name="{{resources.theme}}" data-in-voila>
{% endif %}
{{ spinner.html() }}
{{ voila_setup_helper_functions() }}
Expand Down
4 changes: 2 additions & 2 deletions share/jupyter/voila/templates/reveal/index.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@

{% block body_header %}
{% if resources.theme == 'dark' %}
<body class="jp-Notebook" data-base-url="{{resources.base_url}}voila/" data-jp-theme-light="false" data-jp-theme-name="JupyterLab Dark">
<body class="jp-Notebook" data-base-url="{{resources.base_url}}voila/" data-jp-theme-light="false" data-jp-theme-name="JupyterLab Dark" data-in-voila>
{% else %}
<body class="jp-Notebook" data-base-url="{{resources.base_url}}voila/" data-jp-theme-light="true" data-jp-theme-name="JupyterLab Light">
<body class="jp-Notebook" data-base-url="{{resources.base_url}}voila/" data-jp-theme-light="true" data-jp-theme-name="JupyterLab Light" data-in-voila>
{% endif %}
{{ spinner.html() }}
{{ voila_setup_helper_functions() }}
Expand Down

0 comments on commit add721a

Please sign in to comment.