Skip to content

Instantly share code, notes, and snippets.

@erran
Last active August 29, 2015 13:56
Show Gist options
  • Save erran/9223938 to your computer and use it in GitHub Desktop.
Save erran/9223938 to your computer and use it in GitHub Desktop.
A Dashing widget for LinkedIn Users

LinkedIn User Profile Widget

Example Widget

class Dashing.LinkedinProfile 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.
<div class="image">
<img data-bind-src="image" data-bind-width="image_width"/>
</div>
<div>
<h1 class="name" data-bind="name"></h1>
<p class="title" data-bind="title"></p>
<div/>
<p class="updated-at" data-bind="updatedAtMessage"></p>
$background-color: #007bb6;
$foreground-color: #fff;
.widget-linkedin-profile {
background-color: $background-color;
color: $foreground-color;
.image {
float: left;
margin-left: 30px;
img {
-webkit-border-radius: 50em;
-moz-border-radius: 50em;
border-radius: 50em;
}
}
}
.updated-at {
color: $foreground-color;
opacity: 0.8;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment