From dbd8d8787da183df42899e04052a01dadd35ddb9 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Thu, 7 Nov 2024 09:39:46 -0500 Subject: [PATCH] docs(index): Fix sine example and use layout_columns --- index.qmd | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/index.qmd b/index.qmd index 90ed04c..934a17d 100644 --- a/index.qmd +++ b/index.qmd @@ -20,14 +20,12 @@ import matplotlib.pyplot as plt app_ui = ui.page_fluid( ui.layout_sidebar( - ui.panel_sidebar( + ui.sidebar( ui.input_slider("period", "Period", 0.5, 4, 1, step=0.5), ui.input_slider("amplitude", "Amplitude", 0, 2, 1, step=0.25), ui.input_slider("shift", "Phase shift", 0, 2, 0, step=0.1), ), - ui.panel_main( - ui.output_plot("plot"), - ), + ui.output_plot("plot"), ), ) @@ -130,13 +128,9 @@ from shiny import App, render, ui, Inputs, Outputs, Session from utils import square app_ui = ui.page_fluid( - ui.row( - ui.column(6, - ui.input_slider("n", "Make a Shiny square:", min=0, max=6, value=2) - ), - ui.column(6, - ui.output_ui("images"), - ) + ui.layout_columns( + ui.input_slider("n", "Make a Shiny square:", min=0, max=6, value=2), + ui.output_ui("images"), ) )