From cdd8ff258582f5eba7e3941a5a18007e7aabbbfa Mon Sep 17 00:00:00 2001 From: Daniel Beauchamp Date: Thu, 2 Aug 2012 13:38:19 -0400 Subject: Better generators, sample widgets, and more! --- templates/project/widgets/list/list.coffee | 15 +++++++++ templates/project/widgets/list/list.html | 15 +++++++++ templates/project/widgets/list/list.scss | 50 ++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 templates/project/widgets/list/list.coffee create mode 100644 templates/project/widgets/list/list.html create mode 100644 templates/project/widgets/list/list.scss (limited to 'templates/project/widgets/list') diff --git a/templates/project/widgets/list/list.coffee b/templates/project/widgets/list/list.coffee new file mode 100644 index 0000000..6b1cc50 --- /dev/null +++ b/templates/project/widgets/list/list.coffee @@ -0,0 +1,15 @@ +class AllTheThings.List extends AllTheThings.Widget + source: 'list' + + @accessor 'current', Batman.Property.EasingSetter + + @accessor 'arrow', -> + if @get('last') + if parseInt(@get('current')) > parseInt(@get('last')) then 'arrow-up' else 'arrow-down' + + ready: -> + Batman.setImmediate => + if @get('unordered') + $(@node).find('ol').remove() + else + $(@node).find('ul').remove() \ No newline at end of file diff --git a/templates/project/widgets/list/list.html b/templates/project/widgets/list/list.html new file mode 100644 index 0000000..cc90d42 --- /dev/null +++ b/templates/project/widgets/list/list.html @@ -0,0 +1,15 @@ +

+ +
    +
  1. + + +
  2. +
+ + \ No newline at end of file diff --git a/templates/project/widgets/list/list.scss b/templates/project/widgets/list/list.scss new file mode 100644 index 0000000..248cef8 --- /dev/null +++ b/templates/project/widgets/list/list.scss @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------- +// Sass declarations +// ---------------------------------------------------------------------------- +$widget-list_background-color: #12b0c5; +$widget-list_value-color: #fff; + +$widget-list_title-color: lighten($widget-list_background-color, 45%); +$widget-list_label-color: lighten($widget-list_background-color, 45%); + +// ---------------------------------------------------------------------------- +// Widget-list styles +// ---------------------------------------------------------------------------- +.widget-list { + + background-color: $widget-list_background-color; + + .title { + color: $widget-list_title-color; + } + + ol, ul { + margin: 0 15px; + text-align: left; + color: $widget-list_label-color; + } + + ol { + list-style-position: inside; + } + + li { + margin-bottom: 5px; + } + + .list-nostyle { + list-style: none; + } + + .label { + color: $widget-list_label-color; + } + + .value { + float: right; + margin-left: 12px; + font-weight: 600; + color: $widget-list_value-color; + } + +} \ No newline at end of file -- cgit v1.2.3 From 780fe49f715c2fced88e958b02541bf8e7dca934 Mon Sep 17 00:00:00 2001 From: Daniel Beauchamp Date: Wed, 8 Aug 2012 18:02:56 -0400 Subject: Rename project to 'Dashing', and do some other cleanups --- templates/project/widgets/list/list.coffee | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'templates/project/widgets/list') diff --git a/templates/project/widgets/list/list.coffee b/templates/project/widgets/list/list.coffee index 6b1cc50..3ca892b 100644 --- a/templates/project/widgets/list/list.coffee +++ b/templates/project/widgets/list/list.coffee @@ -1,7 +1,5 @@ -class AllTheThings.List extends AllTheThings.Widget - source: 'list' - - @accessor 'current', Batman.Property.EasingSetter +class Dashing.List extends Dashing.Widget + @accessor 'current', Dashing.AnimatedValue @accessor 'arrow', -> if @get('last') -- cgit v1.2.3 From 54c6a04b722663b518bf99b4d98a1c2e86ee5103 Mon Sep 17 00:00:00 2001 From: Daniel Beauchamp Date: Tue, 14 Aug 2012 05:23:57 -0400 Subject: Updated the sample project. --- templates/project/widgets/list/list.scss | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'templates/project/widgets/list') diff --git a/templates/project/widgets/list/list.scss b/templates/project/widgets/list/list.scss index 248cef8..098200d 100644 --- a/templates/project/widgets/list/list.scss +++ b/templates/project/widgets/list/list.scss @@ -1,27 +1,29 @@ // ---------------------------------------------------------------------------- // Sass declarations // ---------------------------------------------------------------------------- -$widget-list_background-color: #12b0c5; -$widget-list_value-color: #fff; -$widget-list_title-color: lighten($widget-list_background-color, 45%); -$widget-list_label-color: lighten($widget-list_background-color, 45%); +$background-color: #12b0c5; +$value-color: #fff; + +$title-color: lighten($background-color, 45%); +$label-color: lighten($background-color, 45%); // ---------------------------------------------------------------------------- // Widget-list styles // ---------------------------------------------------------------------------- .widget-list { - background-color: $widget-list_background-color; + background-color: $background-color; + vertical-align: top; .title { - color: $widget-list_title-color; + color: $title-color; } ol, ul { margin: 0 15px; text-align: left; - color: $widget-list_label-color; + color: $label-color; } ol { @@ -37,14 +39,14 @@ $widget-list_label-color: lighten($widget-list_background-color, 45%); } .label { - color: $widget-list_label-color; + color: $label-color; } .value { float: right; margin-left: 12px; font-weight: 600; - color: $widget-list_value-color; + color: $value-color; } } \ No newline at end of file -- cgit v1.2.3 From a4a4564f760bb1bcd541366186cd46488d5a569b Mon Sep 17 00:00:00 2001 From: Daniel Beauchamp Date: Tue, 30 Oct 2012 05:16:35 -0400 Subject: Added new widgets, and made them more flexible. Ready for 0.1.3! --- templates/project/widgets/list/list.coffee | 15 ++++----------- templates/project/widgets/list/list.html | 5 ++++- templates/project/widgets/list/list.scss | 14 +++++++++++--- 3 files changed, 19 insertions(+), 15 deletions(-) (limited to 'templates/project/widgets/list') diff --git a/templates/project/widgets/list/list.coffee b/templates/project/widgets/list/list.coffee index 3ca892b..3cbf7a1 100644 --- a/templates/project/widgets/list/list.coffee +++ b/templates/project/widgets/list/list.coffee @@ -1,13 +1,6 @@ class Dashing.List extends Dashing.Widget - @accessor 'current', Dashing.AnimatedValue - - @accessor 'arrow', -> - if @get('last') - if parseInt(@get('current')) > parseInt(@get('last')) then 'arrow-up' else 'arrow-down' - ready: -> - Batman.setImmediate => - if @get('unordered') - $(@node).find('ol').remove() - else - $(@node).find('ul').remove() \ No newline at end of file + if @get('unordered') + $(@node).find('ol').remove() + else + $(@node).find('ul').remove() \ No newline at end of file diff --git a/templates/project/widgets/list/list.html b/templates/project/widgets/list/list.html index cc90d42..86752bf 100644 --- a/templates/project/widgets/list/list.html +++ b/templates/project/widgets/list/list.html @@ -12,4 +12,7 @@ - \ No newline at end of file + + +

