diff options
author | varac <varacanero@zeromail.org> | 2016-07-13 20:07:09 +0200 |
---|---|---|
committer | Varac <varac@leap.se> | 2017-10-16 13:20:14 +0200 |
commit | 11d443664b7a785b42cbbd5b96347bafa5ad273a (patch) | |
tree | 9a27d4c1fe58e3375ae1868cf7a29da1af106265 /widgets/image | |
parent | fa7cf47e28a4ac1636e947c269ed83abe49a1491 (diff) |
initial commit, import from pixelated_dashboard
Diffstat (limited to 'widgets/image')
-rw-r--r-- | widgets/image/image.coffee | 9 | ||||
-rw-r--r-- | widgets/image/image.html | 1 | ||||
-rw-r--r-- | widgets/image/image.scss | 13 |
3 files changed, 23 insertions, 0 deletions
diff --git a/widgets/image/image.coffee b/widgets/image/image.coffee new file mode 100644 index 0000000..c3892c0 --- /dev/null +++ b/widgets/image/image.coffee @@ -0,0 +1,9 @@ +class Dashing.Image extends Dashing.Widget + + ready: -> + # This is fired when the widget is done being rendered + + onData: (data) -> + # Handle incoming data + # You can access the html node of this widget with `@node` + # Example: $(@node).fadeOut().fadeIn() will make the node flash each time data comes in. diff --git a/widgets/image/image.html b/widgets/image/image.html new file mode 100644 index 0000000..41a88eb --- /dev/null +++ b/widgets/image/image.html @@ -0,0 +1 @@ +<img data-bind-src="image | prepend '/assets'" data-bind-width="width"/> diff --git a/widgets/image/image.scss b/widgets/image/image.scss new file mode 100644 index 0000000..0b1a316 --- /dev/null +++ b/widgets/image/image.scss @@ -0,0 +1,13 @@ +// ---------------------------------------------------------------------------- +// Sass declarations +// ---------------------------------------------------------------------------- +$background-color: #4b4b4b; + +// ---------------------------------------------------------------------------- +// Widget-image styles +// ---------------------------------------------------------------------------- +.widget-image { + + background-color: $background-color; + +} |