diff options
author | Chimrod <contact+git@chimrod.com> | 2013-04-16 21:27:30 +0200 |
---|---|---|
committer | Chimrod <contact+git@chimrod.com> | 2013-04-16 21:27:30 +0200 |
commit | 66a5a0cdccd464930a232c87f91e1b0805f255a5 (patch) | |
tree | 1563108cc22cfdc250108eb25b3beaf51d398dff /theme/templates/menu.html |
initial commit
Diffstat (limited to 'theme/templates/menu.html')
-rwxr-xr-x | theme/templates/menu.html | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/theme/templates/menu.html b/theme/templates/menu.html new file mode 100755 index 0000000..b8ecd50 --- /dev/null +++ b/theme/templates/menu.html @@ -0,0 +1,53 @@ +{% macro submenu(elements, link, name) -%} + {% if elements %} + <li class='has-sub'><a href="{{ SITEURL }}/{{link}}.html"><span>{{name}}</span></a> + <ul> + {% for tag, articles in elements %} + <li><a href="{{SITEURL}}/{{tag.url}}"><span>{{ tag }}</span></a></li> + {% endfor %} + </ul> + </li> + {% endif %} +{%- endmacro %} + +<div id="cssmenu"> +<ul> + <li class='has-sub'><a href="{{ SITEURL }}/">Articles</a> + <ul> + {% for article in articles %} + {% if loop.index < FEED_MAX_ITEMS %} + <li><a href="{{ SITEURL }}/{{ article.url}}">{{ article.title }}</a></li> + {% endif %} + {% endfor %} + <hr/> + <li><a href="{{ SITEURL }}/archives.html">Archives</a> + </ul> + </li> + + {{ submenu(categories, 'categories', 'Catégories') }} + {{ submenu(tags, 'tags', 'Mots-clefs') }} + + +{# + {% if FEED or FEED_RSS %} + <li class='has-sub'><a href="{{ SITEURL }}/#">S'abonner</a> + <ul> + {% if FEED %} + <li><a href="{{ SITEURL }}/{{ FEED }}" rel="alternate">Flux ATOM</a></li> + {% endif %} + {% if FEED_RSS %} + <li><a href="{{ SITEURL }}/{{ FEED_RSS }}" rel="alternate">Flux RSS</a></li> + {% endif %} + + {% if categories %} + {% for category, articles in categories %} + <li><a href="{{SITEURL}}/{{CATEGORY_FEED_ATOM % (category)}}"><span>{{ category }}</span></a></li> + {% endfor %} + {% endif %} + </ul> + </li> + {% endif %} +#} + +</ul> +</div> |