diff options
author | Arnaud BOS <arnaud.tlse@gmail.com> | 2011-05-08 16:09:50 +0100 |
---|---|---|
committer | Arnaud BOS <arnaud.tlse@gmail.com> | 2011-05-08 16:09:50 +0100 |
commit | 3920b1d9ed6821409fa077fd781964292043ae4f (patch) | |
tree | 894ce13b50517e3a1451f884dc209213118049d5 /sneakyidea | |
parent | a2d78d158960e72b760bd965797115f1fbb38778 (diff) | |
download | pelican-themes-3920b1d9ed6821409fa077fd781964292043ae4f.tar.gz |
[SNEAKYIDEA]Add tag cloud support
Diffstat (limited to 'sneakyidea')
-rw-r--r-- | sneakyidea/static/css/main.css | 12 | ||||
-rw-r--r-- | sneakyidea/templates/base.html | 16 | ||||
-rw-r--r-- | sneakyidea/templates/tags.html | 12 |
3 files changed, 33 insertions, 7 deletions
diff --git a/sneakyidea/static/css/main.css b/sneakyidea/static/css/main.css index e5aea66..462d646 100644 --- a/sneakyidea/static/css/main.css +++ b/sneakyidea/static/css/main.css @@ -311,6 +311,18 @@ img.left, figure.left {float: right; margin: 0 0 2em 2em;} .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 *****************/ #about { diff --git a/sneakyidea/templates/base.html b/sneakyidea/templates/base.html index 1ec6fe5..d280c04 100644 --- a/sneakyidea/templates/base.html +++ b/sneakyidea/templates/base.html @@ -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 --> diff --git a/sneakyidea/templates/tags.html b/sneakyidea/templates/tags.html index e69de29..3a5db00 100644 --- a/sneakyidea/templates/tags.html +++ b/sneakyidea/templates/tags.html @@ -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 %} |