Skip to content

Commit

Permalink
Merge pull request #482 from nightscout/wip/hourglass-glyph
Browse files Browse the repository at this point in the history
use an updated font to include an hourglass glyph
  • Loading branch information
jasoncalabrese committed Mar 14, 2015
2 parents c4a2f02 + 9228db9 commit 06c1008
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 22 deletions.
24 changes: 24 additions & 0 deletions static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ body {
vertical-align: middle;
}

.bgStatus .currentBG.icon-hourglass {
font-size: 90px;
}

.bgStatus .currentDirection {
font-weight: normal;
text-decoration: none;
Expand Down Expand Up @@ -259,6 +263,10 @@ div.tooltip {
line-height: 80px;
}

.bgStatus .currentBG.icon-hourglass {
font-size: 70px;
}

.bgStatus .currentDirection {
font-size: 70px;
line-height: 70px;
Expand Down Expand Up @@ -297,6 +305,10 @@ div.tooltip {
line-height: 60px;
}

.bgStatus .currentBG.icon-hourglass {
font-size: 50px;
}

.bgStatus .currentDirection {
font-size: 50px;
line-height: 50px;
Expand Down Expand Up @@ -345,6 +357,10 @@ div.tooltip {
line-height: 70px;
}

.bgStatus .currentBG.icon-hourglass {
font-size: 60px;
}

.bgStatus .currentDirection {
font-size: 60px;
line-height: 60px;
Expand Down Expand Up @@ -435,6 +451,10 @@ div.tooltip {
line-height: 80px;
}

.bgStatus .currentBG.icon-hourglass {
font-size: 70px;
}

.bgStatus .currentDirection {
font-size: 70px;
line-height: 70px;
Expand Down Expand Up @@ -462,6 +482,10 @@ div.tooltip {
line-height: 60px;
}

.bgStatus .currentBG.icon-hourglass {
font-size: 60px;
}

.bgStatus .currentDirection {
font-size: 50px;
line-height: 50px;
Expand Down
6 changes: 6 additions & 0 deletions static/glyphs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
"code": 59401,
"src": "entypo"
},
{
"uid": "7f6916533c0842b6cec699fd773693d3",
"css": "hourglass",
"code": 59404,
"src": "entypo"
},
{
"uid": "jh3jpcb1t1bcm80gidkadilh080aq79h",
"css": "menu",
Expand Down
3 changes: 2 additions & 1 deletion static/glyphs/css/fontello-codes.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
.icon-battery-100:before { content: '\e808'; } /* '' */
.icon-cancel-circled:before { content: '\e809'; } /* '' */
.icon-volume:before { content: '\e80a'; } /* '' */
.icon-plus:before { content: '\e80b'; } /* '' */
.icon-plus:before { content: '\e80b'; } /* '' */
.icon-hourglass:before { content: '\e80c'; } /* '' */
15 changes: 8 additions & 7 deletions static/glyphs/css/fontello-embedded.css

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion static/glyphs/css/fontello-ie7-codes.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
.icon-battery-100 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-cancel-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-volume { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-hourglass { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
3 changes: 2 additions & 1 deletion static/glyphs/css/fontello-ie7.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
.icon-battery-100 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-cancel-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-volume { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-plus { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-hourglass { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
15 changes: 8 additions & 7 deletions static/glyphs/css/fontello.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?48374311');
src: url('../font/fontello.eot?48374311#iefix') format('embedded-opentype'),
url('../font/fontello.woff?48374311') format('woff'),
url('../font/fontello.ttf?48374311') format('truetype'),
url('../font/fontello.svg?48374311#fontello') format('svg');
src: url('../font/fontello.eot?46427953');
src: url('../font/fontello.eot?46427953#iefix') format('embedded-opentype'),
url('../font/fontello.woff?46427953') format('woff'),
url('../font/fontello.ttf?46427953') format('truetype'),
url('../font/fontello.svg?46427953#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
Expand All @@ -14,7 +14,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../font/fontello.svg?48374311#fontello') format('svg');
src: url('../font/fontello.svg?46427953#fontello') format('svg');
}
}
*/
Expand Down Expand Up @@ -61,4 +61,5 @@
.icon-battery-100:before { content: '\e808'; } /* '' */
.icon-cancel-circled:before { content: '\e809'; } /* '' */
.icon-volume:before { content: '\e80a'; } /* '' */
.icon-plus:before { content: '\e80b'; } /* '' */
.icon-plus:before { content: '\e80b'; } /* '' */
.icon-hourglass:before { content: '\e80c'; } /* '' */
3 changes: 3 additions & 0 deletions static/glyphs/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,9 @@ <h1>
<div title="Code: 0xe80a" class="the-icons span3"><i class="icon-volume"></i> <span class="i-name">icon-volume</span><span class="i-code">0xe80a</span></div>
<div title="Code: 0xe80b" class="the-icons span3"><i class="icon-plus"></i> <span class="i-name">icon-plus</span><span class="i-code">0xe80b</span></div>
</div>
<div class="row">
<div title="Code: 0xe80c" class="the-icons span3"><i class="icon-hourglass"></i> <span class="i-name">icon-hourglass</span><span class="i-code">0xe80c</span></div>
</div>
</div>
<div class="container footer">Generated by <a href="http://fontello.com">fontello.com</a></div>
</body>
Expand Down
Binary file modified static/glyphs/font/fontello.eot
Binary file not shown.
7 changes: 4 additions & 3 deletions static/glyphs/font/fontello.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/glyphs/font/fontello.ttf
Binary file not shown.
Binary file modified static/glyphs/font/fontello.woff
Binary file not shown.
7 changes: 5 additions & 2 deletions static/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,10 @@ var app = {}, browserSettings = {}, browserStorage = $.localStorage;


function updateCurrentSGV(value) {
if (value < 39) {
currentBG.html(errorCodeToDisplay(value)).toggleClass('error-code');
if (value == 9) {
currentBG.text('');
} else if (value < 39) {
currentBG.html(errorCodeToDisplay(value));
} else if (value < 40) {
currentBG.text('LOW');
} else if (value > 400) {
Expand All @@ -332,6 +334,7 @@ var app = {}, browserSettings = {}, browserStorage = $.localStorage;
}
}

currentBG.toggleClass('icon-hourglass', value == 9);
currentBG.toggleClass('error-code', value < 39);
currentBG.toggleClass('bg-limit', value == 39 || value > 400);
}
Expand Down

0 comments on commit 06c1008

Please sign in to comment.