Skip to content

Commit

Permalink
Update layout
Browse files Browse the repository at this point in the history
  • Loading branch information
lephanthuymai committed Feb 6, 2021
1 parent 35954bd commit b4b9aff
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 19 deletions.
23 changes: 13 additions & 10 deletions src/python/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,24 @@
alt.themes.enable("ggplot2")
app.title = "Covid-19 Data Portal"
dashboard_heading = "Covid-19 Data Portal"
last_updated = "Last Updated: " + data_reader.last_updated.strftime("%m/%d/%Y")
app.layout = dbc.Container(
[
dbc.Row(
dbc.Col(
[
html.Div(
[
html.H1(dashboard_heading),
html.H6(
"Data Last Updated: "
+ data_reader.last_updated.strftime("%m/%d/%Y")
),
]
dashboard_heading,
style={
"font-size": "30pt",
"text-align": "center",
"left": "0%",
"right": "0%",
},
),
className="heading",
)
html.Div(className="space"),
html.Div(last_updated, style={"font-size": "14pt", "right": "0px"}),
],
className="heading",
),
dbc.Row(
[
Expand Down
24 changes: 17 additions & 7 deletions src/python/assets/css/covid-dash.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
}

.heading{
text-align: center;
background-color: black;
color:white
color:white;
place-items: center;
place-content: center;
}

.footer{
Expand All @@ -39,8 +40,17 @@
text-align: center;
}

.body {
overflow: hidden; /* Hide scrollbars */
width: 100%,
height: 100%
}
body {
width: 100%;
height: 100%;
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}

.space{
width:50px
}

body::-webkit-scrollbar {
display: none;
}
4 changes: 2 additions & 2 deletions src/python/components/left_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, datamodel):
id="chart_cases_ranking",
style={
"border-width": "0",
"width": "400px",
"width": "450px",
"height": "800px",
},
)
Expand Down Expand Up @@ -112,7 +112,7 @@ def __create_ranking_bar_chart(self, data, type):
title=alt.TitleParams(
text="Top 30 Countries", subtitle="By " + type + " Cases"
),
width=190,
width=290,
)
.mark_bar()
.encode(
Expand Down

0 comments on commit b4b9aff

Please sign in to comment.