Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disambiguate voilà frontend via html data attributes #1457

Merged
merged 1 commit into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-voila="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-voila="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-voila="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-voila="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-voila="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-voila="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-voila="voila">
{% endif %}
{{ spinner.html() }}
{{ voila_setup_helper_functions() }}
Expand Down
Loading