Commit d395bfdc authored by Michał Woźniak's avatar Michał Woźniak
Browse files

stylistic fixes in the load-six-sites menu

parent 956251fb
Pipeline #176 passed with stage
in 0 seconds
......@@ -1727,15 +1727,18 @@ document.addEventListener('DOMContentLoaded', (e)=>{
// first, filter out sites without data
// and sites with less than 100 cases
.reduce((acc, site)=>{
// ignore the ignored sites
if (ignored_sites.includes(site)) {
console.log(`+-- ${site} is specifically ignored; not taking into account`)
// ignore sites for which we have no data yet
} else if (! ('data' in siteData[site]) ) {
console.log(`+-- no cases data for ${site}; not taking into account`)
// ignore sites for which we have no population yet
} else if (! ('population' in siteData[site]) ) {
console.log(`+-- no population data for ${site}; not taking into account`)
} else if (siteData[site].data[siteData[site].data.length - 1].confirmed < 100) {
console.log(`+-- not enough confirmed cases for ${site}; not taking into account`)
} else {
// we only want sites with 100 or more confirmed cases,
// otherwise the data is all over the place and meaningless
} else if (siteData[site].data[siteData[site].data.length - 1].confirmed > 100) {
acc.push(site)
}
return acc
......
......@@ -111,18 +111,17 @@
flex-wrap:wrap;
justify-content:center;
}
#internal-main-menu-container h2 {
#internal-main-menu-container p {
font-size: 100%;
font-variant: all-small-caps;
margin: 0.3em 0.2em;
padding: 0.5em 1em 0.5em 0.2em;
}
#internal-main-menu-container input[type=button] {
margin: 0.3em;
flex-grow: 1;
flex-shrink: 1;
padding-left:2em;
padding-right:2em;
flex-grow:1;
flex-shrink:1;
padding-left:1em;
padding-right:1em;
}
.sources {
font-size: 80%;
......@@ -384,7 +383,7 @@
<div class="sources"><a href="https://github.com/CSSEGISandData/COVID-19">source</a></div>
<div id="main-menu-container">
<div id="internal-main-menu-container">
<h2>Load 6 sites with at least 100 confirmed cases and:</h2>
<p>Load 6 sites with at least 100 confirmed cases and:</p>
<input type="button" id="site-menu-button-rate" value="largest growth rate"/>
<input type="button" id="site-menu-button-percentage" value="highest percentage of population infected"/>
<input type="button" id="site-menu-button-deaths" value="most deaths"/>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment