feat: add tailwindcss
This commit is contained in:
parent
29c82ae597
commit
cdad13788a
@ -2,17 +2,30 @@ import dash
|
||||
from dash import Dash, html, dcc
|
||||
from .pages import home, config
|
||||
|
||||
app = Dash(__name__, use_pages=True)
|
||||
external_scripts = [
|
||||
{'src': 'https://cdn.tailwindcss.com'}
|
||||
]
|
||||
# external_script = ["https://tailwindcss.com/", {"src": "https://cdn.tailwindcss.com"}]
|
||||
|
||||
app = Dash(__name__, use_pages=True, external_scripts=external_scripts)
|
||||
app.scripts.config.serve_locally = 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()
|
||||
]),
|
||||
dcc.Link(
|
||||
html.H1('Plesna', ),
|
||||
href="/",
|
||||
className="text-4xl p-4 text-center grow align-baseline"
|
||||
),
|
||||
dcc.Link("Config",
|
||||
href="/config",
|
||||
className="flex-none hover:bg-gray-300 p-4 align-middle"
|
||||
)
|
||||
],
|
||||
className="bg-gray-100 flex flex-row"
|
||||
),
|
||||
dash.page_container
|
||||
])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user