Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,5 @@
|
|
| 1 |
import panel as pn
|
| 2 |
|
| 3 |
-
# Create a Panel app with centered title
|
| 4 |
-
title = pn.pane.HTML("<h1 style='text-align: center;'>My Panel App</h1>", width=300)
|
| 5 |
|
| 6 |
# Create a toggleable sidebar with three horizontal lines icon
|
| 7 |
toggle_sidebar = pn.widgets.Button(name='☰', button_type='primary', width=30, height=30)
|
|
@@ -23,18 +21,15 @@ button3 = pn.widgets.Button(name='Button 3')
|
|
| 23 |
# Create a column layout for the buttons inside the toggleable sidebar
|
| 24 |
buttons = pn.Column(button1, button2, button3, sizing_mode='stretch_height', background='#f6f6f6', css_classes=['hidden'])
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
align='center',
|
| 35 |
-
),
|
| 36 |
-
sizing_mode='stretch_both',
|
| 37 |
)
|
| 38 |
|
| 39 |
# Run the app
|
| 40 |
-
|
|
|
|
| 1 |
import panel as pn
|
| 2 |
|
|
|
|
|
|
|
| 3 |
|
| 4 |
# Create a toggleable sidebar with three horizontal lines icon
|
| 5 |
toggle_sidebar = pn.widgets.Button(name='☰', button_type='primary', width=30, height=30)
|
|
|
|
| 21 |
# Create a column layout for the buttons inside the toggleable sidebar
|
| 22 |
buttons = pn.Column(button1, button2, button3, sizing_mode='stretch_height', background='#f6f6f6', css_classes=['hidden'])
|
| 23 |
|
| 24 |
+
|
| 25 |
+
# Layout using Template
|
| 26 |
+
template = pn.template.FastListTemplate(
|
| 27 |
+
title='Interactive DataFrame Dashboards with hvplot .interactive',
|
| 28 |
+
sidebar=['Manufacturers'],
|
| 29 |
+
main=pn.Column(),
|
| 30 |
+
accent_base_color="#88d8b0",
|
| 31 |
+
header_background="#88d8b0",
|
|
|
|
|
|
|
|
|
|
| 32 |
)
|
| 33 |
|
| 34 |
# Run the app
|
| 35 |
+
template.servable()
|