import dash
from dash import Dash, html, dcc
from .pages import home, config
app = Dash(__name__, use_pages=True)
dash.register_page(home.__name__, path='/', layout=home.layout)
dash.register_page(config.__name__, path='/config', layout=config.layout)
app.layout = html.Div([
html.H1('Plesna'),
html.Div([
html.Div(
dcc.Link(f"{page['name']} - {page['path']}", href=page["relative_path"])
) for page in dash.page_registry.values()
]),
dash.page_container
])
if __name__ == '__main__':
app.run(debug=True)