diff options
author | varac <varacanero@zeromail.org> | 2016-07-13 20:07:09 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2016-07-13 20:07:09 +0200 |
commit | 5d01197cf893d4a8c9a57f7c963f47393d34e157 (patch) | |
tree | 860e97c0af1ad8c7d4bd1aecb0b7e6658b312846 /widgets/github_pr |
initial commit, import from pixelated_dashboard
Diffstat (limited to 'widgets/github_pr')
-rw-r--r-- | widgets/github_pr/github_pr.coffee | 6 | ||||
-rw-r--r-- | widgets/github_pr/github_pr.html | 10 | ||||
-rw-r--r-- | widgets/github_pr/github_pr.scss | 57 |
3 files changed, 73 insertions, 0 deletions
diff --git a/widgets/github_pr/github_pr.coffee b/widgets/github_pr/github_pr.coffee new file mode 100644 index 0000000..43f4fc4 --- /dev/null +++ b/widgets/github_pr/github_pr.coffee @@ -0,0 +1,6 @@ +class Dashing.Github_pr extends Dashing.Widget + ready: -> + if @get('unordered') + $(@node).find('ol').remove() + else + $(@node).find('ul').remove() diff --git a/widgets/github_pr/github_pr.html b/widgets/github_pr/github_pr.html new file mode 100644 index 0000000..5d4d8d8 --- /dev/null +++ b/widgets/github_pr/github_pr.html @@ -0,0 +1,10 @@ +<h1 class="title" data-bind="title"></h1> + +<ul class="github_pr-nostyle"> + <li data-foreach-item="items"> + <a class="label-link" data-bind="item.label | truncate 30" data-bind-href="item.pr_url" target="_blank"></a> + </li> +</ul> + +<p class="more-info" data-bind="moreinfo"></p> +<p class="updated-at" data-bind="updatedAtMessage"></p> diff --git a/widgets/github_pr/github_pr.scss b/widgets/github_pr/github_pr.scss new file mode 100644 index 0000000..e4ad010 --- /dev/null +++ b/widgets/github_pr/github_pr.scss @@ -0,0 +1,57 @@ +// ---------------------------------------------------------------------------- +// Sass declarations +// ---------------------------------------------------------------------------- +$background-color: #178CA6; +$value-color: #fff; + +$title-color: #fff; +$label-color: rgba(255, 255, 255, 0.7); +$moreinfo-color: rgba(255, 255, 255, 0.7); + +// ---------------------------------------------------------------------------- +// Widget-github_pr styles +// ---------------------------------------------------------------------------- +.widget-github-pr { + + 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; + } + + .github_pr-nostyle { + list-style: none; + } + + .label-link { + color: $value-color; + + &:hover { + color: rgba(255, 255, 255, 0.7); + } + } + + .updated-at { + color: rgba(0, 0, 0, 0.3); + } + + .more-info { + color: $moreinfo-color; + } + +} |