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", )