]> git.parisson.com Git - mezzo.git/commitdiff
Language selector in banner navigation
authorPhilippe Barbosa <contact@philippebarbosa.com>
Fri, 4 Mar 2016 10:21:36 +0000 (11:21 +0100)
committerPhilippe Barbosa <contact@philippebarbosa.com>
Fri, 4 Mar 2016 10:21:36 +0000 (11:21 +0100)
app/festival/static/css/index.css
app/festival/static/scss/base/_forms.scss
app/templates/base.html
app/templates/includes/language_selector.html
app/templates/pages/menus/dropdown.html

index 90a9f934b7ed746a81e4abe23b77413085a2d172..f45b9e652d017874580aef0587b6690a70e57d8c 100755 (executable)
@@ -1170,6 +1170,23 @@ button:disabled {
   opacity: 0.5;
 }
 
+/* line 272, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/base/_forms.scss */
+button.lang {
+  display: inline-block;
+  padding: 0.5rem 0.3rem;
+  margin: 0 auto;
+  color: #bdc3c7;
+  font: 400 0.9rem "Interstate", "Helvetica Neue", Helvetica, Arial, sans-serif;
+  text-transform: uppercase;
+  background: none;
+}
+
+/* line 280, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/base/_forms.scss */
+button.lang.is-active {
+  background: none;
+  color: #e8ca88;
+}
+
 /**
  * Core styles
  */
index d317e15126cbf0f62b41c42b2070fe9f5958965d..6ae1fa6cb885cd9272b76933e6d5f24f8e8dc96e 100755 (executable)
@@ -266,4 +266,19 @@ button {
     cursor: not-allowed;
     opacity: 0.5;
   }
+}
+
+// button as link for lang selector
+button.lang {
+    display: inline-block;
+    padding: $base_font_size/2 0.3rem;
+    margin: 0 auto;
+    color: $gray;
+    font: $regular .9rem $header_font_family;
+    text-transform: uppercase;
+    background: none;
+    &.is-active {
+      background: none;
+      color: $main_color;
+    }
 }
\ No newline at end of file
index 703b541b4259358db6aca2b92fc015c7508b9877..94200a848d317e7906cd58766d99513cf2deac6e 100644 (file)
@@ -35,7 +35,9 @@
                     </a>
                 </h1>
                     <div class="header__logo--right">
-                        <img class="header__logo__img" src="{% static "img/logo_ircam_black.png" %}" alt="Logo Manifeste 2016 ircam" width="200">
+                        <a href="http://ircam.fr" title="Url site ircam">
+                            <img class="header__logo__img" src="{% static "img/logo_ircam_black.png" %}" alt="Logo Manifeste 2016 ircam" width="200">
+                        </a>
                     </div>
                 {% endif %}
 
index a91158f75a38ec0384e9a092b987979fd5481804..e159769026c7b4935b73c54b486cbcfd58ef6254 100644 (file)
@@ -17,9 +17,7 @@
     <input type="submit" class="btn btn-default" value="{% trans "Change" %}" />
   </form>
   {% for language in languages %}
-  <a href="#" onclick="$('#language_selector_select').val('{{ language.code }}'); $('#language_selector_form').submit();">
-  <button class="lang {% if language.code == LANGUAGE_CODE %}active{% endif %}">{{ language.code|title }}</button>
-  </a>
+    <button class="lang {% if language.code == LANGUAGE_CODE %}active{% endif %}" onclick="$('#language_selector_select').val('{{ language.code }}'); $('#language_selector_form').submit();">{{ language.code|title }}</button>
   {% endfor %}
 </div>
 {% endif %}
index 2f5b75e53c27958c9a9b0a52349af41a5bc4e922..88170782ac86b7ea61f6f3b346fc41cdea7a27c2 100644 (file)
@@ -1,10 +1,10 @@
 {% load i18n pages_tags %}
-
+{% get_language_info_list for LANGUAGES as languages %}
 {% spaceless %}
 {% if page_branch_in_menu %}
 
 {% if branch_level == 0 %}
-<ul class="menu">
+<ul class="menu toto">
     {% for page in page_branch %}
     {% if not has_home and page.is_primary and forloop.first %}
     <li class="menu__item {% if on_home %}active{% endif %}">
     </li>
     {% endif %}
     {% endfor %}
+    {% if settings.USE_MODELTRANSLATION and languages|length > 1 %}
+    <li class="menu__item  menu__item--lang">
+      {% for language in languages %}
+        <button class="lang {% if language.code == LANGUAGE_CODE %}is-active{% endif %}" onclick="$('#language_selector_select').val('{{ language.code }}'); $('#language_selector_form').submit();">
+          {{ language.code|title }}
+        </button>
+      {% endfor %}
+    </li>
+    {% endif %}
 </ul>
 
 {% else %}