29 lines
879 B
Python
29 lines
879 B
Python
from dash import dcc, html
|
|
|
|
from ..libs.repository.repository import AbstractRepository
|
|
|
|
|
|
def layout_factory(repositories: dict[str, AbstractRepository]):
|
|
def layout(repository_name: str = "", schema_name: str = ""):
|
|
repository = repositories[repository_name]
|
|
return html.Div(
|
|
[
|
|
html.H2(
|
|
[
|
|
dcc.Link(
|
|
f"{repository.name}",
|
|
href=f"/repository/{repository.name}",
|
|
className="hover:underline",
|
|
),
|
|
html.Span(" > "),
|
|
html.Span(
|
|
f"{schema_name}",
|
|
),
|
|
],
|
|
className="text-2xl p-4 py-2",
|
|
),
|
|
]
|
|
)
|
|
|
|
return layout
|