Created
June 11, 2014 08:52
-
-
Save luhonghai/d5e917a9761c08f19225 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section class="panel panel-default"> | |
<div class="panel-heading"> | |
<h3 class="panel-title"><span class="glyphicon glyphicon-tags"></span> Tags</h3> | |
</div> | |
<div style="padding: 5px;"> | |
<ul class="nav nav-pills"> | |
{% for category in site.tags %} | |
{% capture tag_url %}{{ site.tag_dir }}/{{ category | first | slugize | downcase | replace:' ','-' | append:'/index.html'}}{% endcapture %} | |
<li {% if tag_url == page.url %}class='active'{% endif %}> | |
{% capture tag-size %}{{ category | last | size }}{% endcapture %} | |
<a class="{% if tag-size > 20 %}tags-20{% elsif tag-size > 15 %}tags-15{% elsif tag-size > 10 %}tags-10{% elsif tag-size > 5 %}tags-5{% else %}tags-1{% endif %}" | |
href="{{ root_url | append:'/' | append:tag_url }}"> | |
<span class="badge pull-right">{{ category | last | size }}</span> | |
{{ category | first }} | |
</a> | |
</li> | |
{% endfor %} | |
</ul> | |
</div> | |
</section> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment