[SNEAKYIDEA]Add tag cloud support

This commit is contained in:
Arnaud BOS
2011-05-08 16:09:50 +01:00
parent a2d78d1589
commit 3920b1d9ed
3 changed files with 33 additions and 7 deletions

View File

@@ -310,6 +310,18 @@ img.left, figure.left {float: right; margin: 0 0 2em 2em;}
.social a[href*='linkedin.com'] {background-image: url('../images/icons/linkedin.png');}
.social a[href*='github.com'] {background-image: url('../images/icons/github.png');}
/*
Tag Cloud
*****************/
#cloud {list-style-type: none;}
#cloud li {float: left;}
#cloud .tag-1 {font-size: 3em; line-height: 1;}
#cloud .tag-2 {font-size: 2em; line-height: 1.5;}
#cloud .tag-3 {font-size: 1.5em; line-height: 2;}
#cloud .tag-4 {font-size: 1em; line-height: 3;}
/*
About
*****************/

View File

@@ -27,16 +27,18 @@
<header id="banner" class="body">
<h1><a href="{{ SITEURL }}">{{ SITENAME }} {% if SITESUBTITLE %} <strong>{{ SITESUBTITLE }}</strong>{% endif %}</a></h1>
<nav><ul>
{% for title, link in MENUITEMS %}
<li><a href="{{ link }}">{{ title }}</a></li>
{% endfor %}
{% if DISPLAY_PAGES_ON_MENU %}
{% for page in PAGES %}
<li><a href="{{ SITEURL }}/pages/{{ page.url }}">{{ page.title }}</a></li>
{% endfor %}
{% for current_page in PAGES %}
<li {% if page %}{% if page == current_page%}class="active"{% endif %}{% endif %}>
<a href="{{ SITEURL }}/pages/{{ current_page.url }}">{{ current_page.title }}</a>
</li>
{% endfor %}
{% endif %}
{% for cat, null in categories %}
<li {% if cat == category %}class="active"{% endif %}><a href="{{ SITEURL }}/category/{{ cat }}.html">{{ cat }}</a></li>
<li {% if cat == category and not article %}class="active"{% endif %}><a href="{{ SITEURL }}/category/{{ cat }}.html">{{ cat }}</a></li>
{% endfor %}
{% for title, link in MENUITEMS %}
<li><a href="{{ SITEURL }}/{{ link }}">{{ title }}</a></li>
{% endfor %}
</ul></nav>
</header><!-- /#banner -->

View File

@@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block title %}Tags{% endblock %}
{% block content %}
<section id="content" class="body">
<h1 class="entry-title">Tags</h1>
<ul id="cloud">
{% for tag in tag_cloud %}
<li class="tag-{{ tag.1 }}"><a href="/tag/{{ tag.0 }}/">{{ tag.0 }}</a></li>
{% endfor %}
</ul>
</section>
{% endblock %}