lib/skillmatch/views/index.haml
#header
- unless authorized?
%a(href="/auth") Sign-In with LinkedIn
- else
%a(href="/auth/logout") Logout
#mast-head
%h1 Skillmatch
- if authorized?
%div
%input(id="term" type="text" name="term")
%button(id="search")Search Connections
#content
- unless authorized?
%p.center This is a sample app that demonstrates using the LinkedIn API with Sinatra. You'll need to <a href="/auth">authenticate with LinkedIn</a> to use it.
- else
%ul#results
%li
%p.center Enter a skill above to find connections that have that skill using the LinkedIn API.
#footer
%p Copyright © 2012 <a href="http://bobnadler.com">Bob Nadler, Jr.</a> (The MIT License)
%p Source code available on <a href="https://github.com/bnadlerjr/skillmatch">GitHub</a>.
-#templates
%script(type="text/tmpl" id="cnn")
:plain
<li id="<%= cnn['id'] %>">
<img class="profile-pic" src="<%= cnn['picture_url'] %>" />
<div>
<h2><%= cnn['full_name'] %><span> (<%= cnn['formatted_similarity'] %>% match)</span></h2>
<a href="<%= cnn['public_profile_url'] %>" style="text-decoration:none;">
<span style="font: 80% Arial,sans-serif; color:#0783B6;">
<img src="http://www.linkedin.com/img/webpromo/btn_in_20x15.png" width="20" height="15" alt="View <%= cnn['full_name'] %>'s LinkedIn profile" style="vertical-align:middle" border="0" />
View <%= cnn['full_name'] %>'s profile
</span>
</a>
<p><%= cnn['skill_list'] %></p>
</div>
</li>