Browse Source

lang sull'header

pero' si vede male
boyska 6 years ago
parent
commit
dc44e9c94d

+ 4 - 1
themes/hackit0x15/static/css/hackit.css

@@ -25,9 +25,12 @@ body {
     list-style: none;
     color: #fff;
     background: #9c2f2f;
-    font-size: 2em;
     margin-top: -60px;
 }
+.header-ul-menu .header-menu {
+    font-size: 2em;
+}
+
 /*fine banner*/
 
 .navbar::after,

+ 10 - 5
themes/hackit0x15/templates/includes/banner.html

@@ -1,11 +1,16 @@
 <div class="banner">
-    
+
 <header id="header">
     <ul class="header-ul-menu">
       <li class="header-menu"><a class="brand-title" href="index.html">{{ SITENAME }}</a></li>
-      <li style="float:right;padding-right:5px;" class="header-menu">
-         lingue - en
-      </li>
+      {% block languages %}
+          {% if page %}
+              {% import 'includes/translations.html' as translations with context %}
+              <li style="float:right;padding-right:5px;color:blue;">
+                  {{ translations.translations_for(page,label=False) }}
+              </li>
+          {% endif %}
+      {% endblock languages %}
     </ul>
 </header>
     
@@ -13,4 +18,4 @@
     <img src="{{ SITEURL }}/{{THEME_STATIC_DIR}}/{{ SITELOGO }}" width="{{ SITELOGO_SIZE }}"/> {% endif %}
 
 
-    </div>
+    </div>

+ 13 - 3
themes/hackit0x15/templates/includes/translations.html

@@ -1,8 +1,18 @@
-{% macro translations_for(article) %}
+{% macro translations_for(article, label=True) %}
 {% if article.translations %}
-<span class="label label-default">Lang</span>
+    {% if label %}
+        <span class="label label-default">Lang</span>
+    {% endif %}
 {% for translation in article.translations %}
 	<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
 {% endfor %}
 {% endif %}
-{% endmacro %}
+{% endmacro %}
+
+{% macro translations_li(article) %}
+{% if article.translations %}
+{% for translation in article.translations %}
+    <li><a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a></li>
+{% endfor %}
+{% endif %}
+{% endmacro %}

+ 0 - 2
themes/hackit0x15/templates/page.html

@@ -46,8 +46,6 @@
 
 {% block content %}
     <section id="content" class="body body-{{page.slug}}">
-        {% import 'includes/translations.html' as translations with context %}
-        {{ translations.translations_for(page) }}
         {% if PDF_PROCESSOR %}
             <a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf">
                 get the pdf