{% extends "base.html" %}

{% block headers %}
{{ super() }}
    <script type="text/javascript" src="{{ SITEURL }}/theme/js/microTags.js"></script>
    <script>
      function tag_cloud_init() {
        var el = document.getElementById("tagslist");
        window._tagcloud = new µTags(el);
      }
      if (window.addEventListener) window.addEventListener("load", tag_cloud_init, false);
      else if (window.attachEvent) window.attachEvent("onload", tag_cloud_init);
      else window.onload = tag_cloud_init;
    </script>
{% endblock headers %}

{% block title %}{{ super() }} — Mots-clés{% endblock title %}

{%- block content %}
    <section class="content">
      <h1>Mots-clés</h1>
      <ul id="tagslist">
      {% for tag, articles in tags %}
      <li data-count="{{ articles|count }}"><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a></li>
      {% endfor %}
      </ul>
    </section>
{% endblock content -%}