+

\ No newline at end of file diff --git a/templates/project/widgets/list/list.scss b/templates/project/widgets/list/list.scss index 098200d..90b6c84 100644 --- a/templates/project/widgets/list/list.scss +++ b/templates/project/widgets/list/list.scss @@ -1,12 +1,12 @@ // ---------------------------------------------------------------------------- // Sass declarations // ---------------------------------------------------------------------------- - $background-color: #12b0c5; $value-color: #fff; -$title-color: lighten($background-color, 45%); -$label-color: lighten($background-color, 45%); +$title-color: rgba(255, 255, 255, 0.7); +$label-color: rgba(255, 255, 255, 0.7); +$moreinfo-color: rgba(255, 255, 255, 0.7); // ---------------------------------------------------------------------------- // Widget-list styles @@ -49,4 +49,12 @@ $label-color: lighten($background-color, 45%); color: $value-color; } + .updated-at { + color: rgba(0, 0, 0, 0.3); + } + + .more-info { + color: $moreinfo-color; + } + } \ No newline at end of file -- cgit v1.2.3 From 5934a2729d93d24e67016dc4dd101c689378ae33 Mon Sep 17 00:00:00 2001 From: Ayrton De Craene Date: Fri, 16 Nov 2012 11:18:06 +0100 Subject: Removes whitespace :scissors: --- templates/project/widgets/list/list.coffee | 2 +- templates/project/widgets/list/list.html | 2 +- templates/project/widgets/list/list.scss | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'templates/project/widgets/list') diff --git a/templates/project/widgets/list/list.coffee b/templates/project/widgets/list/list.coffee index 3cbf7a1..0028073 100644 --- a/templates/project/widgets/list/list.coffee +++ b/templates/project/widgets/list/list.coffee @@ -3,4 +3,4 @@ class Dashing.List extends Dashing.Widget if @get('unordered') $(@node).find('ol').remove() else - $(@node).find('ul').remove() \ No newline at end of file + $(@node).find('ul').remove() diff --git a/templates/project/widgets/list/list.html b/templates/project/widgets/list/list.html index 86752bf..07e0471 100644 --- a/templates/project/widgets/list/list.html +++ b/templates/project/widgets/list/list.html @@ -15,4 +15,4 @@

-

\ No newline at end of file +

diff --git a/templates/project/widgets/list/list.scss b/templates/project/widgets/list/list.scss index 90b6c84..bce7010 100644 --- a/templates/project/widgets/list/list.scss +++ b/templates/project/widgets/list/list.scss @@ -11,12 +11,12 @@ $moreinfo-color: rgba(255, 255, 255, 0.7); // ---------------------------------------------------------------------------- // Widget-list styles // ---------------------------------------------------------------------------- -.widget-list { +.widget-list { background-color: $background-color; vertical-align: top; - .title { + .title { color: $title-color; } @@ -39,7 +39,7 @@ $moreinfo-color: rgba(255, 255, 255, 0.7); } .label { - color: $label-color; + color: $label-color; } .value { @@ -57,4 +57,4 @@ $moreinfo-color: rgba(255, 255, 255, 0.7); color: $moreinfo-color; } -} \ No newline at end of file +} -- cgit v1.2.3