diff --git a/lib/iob.js b/lib/iob.js index b4800f133..8eb4a109e 100644 --- a/lib/iob.js +++ b/lib/iob.js @@ -2,8 +2,6 @@ function calcTotal(treatments, profile, time) { - console.info("trying to calc"); - var iob = 0 , activity = 0; diff --git a/static/css/drawer.css b/static/css/drawer.css index 035340ab6..1a3881825 100644 --- a/static/css/drawer.css +++ b/static/css/drawer.css @@ -176,6 +176,7 @@ h1, legend, vertical-align: middle; position: absolute; right: 0; + z-index: 500; } #buttonbar a, diff --git a/static/css/main.css b/static/css/main.css index 020fbd4a7..83004ec51 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -12,21 +12,8 @@ body { font-family: 'Open Sans', Helvetica, Arial, sans-serif; fill: #fff; background: #000; - color: #808080; -} - - -/* BEGIN: Dolphin/Stock Android Browser Fix */ -@media (max-width: 400px) { - .bgStatus { - width: 100% !important; - } -} -#chartContainer { - top: 225px; /*(toolbar height + status height)*/ + color: #bdbdbd; } -/* END: Dolphin/Stock Android Browser Fix */ - .container { bottom: 0; @@ -49,78 +36,74 @@ body { .bgStatus { float: right; - font-size: 750%; - margin-right: 25px; text-align: center; white-space: nowrap; } -.bgStatus .currentBG { - text-decoration: line-through; + +.bgButton.urgent { + color: red; } -.bgStatus .currentBG.error-code { - font-size: 80%; +.bgButton.warning { + color: yellow; } -.bgStatus .currentBG.bg-limit { - font-size: 80%; +.bgButton.inrange { + color: #4cff00; } -.bgStatus .currentDetails { - font-size: 25%; - position: relative; - top: -10px; +.bgStatus .currentBG { + font-size: 120px; + line-height: 100px; + text-decoration: line-through; + vertical-align: middle; } -.currentDetails > span { - border-radius: 5px; - border: 2px solid #bdbdbd; - font-size: 80%; +.bgStatus .currentDirection { + font-weight: normal; + text-decoration: none; + font-size: 90px; + line-height: 90px; + vertical-align: middle; } -#bgButton .currentDetails > span { - border-color: #000; +.bgStatus .currentDetails { + font-size: 20px; } .currentDetails > span:not(:first-child) { margin-left: 5px; } -.currentDetails > span * { +span.pill { + white-space: nowrap; + border-radius: 5px; + border: 2px solid #bdbdbd; +} + +span.pill * { padding-left: 2px; padding-right: 2px; - padding-bottom: 1px; } -.currentDetails > span em { - color: #bdbdbd; +span.pill em { font-style: normal; font-weight: bold; } -.currentDetails > span label { +span.pill label { color: #000; background: #bdbdbd; } -#bgButton .currentDetails > span label { - color: #bdbdbd; - background: inherit; -} - .bgStatus.current .currentBG { text-decoration: none; } -.currentDirection { - font-weight: normal; - text-decoration: none; - font-size: 90%; - vertical-align: top; -} - .time { - font-size: 600%; + color: #808080; + font-size: 100px; + line-height: 100px; padding-top: 15px; } .timebox { @@ -128,30 +111,51 @@ body { width: 250px; } .timeOther { - font-size: 25%; + font-size: 20px; + line-height: 30px; } #lastEntry { background: #808080; - border-radius: 5px; - color: #000; - padding: 0.25em; + border-color: #808080; } -#lastEntry.warn { - background: #cc0 !important; + +#lastEntry.pill em { + color: #808080; + background: #000; +} + +#lastEntry.pill label { + background: #808080; +} + +#lastEntry.warn, #lastEntry.warn label { + background: yellow; + border-color: yellow; +} +#lastEntry.warn em { + color: yellow; } -#lastEntry.urgent { - background: #c00 !important; + +#lastEntry.urgent, #lastEntry.urgent label { + background: red; + border-color: red; +} +#lastEntry.urgent em { + color: red; } #chartContainer { - background: #111; + top: 225px; /*(toolbar height + status height)*/ + left:0; + right:0; bottom:0; - display: block; height:auto; - left:0; + font-size: 20px; + background: #111; + display: block; position:absolute; - right:0; } + #chartContainer svg { height: calc(100vh - (180px + 45px)); width: 100%; @@ -169,7 +173,7 @@ body { shape-rendering: crispEdges; } .grid path, .axis line { - stroke: #808080; + stroke: #bdbdbd; stroke-opacity: 1; } @@ -180,49 +184,40 @@ body { } -#noButton { - padding: 2px; -} - -#bgButton, #silenceBtn { z-index: 99; + border-radius: 5px; + border: 2px solid #bdbdbd; } -#bgButton { - background: yellow; - border: 2px solid #DDD; - border-right: 2px solid #ccc; - border-bottom: 2px solid #ccc; - border-radius: 5px; - box-shadow: 2px 4px 6px #ddd; - color: #000000; - cursor: default; - font-size: 75%; - margin-top: 15px; - width: auto; - - user-select: none; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - -moz-box-shadow: 2px 2px 4px #ddd; - -webkit-box-shadow: 2px 2px 4px #ddd; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; -} - -#bgButton.urgent { - background: red; -} - -.bgButton:active { - background: #850406; - border: 2px solid #999; - box-shadow: none; +#silenceBtn * { + font-size: 40px +} +.bgButton { + margin: 10px; + border: 2px solid #000; + border-radius: 5px; + width: 320px; +} + +.alarming .bgButton { + border-color: #bdbdbd; + color: #000; + box-shadow: 2px 4px 6px #ddd; +} + +.alarming .bgButton.urgent { + background-color: red; +} + +.alarming .bgButton.warning { + background-color: yellow; +} + +.alarming .bgButton:active { + border: 2px solid #bdbdbd; + box-shadow: none; -moz-box-shadow: none; -webkit-box-shadow: none; } @@ -233,135 +228,142 @@ body { margin: 10px auto; } -div.tooltip { - position: absolute; - text-align: left; - width: fit-content; - height: fit-content; - padding: 2px; - font: 14px sans-serif; - background: white; - border: 0px; - border-radius: 8px; - pointer-events: none; -} - -#silenceBtn, #silenceBtn * { - font-size: 70%; +div.tooltip { + color: #444; + position: absolute; + text-align: left; + padding: 4px; + font-size: 14px; + line-height: 15px; + background: white; + border: 0; + border-radius: 8px; + pointer-events: none; } .alarms { display: none; } -#testAlarms { - font-size: 20%; -} +@media (max-width: 800px) { + .bgStatus { + width: 40%; + } -#currentTime{ - padding: 0 0 10px 0; -} + .bgButton { + width: auto; + } -/* Large desktop */ -@media (min-width: 980px) { - .content { - padding-top: 20px; + .bgStatus .currentBG { + font-size: 80px; + line-height: 80px; } - .linediv-l { - border-right: 1px white solid; + + .bgStatus .currentDirection { + font-size: 70px; + line-height: 70px; } - .linedic-r { - border-left: 1px white solid; + + .time { + font-size: 70px; + line-height: 60px; } -} -@media (max-width: 800px) { - #chartContainer { - font-size: 80%; - } + .timeOther { + font-size: 15px; + line-height: 40px; + } - .bgStatus { - width: 50%; - font-size: 650%; - } + #silenceBtn * { + font-size: 30px; + } - .dropdown-menu { - font-size: 60% !important; - } - #currentTime { - font-size: 85%; - } + #chartContainer { + top: 185px; + } + #chartContainer svg { + height: calc(100vh - 185px); + } } @media (max-width: 750px) { - .dropdown-menu { - font-size: 60% !important; - } + .bgStatus { + width: 60%; + } - .container .status { - font-size: 70%; - } + .bgStatus .currentBG { + font-size: 70px; + line-height: 60px; + } - .bgStatus .currentDetails { - top: 0; - } + .bgStatus .currentDirection { + font-size: 50px; + line-height: 50px; + } - #chartContainer { - top: 165px; - font-size: 80%; - } - #chartContainer svg { - height: calc(100vh - 165px); - } + .bgStatus .currentDetails { + font-size: 15px; + } -} + .time { + font-size: 50px; + line-height: 40px; + width: 250px; + } -@media (max-width: 400px) { - body { - font-size: 70%; + #chartContainer { + top: 165px; + } + #chartContainer svg { + height: calc(100vh - 165px); } +} + +@media (max-width: 400px) { .status { text-align: center; margin-bottom: 0; height: 152px; } - /* Unremark to test alert/silence button + menu. */ - /* #noButton {display:none;} - #bgButton {display:block;} */ - .bgStatus { - font-size: 750%; float: none; margin: 0 auto; padding: 0; - text-align: center; width: 100vw; } - .bgStatus .currentDetails { - top: -10px; + .bgButton { + margin: 5px; + width: auto; } - #bgButton { - font-size: 100%; + .bgStatus .currentBG { + font-size: 70px; + line-height: 70px; } + + .bgStatus .currentDirection { + font-size: 60px; + line-height: 60px; + } + + .bgStatus .currentDetails { + font-size: 15px; + } + .dropdown-menu { - font-size: 60% !important; + font-size: 50px !important; margin-left: 2vw; width: 96vw; } - .container .status { - font-size: 100% !important; - } .time { - margin-bottom: 0.1em; - margin-top: -1em; - margin-left: 0; - width: 100%; + width: auto; + padding-top: 0; + font-size: 20px !important; } #container.alarming .time { @@ -369,21 +371,21 @@ div.tooltip { } .timebox { - text-align: none; width: auto; } + #currentTime { display: inline; - font-size: 25% !important; - font-weight: bold; + vertical-align: middle; } + .timeOther { display: inline; margin-left: auto; + font-size: 15px; } #chartContainer { - font-size: 110% !important; top: 210px; } #chartContainer svg { @@ -391,6 +393,18 @@ div.tooltip { } } +@media (max-height: 700px) { + #chartContainer { + font-size: 15px; + } +} + +@media (max-height: 600px) { + #chartContainer { + font-size: 12px; + } +} + @media (max-height: 480px) { #toolbar { float: right; @@ -406,13 +420,9 @@ div.tooltip { padding-bottom: 20px; } - #currentTime { - font-size: 85%; - } - #chartContainer { top: 130px; - font-size: 80%; + font-size: 10px; } #chartContainer svg { height: calc(100vh - 130px); @@ -420,13 +430,45 @@ div.tooltip { } @media (max-height: 480px) and (min-width: 400px) { - .container .status { - font-size: 70%; + .bgStatus .currentBG { + font-size: 80px; + line-height: 80px; + } + + .bgStatus .currentDirection { + font-size: 70px; + line-height: 70px; + } + + .bgStatus .currentDetails { + font-size: 15px; + } + + .time { + font-size: 70px; + line-height: 60px; + } + + .timeOther { + font-size: 15px; } + } @media (max-height: 480px) and (max-width: 400px) { - .container .status { - font-size: 80% !important; + + .bgStatus .currentBG { + font-size: 60px; + line-height: 60px; + } + + .bgStatus .currentDirection { + font-size: 50px; + line-height: 50px; } + + .bgStatus .currentDetails { + font-size: 15px; + } + } diff --git a/static/index.html b/static/index.html index 703c87db5..f12f8a41a 100644 --- a/static/index.html +++ b/static/index.html @@ -27,16 +27,9 @@