aboutsummaryrefslogtreecommitdiffstats
path: root/dev-random/templates
diff options
context:
space:
mode:
authorm-r-r <raybaudroigm@gmail.com>2012-06-03 12:24:42 +0200
committerm-r-r <raybaudroigm@gmail.com>2012-06-03 12:24:42 +0200
commite66da8b11bc410155dcb0c06e3fd585b59017f0e (patch)
tree1c1abe2d536cb18d591cf5518157107ffaa95228 /dev-random/templates
parent27887830c872085f41494f771177b2cfd4b4dd12 (diff)
downloadpelican-themes-e66da8b11bc410155dcb0c06e3fd585b59017f0e.zip
pelican-themes-e66da8b11bc410155dcb0c06e3fd585b59017f0e.tar.gz
pelican-themes-e66da8b11bc410155dcb0c06e3fd585b59017f0e.tar.bz2
[dev-random] Added an awesome tag cloud with µTags
Diffstat (limited to 'dev-random/templates')
-rw-r--r--dev-random/templates/tags.html18
1 files changed, 16 insertions, 2 deletions
diff --git a/dev-random/templates/tags.html b/dev-random/templates/tags.html
index b95d401..9373427 100644
--- a/dev-random/templates/tags.html
+++ b/dev-random/templates/tags.html
@@ -1,13 +1,27 @@
{% 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 in tag_cloud %}
- <li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/tag/{{ tag.0 }}.html">{{ tag.0 }}</a></li>
+ {% for tag, articles in tags %}
+ <li data-count="{{ articles|count }}"><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a></li>
{% endfor %}
</ul>
</section>