Skip to content

Commit

Permalink
Merge pull request #172 from benjeffery/rework
Browse files Browse the repository at this point in the history
Move page switcher to header
  • Loading branch information
benjeffery authored Sep 13, 2024
2 parents b3addbd + fcf63f4 commit 813e359
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
15 changes: 8 additions & 7 deletions tsbrowse/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ def show(page_name):
options=list(pages.PAGES_MAP.keys()),
name="Page",
# sizing_mode="fixed",
button_type="default",
button_style="outline",
orientation="vertical",
button_type="success",
orientation="horizontal",
)
ishow = pn.bind(show, page_name=page_options)
pn.state.location.sync(page_options, {"value": "page"})
Expand All @@ -75,15 +74,17 @@ def show(page_name):
.sidenav#sidebar {
background-color: #15E3AC;
}
.title {
font-size: var(--type-ramp-plus-2-font-size);
}
"""
DEFAULT_PARAMS = {
"site": "QC dashboard",
"header_background": "#0D5160",
"site": "tsbrowse",
}

return pn.template.FastListTemplate(
title=tsm.name,
sidebar=[page_options],
title=tsm.name if len(tsm.name) <= 15 else f"{tsm.name[:5]}...{tsm.name[-5:]}",
header=[page_options],
main=[ishow],
raw_css=[RAW_CSS],
**DEFAULT_PARAMS,
Expand Down
4 changes: 2 additions & 2 deletions tsbrowse/pages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"Edge Explorer": edge_explorer,
"Trees": trees,
"Nodes": nodes,
"Windowed Popgen Statistics": popgen,
"Site Frequency Spectra": frequency_spectra,
"Popgen": popgen,
"SFS": frequency_spectra,
}

0 comments on commit 813e359

Please sign in to comment.