annotate sat_templates/templates/default/forum/overview.html @ 401:0e454358ca49

bulma: update `bulma` to version `1.0.2`
author Goffi <goffi@goffi.org>
date Wed, 02 Oct 2024 17:23:03 +0200
parents e9f0a4215e46
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
119
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
1 {% extends 'base/base.html' %}
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
2
149
e5ec33c4a8a8 forum/overview.html: classes modification + better global design
Goffi <goffi@goffi.org>
parents: 147
diff changeset
3 {% macro generate_forums(forums_data, level=0) %}
e5ec33c4a8a8 forum/overview.html: classes modification + better global design
Goffi <goffi@goffi.org>
parents: 147
diff changeset
4 {% set panel_type = "main" if level==0 else "sub" %}
e5ec33c4a8a8 forum/overview.html: classes modification + better global design
Goffi <goffi@goffi.org>
parents: 147
diff changeset
5 <ul class="forum forum__panel_{{panel_type}}">
119
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
6 {% for forum in forums_data %}
149
e5ec33c4a8a8 forum/overview.html: classes modification + better global design
Goffi <goffi@goffi.org>
parents: 147
diff changeset
7 <li class="forum forum__cat_{{panel_type}} forum__level_{{level}}">
119
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
8 {% if 'http_url' in forum %}
149
e5ec33c4a8a8 forum/overview.html: classes modification + better global design
Goffi <goffi@goffi.org>
parents: 147
diff changeset
9 <a href="{{forum['http_url']}}" class="forum_active">
119
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
10 {% else %}
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
11 <a>
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
12 {% endif %}
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
13 <span class="forum_title">{{ forum.title }}</span>
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
14 {% if 'short-desc' in forum %}
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
15 <p class="forum_short-desc">{{ forum['short-desc'] }}</p>
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
16 {% endif %}
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
17 </a>
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
18
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
19 {% if 'sub-forums' in forum %}
149
e5ec33c4a8a8 forum/overview.html: classes modification + better global design
Goffi <goffi@goffi.org>
parents: 147
diff changeset
20 {{ generate_forums(forum['sub-forums'], level=level+1) }}
119
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
21 {% endif %}
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
22 </li>
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
23 {% endfor %}
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
24 </ul>
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
25 {% endmacro %}
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
26
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
27 {% block body %}
137
efbf5423d7be forum(overview): display a message if no forums are available on the server
Goffi <goffi@goffi.org>
parents: 119
diff changeset
28 {% if not forums %}
efbf5423d7be forum(overview): display a message if no forums are available on the server
Goffi <goffi@goffi.org>
parents: 119
diff changeset
29 <p class="message--info">{% trans %}No forums found on this server!{% endtrans %}</p>
efbf5423d7be forum(overview): display a message if no forums are available on the server
Goffi <goffi@goffi.org>
parents: 119
diff changeset
30 {% else %}
149
e5ec33c4a8a8 forum/overview.html: classes modification + better global design
Goffi <goffi@goffi.org>
parents: 147
diff changeset
31 <div class="forums">
137
efbf5423d7be forum(overview): display a message if no forums are available on the server
Goffi <goffi@goffi.org>
parents: 119
diff changeset
32 {{ generate_forums(forums) }}
efbf5423d7be forum(overview): display a message if no forums are available on the server
Goffi <goffi@goffi.org>
parents: 119
diff changeset
33 </div>
efbf5423d7be forum(overview): display a message if no forums are available on the server
Goffi <goffi@goffi.org>
parents: 119
diff changeset
34 {% endif %}
119
b085ede4d9af forum/overview: forum template first draft.
Goffi <goffi@goffi.org>
parents:
diff changeset
35 {% endblock body %}