Skip to content

Commit

Permalink
output category names like tags
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Mar 25, 2012
1 parent c81201f commit d2fb391
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions categories/index.md
Expand Up @@ -3,6 +3,12 @@ title: Categories
layout: page layout: page
--- ---


<div id='tag_cloud'>
{% for cat in site.categories %}
<a href="#{{ cat[0] }}" title="{{ cat[0] }}" rel="{{ cat[1].size }}">{{ cat[0] }} ({{ cat[1].size }})</a>
{% endfor %}
</div>

<ul class="listing"> <ul class="listing">
{% for cat in site.categories %} {% for cat in site.categories %}
<li class="listing-seperator" id="{{ cat[0] }}">{{ cat[0] }}</li> <li class="listing-seperator" id="{{ cat[0] }}">{{ cat[0] }}</li>
Expand All @@ -15,3 +21,14 @@ layout: page
{% endfor %} {% endfor %}
</ul> </ul>


<script src="/media/js/jquery.tagcloud.js" type="text/javascript" charset="utf-8"></script>
<script language="javascript">
$.fn.tagcloud.defaults = {
size: {start: 1, end: 1, unit: 'em'},
color: {start: '#f8e0e6', end: '#ff3333'}
};

$(function () {
$('#tag_cloud a').tagcloud();
});
</script>

0 comments on commit d2fb391

Please sign in to comment.