[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [lego/master] Fix navbar language dropdown when there are no alts



commit 55784cf553a4dbac0ef1bb49e33be6d0b23c91f1
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date:   Tue Jun 25 17:10:10 2019 +0200

    Fix navbar language dropdown when there are no alts
---
 templates/navbar.html | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/templates/navbar.html b/templates/navbar.html
index 7514edc..0064779 100644
--- a/templates/navbar.html
+++ b/templates/navbar.html
@@ -37,25 +37,25 @@
   	{% endfor %}
         </ul>
       </div>
-      <div class="btn-group dropdown pull-right">
-        {% if this.color == 'primary' %}
-          <button type="button" class="btn btn-primary bg-primary dropdown-toggle btn-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
-        {% else %}
-          <button type="button" class="btn btn-dark bg-dark dropdown-toggle btn-block my-3 my-sm-0" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
-        {% endif %}
-        {{ bag('alternatives', this.alt, 'language') }}
-        </button>
-        <div class="dropdown-menu">
-          {% set alts = bag('alternatives').items() %}
-          {% if alts|length > 1 %}
+      {% set alts = bag('alternatives').items() %}
+      {% if alts|length > 1 %}
+        <div class="btn-group dropdown pull-right">
+          {% if this.color == 'primary' %}
+            <button type="button" class="btn btn-primary bg-primary dropdown-toggle btn-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+          {% else %}
+            <button type="button" class="btn btn-dark bg-dark dropdown-toggle btn-block my-3 my-sm-0" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+          {% endif %}
+          {{ bag('alternatives', this.alt, 'language') }}
+          </button>
+          <div class="dropdown-menu">
             {% for id, item in bag('alternatives').items() %}
               {% if this.alt != id %}
                 <a class="dropdown-item" href="{{ this.path|url(alt=id) }}">{{ item.language }}</a>
               {% endif %}
             {% endfor %}
-          {% endif %}
+          </div>
         </div>
-      </div>
+      {% endif %}
       {% set download = site.get('/download') %}
       <div class="pull-right">
         {% if download == None %}

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits