-
-
Notifications
You must be signed in to change notification settings - Fork 473
/
panelitelink.html
18 lines (18 loc) · 1.13 KB
/
panelitelink.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{# Custom template to include a link to Panelite #}
<div class="tocsection">
{% if title and pagename != root_doc and (pagename.startswith("gallery") or pagename.startswith("getting_started") or pagename.startswith("explanation") or pagename.startswith("reference")) %}
<a href="{{ panelite_endpoint + '/lab' + ('' if pagename.endswith('index') else '?path=' + pagename + '.ipynb') }}" target=”_blank”>
<img src="{{ pathto('_static/jupyterlite.svg', 1) }}" alt="launch jupyterlite"></img>
</a>
{% endif %}
{% if title and pagename.startswith("gallery") %}
<a href="{{ gallery_url + '/' + ('' if pagename.endswith('index') else pagename.split('/')[-1]) }}" target=”_blank”>
<img src="{{ pathto('_static/launch_app.svg', 1) }}" alt="launch app"></img>
</a>
{% endif %}
{% if title and (pagename.startswith("gallery") or (pagename.startswith("how_to") and "/examples/" in pagename)) %}
<a href="{{ pyodide_url + '/' + ('index.html' if pagename.endswith('index') else pagename.split('/')[-1]) }}" target=”_blank”>
<img src="{{ pathto('_static/launch_pyodide.svg', 1) }}" alt="launch pyodide"></img>
</a>
{% endif %}
</div>