Mercurial > libervia-templates
diff sat_templates/default/forum/overview.html @ 149:e5ec33c4a8a8
forum/overview.html: classes modification + better global design
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 03 Jun 2018 18:01:32 +0200 |
parents | 33c7ce833d3f |
children |
line wrap: on
line diff
--- a/sat_templates/default/forum/overview.html Sun Jun 03 09:00:04 2018 +0200 +++ b/sat_templates/default/forum/overview.html Sun Jun 03 18:01:32 2018 +0200 @@ -1,11 +1,12 @@ {% extends 'base/base.html' %} -{% macro generate_forums(forums_data) %} - <ul class="forum"> +{% macro generate_forums(forums_data, level=0) %} + {% set panel_type = "main" if level==0 else "sub" %} + <ul class="forum forum__panel_{{panel_type}}"> {% for forum in forums_data %} - <li> + <li class="forum forum__cat_{{panel_type}} forum__level_{{level}}"> {% if 'http_url' in forum %} - <a href="{{forum['http_url']}}" class="forum_actif"> + <a href="{{forum['http_url']}}" class="forum_active"> {% else %} <a> {% endif %} @@ -16,7 +17,7 @@ </a> {% if 'sub-forums' in forum %} - {{ generate_forums(forum['sub-forums']) }} + {{ generate_forums(forum['sub-forums'], level=level+1) }} {% endif %} </li> {% endfor %} @@ -27,7 +28,7 @@ {% if not forums %} <p class="message--info">{% trans %}No forums found on this server!{% endtrans %}</p> {% else %} - <div id="forums"> + <div class="forums"> {{ generate_forums(forums) }} </div> {% endif %}