Spaces:
Build error
Build error
| from dash import html, dcc | |
| import dash_mantine_components as dmc | |
| from dash_iconify import DashIconify | |
| def create_header(theme_checked=False): | |
| text_color = "black" if not theme_checked else "white" | |
| return dmc.AppShellHeader( | |
| id="main-header", | |
| bg="transparent", | |
| children=[ | |
| dmc.Group( | |
| justify="space-between", | |
| h="100%", | |
| px="md", | |
| children=[ | |
| dmc.Group( | |
| [ | |
| dmc.Burger(id="sidebar-burger", size="sm"), | |
| dmc.Text("Université Gustave Eiffel", fw=700, size="lg", c=text_color), | |
| ] | |
| ), | |
| dmc.Group( | |
| [ | |
| dmc.Switch( | |
| id="theme-switch", | |
| size="lg", | |
| onLabel=DashIconify(icon="radix-icons:moon", width=20), | |
| offLabel=DashIconify(icon="radix-icons:sun", width=20), | |
| checked=theme_checked, | |
| ), | |
| dmc.Button( | |
| "AI Chatbot", | |
| id="chatbot-button", | |
| leftSection=[DashIconify(icon="mdi:robot-outline")], | |
| variant="outline", | |
| ), | |
| dmc.Button( | |
| "Historique", | |
| id="history-button", | |
| leftSection=[DashIconify(icon="mdi:history")], | |
| variant="outline", | |
| ), | |
| dmc.Button( | |
| "Déconnexion", | |
| id="logout-button", | |
| leftSection=[DashIconify(icon="mdi:logout")], | |
| variant="filled", | |
| color="red", | |
| ), | |
| ] | |
| ), | |
| ], | |
| ), | |
| ] | |
| ) |