annotate sat_templates/templates/default/forum/view_topics.html @ 166:178f55b825b7

small refactoring/redesign, better BEM integration: - blog has been redesigned, and almost all blog CSS has been made generic and moved to main styles.css file. - better noscript handling, dynamic elements are created using "magic" classes (dom_update.js) - using better icons for older/newer messages - better state handling, classes now use "state_XXX" - more classes now use BEM convention - menu labels have been moved to a separate template (components/menu_labels.html), so it can be overriden easily by other sites - better styles.css organisation
author Goffi <goffi@goffi.org>
date Wed, 03 Oct 2018 21:00:24 +0200
parents e9f0a4215e46
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
120
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
1 {% if not embedded %}{% extends 'base/base.html' %}{% endif %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
2 {% import 'input/field.html' as field with context%}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
3 {% import 'input/textbox.html' as textbox with context %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
4 {% import 'input/navigation.html' as navigation with context %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
5 {% import 'components/avatar.html' as avatar with context %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
6
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
7 {% block body %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
8
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
9 {% if not topics %}
128
4f27ce980ced css: started to refactor CSS class to follow BEM conventions
Goffi <goffi@goffi.org>
parents: 120
diff changeset
10 <div class="message--info">
120
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
11 {% trans %}There is not message yet in this forum.{% endtrans %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
12 {% if profile %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
13 {% trans %}You can start a topic of interest by filling this form.{% endtrans %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
14 {% else %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
15 {% trans %}You can login to create a new topic.{% endtrans %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
16 {% endif %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
17 </div>
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
18 {% endif %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
19 {% if profile %}
133
0a0d9a953d98 css: some more refactoring
Goffi <goffi@goffi.org>
parents: 128
diff changeset
20 <div class="forum__topic_create">
120
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
21 {% call textbox.textbox(service, node, placeholder=_("Your message"), submit_label=_("Create topic"), type="new_topic") %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
22 {{ field.text("title", placeholder=_("Your topic (try to be short and explicit)"), required=True) }}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
23 {% endcall %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
24 </div>
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
25 {% endif %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
26
133
0a0d9a953d98 css: some more refactoring
Goffi <goffi@goffi.org>
parents: 128
diff changeset
27 <div class="forum__topics">
120
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
28 {% for topic in topics %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
29 <div>
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
30 <a href="{{topic.http_uri}}">
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
31 {{ avatar.avatar(topic.author) }}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
32 {{topic.title}}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
33 </a>
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
34 </div>
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
35 {% endfor %}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
36 </div>
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
37
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
38 {{ navigation.prev_next(_("older topics"), _("newer topics")) }}
5f4e147e9895 forum/topic: topic generation page
Goffi <goffi@goffi.org>
parents:
diff changeset
39 {% endblock body %}