diff options
Diffstat (limited to 'pelican-bootstrap3/templates')
-rw-r--r-- | pelican-bootstrap3/templates/base.html | 1 | ||||
-rw-r--r-- | pelican-bootstrap3/templates/includes/coderwall-js.html | 15 | ||||
-rw-r--r-- | pelican-bootstrap3/templates/includes/coderwall.html | 7 |
3 files changed, 23 insertions, 0 deletions
diff --git a/pelican-bootstrap3/templates/base.html b/pelican-bootstrap3/templates/base.html index ae04fb1..5cbd8cc 100644 --- a/pelican-bootstrap3/templates/base.html +++ b/pelican-bootstrap3/templates/base.html @@ -185,6 +185,7 @@ <script src="{{ SITEURL }}/theme/js/respond.min.js"></script> {% include 'includes/github-js.html' %} +{% include 'includes/coderwall-js.html' %} {% include 'includes/disqus_script.html' %} {% include 'includes/ga.html' %} {% include 'includes/piwik.html' %} diff --git a/pelican-bootstrap3/templates/includes/coderwall-js.html b/pelican-bootstrap3/templates/includes/coderwall-js.html new file mode 100644 index 0000000..1e3a9d5 --- /dev/null +++ b/pelican-bootstrap3/templates/includes/coderwall-js.html @@ -0,0 +1,15 @@ +{% if CODERWALL_USER %}
+ <script type="text/javascript">
+ $(document).ready(function(){
+ $.getJSON("http://coderwall.com/{{ 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>
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/coderwall.html b/pelican-bootstrap3/templates/includes/coderwall.html new file mode 100644 index 0000000..2917577 --- /dev/null +++ b/pelican-bootstrap3/templates/includes/coderwall.html @@ -0,0 +1,7 @@ +{% if CODERWALL_USER %}
+ <li class="list-group-item">
+ <h4><i class="fa fa-github-alt fa-lg"></i><span class="icon-label">Coderwall Badges</span></h4>
+ <div id="coderwall_badges"></div>
+ <a href="http://coderwall.com/{{ CODERWALL_USER }}">@{{ CODERWALL_USER }}</a> on coderwall
+ </li>
+{% endif %}
|