-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
136 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import logging | ||
import argparse | ||
from . import main | ||
from .app import app | ||
|
||
|
||
if __name__ == "__main__": | ||
p = argparse.ArgumentParser() | ||
p.add_argument("--debug", action="store_true") | ||
args = p.parse_args() | ||
|
||
if args.debug: | ||
# Dash launches a Flask development server | ||
root_logger = logging.getLogger() | ||
if root_logger.hasHandlers(): | ||
root_logger.handlers.clear() | ||
logging.basicConfig(level=logging.INFO) | ||
app.run(debug=True) | ||
else: | ||
# Otherwise, launch the production server | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
"""Dash frontend for the arcmapper library""" | ||
|
||
import dash | ||
from dash import html | ||
import dash_bootstrap_components as dbc | ||
|
||
|
||
app = dash.Dash("arcmapper", external_stylesheets=[dbc.themes.BOOTSTRAP]) | ||
app.title = "ARCMapper" | ||
|
||
navbar = dbc.Navbar( | ||
dbc.Container( | ||
[ | ||
html.A( | ||
# Use row and col to control vertical alignment of logo / brand | ||
dbc.Row( | ||
[ | ||
dbc.Col( | ||
html.Img(src="assets/ISARIC_logo_wh.png", height="60px") | ||
), | ||
dbc.Col(dbc.NavbarBrand("ARCMapper", className="ms-2")), | ||
], | ||
align="center", | ||
className="g-0", | ||
), | ||
href="https://isaric.org/", | ||
style={"textDecoration": "none"}, | ||
), | ||
dbc.NavbarToggler(id="navbar-toggler", n_clicks=0), | ||
] | ||
), | ||
color="#BA0225", | ||
dark=True, | ||
) | ||
|
||
main_content = dbc.Container([dbc.Row([html.H1("Hello world")])]) | ||
|
||
app.layout = dbc.Container([navbar, main_content]) | ||
server = app.server |