Hi all,
I’m trying to set up a “multi-app” panel, and I want to leverage the sidebar in the template to navigate between pages. I have something like this:
import panel as pn
class BoundaryConditionCreatorTemplate(pn.template.BootstrapTemplate):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
home = pn.widgets.ButtonIcon(icon="home", name="Home")
triangle = pn.widgets.ButtonIcon(icon="topology-star-ring-3", name="Triangle/JigSaw: Mesh Generation")
spherlab = pn.widgets.ButtonIcon(icon="sphere", name="SpheRlab: CDO Mesh Description")
atmo = pn.widgets.ButtonIcon(icon="sun-high", name="ECHAM6/JSBACH Input Generation")
term = pn.widgets.ButtonIcon(icon="terminal", name="Terminal")
home.js_on_click(code="window.location.href(index.html);'")
self.sidebar.append(home)
self.sidebar.append(triangle)
self.sidebar.append(spherlab)
self.sidebar.append(atmo)
self.sidebar.append(term)
The multiple apps show up nicely when I run panel serve nb1.ipynb nb2.ipynb
:
2024-05-06 09:08:12,604 Bokeh app running at: http://localhost:5006/fesom_mesh_generation
2024-05-06 09:08:12,604 Bokeh app running at: http://localhost:5006/spherlab_cdo_prep
2024-05-06 09:08:12,604 Bokeh app running at: http://localhost:5006/terminal
However, clicking on my home button gives back me an javascript EOF error if I look in the web console. Is there a nice way to do this?
Thanks for any hints!
Paul