Spaces:
Running
Running
Update app2.py
Browse files
app2.py
CHANGED
|
@@ -25,8 +25,8 @@ paper_list = [] # Add this line to initialize paper_list as an empty list
|
|
| 25 |
main_body = [pn.pane.LaTeX("Please select some tags!", styles={'font-size': '20pt'})]
|
| 26 |
|
| 27 |
# Create buttons for the toggleable sidebar
|
| 28 |
-
button1 = pn.widgets.Button(name="π Home", button_type='
|
| 29 |
-
button2 = pn.widgets.Button(name='π My papers', button_type='
|
| 30 |
button3 = pn.widgets.Toggle(name='βοΈ Settings', button_type='default', button_style='outline', width=140, value=False)
|
| 31 |
|
| 32 |
# Custom RadioButtonGroup widget
|
|
@@ -57,6 +57,12 @@ buttons = pn.Column(
|
|
| 57 |
def toggle_settings(event):
|
| 58 |
buttons[-1].visible = event.new
|
| 59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
button3.param.watch(toggle_settings, 'value')
|
| 61 |
|
| 62 |
# List to store the entered options
|
|
|
|
| 25 |
main_body = [pn.pane.LaTeX("Please select some tags!", styles={'font-size': '20pt'})]
|
| 26 |
|
| 27 |
# Create buttons for the toggleable sidebar
|
| 28 |
+
button1 = pn.widgets.Button(name="π Home", button_type='default', button_style='outline', width=140)
|
| 29 |
+
button2 = pn.widgets.Button(name='π My papers', button_type='default', button_style='outline', width=140)
|
| 30 |
button3 = pn.widgets.Toggle(name='βοΈ Settings', button_type='default', button_style='outline', width=140, value=False)
|
| 31 |
|
| 32 |
# Custom RadioButtonGroup widget
|
|
|
|
| 57 |
def toggle_settings(event):
|
| 58 |
buttons[-1].visible = event.new
|
| 59 |
|
| 60 |
+
# Set the icon of the "Settings" button based on its value
|
| 61 |
+
if event.new:
|
| 62 |
+
button3.icon = 'β
' # Checkmark icon
|
| 63 |
+
else:
|
| 64 |
+
button3.icon = 'β' # "X" icon
|
| 65 |
+
|
| 66 |
button3.param.watch(toggle_settings, 'value')
|
| 67 |
|
| 68 |
# List to store the entered options
|