EasySci commited on
Commit
8289aee
·
1 Parent(s): 2e5869b

Update app2.py

Browse files
Files changed (1) hide show
  1. app2.py +6 -11
app2.py CHANGED
@@ -20,12 +20,7 @@ main_body_instance = MainBody()
20
  paper_list = [] # Add this line to initialize paper_list as an empty list
21
 
22
 
23
- main_body = [pn.Row(pn.pane.Markdown("# Please select some tags!"),
24
- # pn.Column(text, text2, sizing_mode='stretch_width'),
25
- # pn.Column(text2, text, sizing_mode='stretch_width'),
26
- # sizing_mode='stretch_width',
27
- )
28
- ]
29
 
30
 
31
  # Create buttons for the toggleable sidebar
@@ -33,9 +28,12 @@ button1 = pn.widgets.Button(icon='home', name="Home", icon_size='1.5em', button_
33
  button2 = pn.widgets.Button(icon='file-analytics', name='My papers', icon_size='1.5em', button_type = 'primary', button_style = 'outline', width = 140)
34
  button3 = pn.widgets.Button(icon='settings', icon_size='1.5em', name='Settings', button_type = 'primary', button_style = 'outline', width = 140)
35
 
36
- # Create a column layout for the buttons inside the toggleable sidebar
37
- buttons = pn.Column(button1, button2, button3 , css_classes=['hidden'])
 
38
 
 
 
39
 
40
  # List to store the entered options
41
  loaded_list = TLDR.load_categories()
@@ -104,8 +102,6 @@ filter_list = pn.widgets.MultiChoice(
104
  styles={'background': '#f0f0f0'},
105
  placeholder="Search Topics"
106
  )
107
-
108
-
109
 
110
  # Layout using Template
111
  template = pn.template.FastListTemplate(
@@ -120,6 +116,5 @@ template = pn.template.FastListTemplate(
120
  sidebar_width=150
121
  )
122
 
123
-
124
  # Run the app
125
  template.servable()
 
20
  paper_list = [] # Add this line to initialize paper_list as an empty list
21
 
22
 
23
+ main_body = [pn.Row(pn.pane.Markdown("# Please select some tags!"))]
 
 
 
 
 
24
 
25
 
26
  # Create buttons for the toggleable sidebar
 
28
  button2 = pn.widgets.Button(icon='file-analytics', name='My papers', icon_size='1.5em', button_type = 'primary', button_style = 'outline', width = 140)
29
  button3 = pn.widgets.Button(icon='settings', icon_size='1.5em', name='Settings', button_type = 'primary', button_style = 'outline', width = 140)
30
 
31
+ # Create binary slider buttons for the sidebar
32
+ toggle_button1 = pn.widgets.Toggle(name="Filter 1", on_text="filter1", off_text="filter2", width=140)
33
+ toggle_button2 = pn.widgets.Toggle(name="Filter 2", on_text="filter3", off_text="filter4", width=140)
34
 
35
+ # Create a column layout for the buttons inside the toggleable sidebar
36
+ buttons = pn.Column(button1, button2, button3, toggle_button1, toggle_button2, css_classes=['hidden'])
37
 
38
  # List to store the entered options
39
  loaded_list = TLDR.load_categories()
 
102
  styles={'background': '#f0f0f0'},
103
  placeholder="Search Topics"
104
  )
 
 
105
 
106
  # Layout using Template
107
  template = pn.template.FastListTemplate(
 
116
  sidebar_width=150
117
  )
118
 
 
119
  # Run the app
120
  template.servable()