EasySci commited on
Commit
370e3f9
·
1 Parent(s): 4458be8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -14
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
- # Combine the title, toggle button, and sidebar
27
- app = pn.Column(
28
- pn.Row(toggle_sidebar),
29
- pn.Row(
30
- pn.Column(title, pn.layout.Spacer(height=10)),
31
- pn.layout.Divider(),
32
- pn.Row(buttons, sizing_mode='stretch_width'),
33
- sizing_mode='stretch_both',
34
- align='center',
35
- ),
36
- sizing_mode='stretch_both',
37
  )
38
 
39
  # Run the app
40
- app.servable()
 
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()