diff options
author | Daniel Beauchamp <daniel.beauchamp@shopify.com> | 2012-10-30 05:16:35 -0400 |
---|---|---|
committer | Daniel Beauchamp <daniel.beauchamp@shopify.com> | 2012-10-30 05:16:35 -0400 |
commit | a4a4564f760bb1bcd541366186cd46488d5a569b (patch) | |
tree | 3737ae6d233464482482880bd858665866686f10 /templates/project/widgets/image | |
parent | 3a77d19282f2055559c63468c574b824138464ac (diff) |
Added new widgets, and made them more flexible. Ready for 0.1.3!
Diffstat (limited to 'templates/project/widgets/image')
-rw-r--r-- | templates/project/widgets/image/image.coffee | 9 | ||||
-rw-r--r-- | templates/project/widgets/image/image.html | 1 | ||||
-rw-r--r-- | templates/project/widgets/image/image.scss | 13 |
3 files changed, 23 insertions, 0 deletions
diff --git a/templates/project/widgets/image/image.coffee b/templates/project/widgets/image/image.coffee new file mode 100644 index 0000000..418e385 --- /dev/null +++ b/templates/project/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.
\ No newline at end of file diff --git a/templates/project/widgets/image/image.html b/templates/project/widgets/image/image.html new file mode 100644 index 0000000..cf2b228 --- /dev/null +++ b/templates/project/widgets/image/image.html @@ -0,0 +1 @@ +<img data-bind-src="image | prepend '/assets'" data-bind-width="width"/>
\ No newline at end of file diff --git a/templates/project/widgets/image/image.scss b/templates/project/widgets/image/image.scss new file mode 100644 index 0000000..10ca81d --- /dev/null +++ b/templates/project/widgets/image/image.scss @@ -0,0 +1,13 @@ +// ---------------------------------------------------------------------------- +// Sass declarations +// ---------------------------------------------------------------------------- +$background-color: #4b4b4b; + +// ---------------------------------------------------------------------------- +// Widget-image styles +// ---------------------------------------------------------------------------- +.widget-image { + + background-color: $background-color; + +}
\ No newline at end of file |