Mercurial > libervia-templates
comparison default/blog/articles.html @ 43:f8798d691acf
blog/articles: fixed comments transition:
- as for blog articles, removed max-height workaround in favor of clicked_mh_fix function
- changed show to hide in button when comments are expanded
- reduced transition time
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 13 Jul 2017 08:41:07 +0200 |
parents | f371bc50ea45 |
children | f19e9f5e43b0 |
comparison
equal
deleted
inserted
replaced
42:0c6aa1c81252 | 43:f8798d691acf |
---|---|
9 {% include 'blog/item.html' %} | 9 {% include 'blog/item.html' %} |
10 {% if not comments %}</div>{% endif %} | 10 {% if not comments %}</div>{% endif %} |
11 | 11 |
12 {# we recursively display comments for all comments nodes (usually there's only one) #} | 12 {# we recursively display comments for all comments nodes (usually there's only one) #} |
13 {% for comments_items in item.comments_items_list %} | 13 {% for comments_items in item.comments_items_list %} |
14 <button class="comments_btn" onclick="document.getElementById('{{comments_panel|next_gidx}}').classList.toggle('show')">{% trans %}show comments{% endtrans %} ({{comments_items|count}})</button> | 14 <button class="comments_btn" onclick="clicked_mh_fix('{{comments_panel|next_gidx}}');clicked_cls(this)"> |
15 <span class='show'>{% trans %}show comments{% endtrans %}</span> | |
16 <span class='hide'>{% trans %}hide comments{% endtrans %}</span> | |
17 ({{comments_items|count}}) | |
18 </button> | |
15 <div id="{{comments_panel|cur_gidx}}" class="comments_panel"> | 19 <div id="{{comments_panel|cur_gidx}}" class="comments_panel"> |
16 {% if allow_commenting %} | 20 {% if allow_commenting %} |
17 <div class="comment_post"> | 21 <div class="comment_post"> |
18 {{ comment.comment(service=comments_items.service, node=comments_items.node) }} | 22 {{ comment.comment(service=comments_items.service, node=comments_items.node) }} |
19 </div> | 23 </div> |