summaryrefslogtreecommitdiff
path: root/templates/project/widgets/number
diff options
context:
space:
mode:
Diffstat (limited to 'templates/project/widgets/number')
-rw-r--r--templates/project/widgets/number/number.coffee8
-rw-r--r--templates/project/widgets/number/number.html10
-rw-r--r--templates/project/widgets/number/number.scss14
3 files changed, 17 insertions, 15 deletions
diff --git a/templates/project/widgets/number/number.coffee b/templates/project/widgets/number/number.coffee
index 78e7523..46cd6c2 100644
--- a/templates/project/widgets/number/number.coffee
+++ b/templates/project/widgets/number/number.coffee
@@ -8,17 +8,13 @@ class Dashing.Number extends Dashing.Widget
if last != 0
diff = Math.abs(Math.round((current - last) / last * 100))
"#{diff}%"
+ else
+ ""
@accessor 'arrow', ->
if @get('last')
if parseInt(@get('current')) > parseInt(@get('last')) then 'icon-arrow-up' else 'icon-arrow-down'
- @accessor 'statusStyle', ->
- "status-#{@get('status')}"
-
- @accessor 'needsAttention', ->
- @get('status') == 'warning' || @get('status') == 'danger'
-
onData: (data) ->
if data.status
$(@get('node')).addClass("status-#{data.status}") \ No newline at end of file
diff --git a/templates/project/widgets/number/number.html b/templates/project/widgets/number/number.html
index 6e9a03e..d7eeab9 100644
--- a/templates/project/widgets/number/number.html
+++ b/templates/project/widgets/number/number.html
@@ -1,9 +1,11 @@
-<h1 class="title"><i data-showif="needsAttention" class="icon-warning-sign"></i><span data-bind="title"></span></h1>
+<h1 class="title" data-bind="title"></h1>
-<h2 class="value" data-bind="current | prettyNumber"></h2>
+<h2 class="value" data-bind="current | shortenedNumber | prepend prefix"></h2>
<p class="change-rate">
- <i data-bind-class="arrow"></i><span data-bind="difference">50%</span>
+ <i data-bind-class="arrow"></i><span data-bind="difference"></span>
</p>
-<p class="text-moreinfo" data-bind="moreinfo">2012-07-26 10:59AM</p> \ No newline at end of file
+<p class="more-info" data-bind="moreinfo | raw"></p>
+
+<p class="updated-at" data-bind="updatedAtMessage"></p>
diff --git a/templates/project/widgets/number/number.scss b/templates/project/widgets/number/number.scss
index d134561..608624b 100644
--- a/templates/project/widgets/number/number.scss
+++ b/templates/project/widgets/number/number.scss
@@ -1,11 +1,11 @@
// ----------------------------------------------------------------------------
// Sass declarations
// ----------------------------------------------------------------------------
-$background-color: #00b1a4;
+$background-color: #47bbb3;
$value-color: #fff;
-$title-color: lighten($background-color, 75%);
-$moreinfo-color: lighten($background-color, 45%);
+$title-color: rgba(255, 255, 255, 0.7);;
+$moreinfo-color: rgba(255, 255, 255, 0.7);;
// ----------------------------------------------------------------------------
// Widget-number styles
@@ -23,13 +23,17 @@ $moreinfo-color: lighten($background-color, 45%);
}
.change-rate {
- font-weight: 300;
+ font-weight: 500;
font-size: 30px;
color: $value-color;
}
- .text-moreinfo {
+ .more-info {
color: $moreinfo-color;
}
+
+ .updated-at {
+ color: rgba(0, 0, 0, 0.3);
+ }
} \ No newline at end of file