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/list | |
parent | fa7cf47e28a4ac1636e947c269ed83abe49a1491 (diff) |
initial commit, import from pixelated_dashboard
Diffstat (limited to 'widgets/list')
-rw-r--r-- | widgets/list/list.coffee | 6 | ||||
-rw-r--r-- | widgets/list/list.html | 18 | ||||
-rw-r--r-- | widgets/list/list.scss | 60 |
3 files changed, 84 insertions, 0 deletions
diff --git a/widgets/list/list.coffee b/widgets/list/list.coffee new file mode 100644 index 0000000..0028073 --- /dev/null +++ b/widgets/list/list.coffee @@ -0,0 +1,6 @@ +class Dashing.List extends Dashing.Widget + ready: -> + if @get('unordered') + $(@node).find('ol').remove() + else + $(@node).find('ul').remove() diff --git a/widgets/list/list.html b/widgets/list/list.html new file mode 100644 index 0000000..07e0471 --- /dev/null +++ b/widgets/list/list.html @@ -0,0 +1,18 @@ +<h1 class="title" data-bind="title"></h1> + +<ol> + <li data-foreach-item="items"> + <span class="label" data-bind="item.label"></span> + <span class="value" data-bind="item.value"></span> + </li> +</ol> + +<ul class="list-nostyle"> + <li data-foreach-item="items"> + <span class="label" data-bind="item.label"></span> + <span class="value" data-bind="item.value"></span> + </li> +</ul> + +<p class="more-info" data-bind="moreinfo"></p> +<p class="updated-at" data-bind="updatedAtMessage"></p> diff --git a/widgets/list/list.scss b/widgets/list/list.scss new file mode 100644 index 0000000..1d2bdb0 --- /dev/null +++ b/widgets/list/list.scss @@ -0,0 +1,60 @@ +// ---------------------------------------------------------------------------- +// Sass declarations +// ---------------------------------------------------------------------------- +$background-color: #178CA6; +$value-color: #fff; + +$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 +// ---------------------------------------------------------------------------- +.widget-list { + + background-color: $background-color; + vertical-align: top; + + .title { + color: $title-color; + } + + ol, ul { + margin: 0 15px; + text-align: left; + color: $label-color; + } + + ol { + list-style-position: inside; + } + + li { + margin-bottom: 5px; + } + + .list-nostyle { + list-style: none; + } + + .label { + color: $label-color; + } + + .value { + float: right; + margin-left: 12px; + font-weight: 600; + color: $value-color; + } + + .updated-at { + color: rgba(0, 0, 0, 0.3); + } + + .more-info { + color: $moreinfo-color; + } + +} |