Skip to content

Instantly share code, notes, and snippets.

@yoshiori
Created July 12, 2012 07:54
Show Gist options
  • Save yoshiori/3096534 to your computer and use it in GitHub Desktop.
Save yoshiori/3096534 to your computer and use it in GitHub Desktop.
octopress coderwall badges
{% if site.coderwall_user %}
<section class="well">
<ul class="nav">
<li class="nav-header">Coderwall Badges</li>
</ul>
<div id="coderwall_badges"></div>
<a href="http://coderwall.com/{{site.coderwall_user}}">@{{site.coderwall_user}}</a> on coderwall
<script type="text/javascript">
$(document).ready(function(){
$.getJSON("http://coderwall.com/{{site.coderwall_user}}.json?callback=?", function(data){
for(var i = 0; i < data.data.badges.length ; i++){
var badge = data.data.badges[i];
var badge_tag = $("<img />");
badge_tag.attr("src",badge.badge);
badge_tag.css("width","50%");
$("#coderwall_badges").append(badge_tag);
}
});
});
</script>
</section>
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment