aboutsummaryrefslogtreecommitdiffstats
path: root/dev-random2
diff options
context:
space:
mode:
authorm-r-r <raybaudroigm@gmail.com>2012-08-18 13:06:55 +0200
committerm-r-r <raybaudroigm@gmail.com>2012-08-18 13:06:55 +0200
commit2d472973248aaf307809248a30bac7d27b04411f (patch)
tree1e48bda05a3dcbfc912722183b8f44c4ecdf8eb5 /dev-random2
parent7e147d55198addaf186fddb32c098305b3dbe4cb (diff)
downloadpelican-themes-2d472973248aaf307809248a30bac7d27b04411f.zip
pelican-themes-2d472973248aaf307809248a30bac7d27b04411f.tar.gz
pelican-themes-2d472973248aaf307809248a30bac7d27b04411f.tar.bz2
[dev-random2] Improved the tag cloud
Diffstat (limited to 'dev-random2')
-rw-r--r--dev-random2/static/css/theme.css20
-rw-r--r--dev-random2/templates/tags.html11
2 files changed, 21 insertions, 10 deletions
diff --git a/dev-random2/static/css/theme.css b/dev-random2/static/css/theme.css
index bb7f86b..050109a 100644
--- a/dev-random2/static/css/theme.css
+++ b/dev-random2/static/css/theme.css
@@ -117,16 +117,22 @@ article:last-of-type:after {
text-align: center;
}
-#tag-cloud li:hover {
- -webkit-transform: rotate(0deg), scale(1.3, 1.3) !important;
- -moz-transform: rotate(0deg), scale(1.3, 1.3) !important;
- -ms-transform: rotate(0deg), scale(1.3, 1.3) !important;
- -o-transform: rotate(0deg), scale(1.3, 1.3) !important;
- transform: rotate(0deg), scale(1.3, 1.3) !important;
+#tag-cloud li {
+ margin: .2em 1em;
+ transition: transform 200ms linear;
}
-#tag-cloud a {
+#tag-cloud li a {
text-decoration: none;
+ color: #222;
+}
+
+#tag-cloud li:hover {
+ transform: rotate(0deg) scale(1.3, 1.3)!important;
+}
+
+#tag-cloud li:hover a {
+ color: black;
}
h1.small-title {
diff --git a/dev-random2/templates/tags.html b/dev-random2/templates/tags.html
index ad5d2ea..e967527 100644
--- a/dev-random2/templates/tags.html
+++ b/dev-random2/templates/tags.html
@@ -5,8 +5,13 @@
<script type="text/javascript" src="{{ SITEURL }}/theme/js/microTags.js"></script>
<script>
function tag_cloud_init() {
- var el = document.getElementById("tag-cloud");
- window._tagcloud = new microTags(el);
+ var ul = document.getElementById("tag-cloud");
+ window.tagCloud = new microTags(ul, {
+ 'min-size': .95,
+ 'max-size': 3.5,
+ 'min-angle': -8,
+ 'max-angle': 8
+ });
}
if (window.addEventListener) window.addEventListener("load", tag_cloud_init, false);
else if (window.attachEvent) window.attachEvent("onload", tag_cloud_init);
@@ -20,7 +25,7 @@
<h1>Mots-clés</h1>
<ul id="tag-cloud">
{% for tag, articles in tags %}
- <li data-count="{{ articles|count }}"><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a></li>
+ <li data-count="{{ articles|count }}" title="{{ articles|count }} article(s)"><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a></li>
{% endfor %}
</ul>
{% endblock content -%}