summaryrefslogtreecommitdiff
path: root/widgets/list
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-07-13 20:07:09 +0200
committervarac <varacanero@zeromail.org>2016-07-13 20:07:09 +0200
commit5d01197cf893d4a8c9a57f7c963f47393d34e157 (patch)
tree860e97c0af1ad8c7d4bd1aecb0b7e6658b312846 /widgets/list
initial commit, import from pixelated_dashboard
Diffstat (limited to 'widgets/list')
-rw-r--r--widgets/list/list.coffee6
-rw-r--r--widgets/list/list.html18
-rw-r--r--widgets/list/list.scss60
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;
+ }
+
+}