File size: 1,348 Bytes
a65b02c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | from dash import dcc, html
def build_header(tool_title, links):
return html.Header(
html.Div([
html.A(
html.Img(
src="/assets/gov-fda-new-white.svg",
alt="U.S. Food and Drug Administration",
className="fda-logo",
),
href="/",
className="site-brand",
),
html.Span(tool_title, className="site-tool-title"),
html.Nav(
[
dcc.Link(label, href=path)
for label, path in links
],
className="site-nav",
**{"aria-label": "Main navigation"},
),
], className="site-container site-header-inner"),
className="site-header",
)
def build_footer(text, links=()):
return html.Footer(
html.Div(
[
html.Small(text),
html.Nav(
[
dcc.Link(label, href=path)
for label, path in links
],
**{"aria-label": "Footer navigation"},
) if links else None,
],
className="site-container site-footer-inner",
),
className="site-footer",
) |