Mercurial > libervia-templates
diff default/forum/overview.html @ 119:b085ede4d9af
forum/overview: forum template first draft.
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 30 Jan 2018 07:48:50 +0100 |
parents | |
children | efbf5423d7be |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/default/forum/overview.html Tue Jan 30 07:48:50 2018 +0100 @@ -0,0 +1,30 @@ +{% extends 'base/base.html' %} + +{% macro generate_forums(forums_data) %} + <ul class="forum"> + {% for forum in forums_data %} + <li> + {% if 'http_url' in forum %} + <a href="{{forum['http_url']}}" class="forum_actif"> + {% else %} + <a> + {% endif %} + <span class="forum_title">{{ forum.title }}</span> + {% if 'short-desc' in forum %} + <p class="forum_short-desc">{{ forum['short-desc'] }}</p> + {% endif %} + </a> + + {% if 'sub-forums' in forum %} + {{ generate_forums(forum['sub-forums']) }} + {% endif %} + </li> + {% endfor %} + </ul> +{% endmacro %} + +{% block body %} +<div id="forums"> + {{ generate_forums(forums) }} +</div> +{% endblock body %}