def test_template_theme_parameter(): template = FastGridTemplate(title="Fast", theme="dark") # Not '#3f3f3f' which is for the Vanilla theme doc = template.server_doc() assert doc.theme._json['attrs']['Figure']['background_fill_color']=="#181818" assert isinstance(template._get_theme(), FastGridDarkTheme)
def test_app(): app = FastGridTemplate( title="FastGridTemplate", ) app.main[0:6, 0:6] = pn.pane.Markdown(INFO, sizing_mode="stretch_both") app.main[0:6, 6:12] = pn.pane.HoloViews(_create_hvplot(), sizing_mode="stretch_both") app.main[6:18, 0:3] = _fast_button_card() app.main[6:12, 6:12] = pn.pane.HoloViews(_create_hvplot(), sizing_mode="stretch_both") app.sidebar.extend(_sidebar_items()) return app
def test_app(): app = FastGridTemplate( title="FastGridTemplate w. Layout Persistence", site="Panel", accent_base_color=ACCENT_COLOR, header_background=ACCENT_COLOR, # header_color="#000000", header_accent_base_color="#FFFFFF", row_height=50, prevent_collision=True, # main_layout="", save_layout=True, ) app.main[0:7, 0:6] = pn.pane.Markdown(INFO, sizing_mode="stretch_both") app.main[0:7, 6:12] = pn.pane.HoloViews(_create_hvplot(), sizing_mode="stretch_both") app.main[7:18, 0:6] = _fast_button_card() app.main[7:14, 6:12] = pn.pane.HoloViews(_create_hvplot(), sizing_mode="stretch_both") app.sidebar.extend(_sidebar_items()) return app