Skip to content

Commit 882f5d8

Browse files
committed
Add doc button
1 parent 0aeaaa8 commit 882f5d8

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

panel/app.py

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
# panel app
1818
pn.extension("tabulator")
19+
pn.extension("floatpanel")
1920

2021
pn.config.sizing_mode = "stretch_width"
2122
pn.config.throttled = True
@@ -34,6 +35,9 @@
3435
accent=blue_color,
3536
shadow=False,
3637
main_layout=None,
38+
theme_toggle=False,
39+
corner_radius=3,
40+
# save_layout=True,
3741
)
3842

3943

@@ -448,7 +452,7 @@ def csv_data(
448452
icon="info-circle",
449453
icon_size=icon_size,
450454
button_type="light",
451-
name="More info",
455+
name="About",
452456
width=150,
453457
align="center",
454458
)
@@ -469,9 +473,37 @@ def csv_data(
469473
logout_button = pn.widgets.Button(name="Log out", width=100)
470474
logout_button.js_on_click(code="""window.location.href = './logout'""")
471475

476+
docs_button = pn.widgets.Button(
477+
icon="notes",
478+
icon_size=icon_size,
479+
button_type="light",
480+
name="Docs",
481+
width=150,
482+
align="center",
483+
)
484+
docs = pn.Column(height=0, width=0)
485+
486+
487+
def callback_docs(event):
488+
docs[:] = [
489+
pn.layout.FloatPanel(
490+
"This is some documentation",
491+
name="SimDec documentation",
492+
theme="info",
493+
contained=False,
494+
position="center",
495+
)
496+
]
497+
498+
499+
docs_button.on_click(callback_docs)
500+
501+
472502
header_area = pn.Row(
473503
pn.HSpacer(),
474504
download_file_button,
505+
docs,
506+
docs_button,
475507
info_button,
476508
issue_button,
477509
# logout_button,

0 commit comments

Comments
 (0)