|
9 | 9 | from power_grid_model_ds._core.visualizer.layout.header_legenda import LEGENDA_ELEMENTS, LEGENDA_STYLE |
10 | 10 | from power_grid_model_ds._core.visualizer.layout.header_search import SEARCH_ELEMENTS |
11 | 11 |
|
12 | | -_CONTENT_COLUMN_STYLE = { |
| 12 | +_LEFT_COLUMN_HTML = dbc.Col( |
| 13 | + [ |
| 14 | + dbc.Button("Legend", id="btn-legend", className="me-2 btn-outline-primary"), |
| 15 | + dbc.Button("Search", id="btn-search", className="me-2 btn-outline-primary"), |
| 16 | + dbc.Button("Config", id="btn-config", className="me-2 btn-outline-primary"), |
| 17 | + ], |
| 18 | + id="header-left-col", |
| 19 | + width=5, |
| 20 | + style={ |
| 21 | + "display": "flex", |
| 22 | + "align-items": "center", |
| 23 | + "justify-content": "center", |
| 24 | + "border-right": "1px solid white", |
| 25 | + }, |
| 26 | +) |
| 27 | + |
| 28 | + |
| 29 | +_RIGHT_COLUMN_STYLE = { |
13 | 30 | "display": "flex", |
14 | 31 | "align-items": "center", |
15 | 32 | "width": "100%", |
16 | 33 | } |
17 | 34 |
|
18 | 35 |
|
19 | | -CONFIG_DIV = html.Div(CONFIG_ELEMENTS, style=_CONTENT_COLUMN_STYLE | {"justify-content": "space-between"}) |
20 | | -SEARCH_DIV = html.Div(SEARCH_ELEMENTS, style=_CONTENT_COLUMN_STYLE | {"justify-content": "center"}) |
21 | | -LEGENDA_DIV = html.Div(LEGENDA_ELEMENTS, style=_CONTENT_COLUMN_STYLE | LEGENDA_STYLE) |
| 36 | +CONFIG_DIV = html.Div(CONFIG_ELEMENTS, style=_RIGHT_COLUMN_STYLE | {"justify-content": "space-between"}) |
| 37 | +SEARCH_DIV = html.Div(SEARCH_ELEMENTS, style=_RIGHT_COLUMN_STYLE | {"justify-content": "center"}) |
| 38 | +LEGENDA_DIV = html.Div(LEGENDA_ELEMENTS, style=_RIGHT_COLUMN_STYLE | LEGENDA_STYLE) |
22 | 39 |
|
| 40 | +_RIGHT_COLUMN_HTML = dbc.Col( |
| 41 | + [LEGENDA_DIV, SEARCH_DIV, CONFIG_DIV], |
| 42 | + id="header-right-col", |
| 43 | + width=7, |
| 44 | +) |
23 | 45 |
|
24 | 46 | HEADER_HTML = dbc.Row( |
25 | 47 | [ |
26 | | - dbc.Col( |
27 | | - [ |
28 | | - dbc.Button("Legend", id="btn-legend", color="primary", className="me-2"), |
29 | | - dbc.Button("Search", id="btn-search", color="secondary", className="me-2"), |
30 | | - dbc.Button("Config", id="btn-config", color="success", className="me-2"), |
31 | | - ], |
32 | | - width=5, |
33 | | - style={ |
34 | | - "display": "flex", |
35 | | - "align-items": "center", |
36 | | - "justify-content": "center", |
37 | | - "border-right": "1px solid white", |
38 | | - }, |
39 | | - ), |
40 | | - dbc.Col( |
41 | | - [LEGENDA_DIV, SEARCH_DIV, CONFIG_DIV], |
42 | | - id="right-col-content", |
43 | | - width=7, |
44 | | - style={ |
45 | | - "display": "flex", |
46 | | - "align-items": "center", |
47 | | - "justify-content": "space-between", |
48 | | - # "width": "100%", |
49 | | - }, |
50 | | - ), |
| 48 | + _LEFT_COLUMN_HTML, |
| 49 | + _RIGHT_COLUMN_HTML, |
51 | 50 | ], |
52 | 51 | style={ |
53 | 52 | "background-color": "#343a40", |
|
0 commit comments