]> git.parisson.com Git - mezzo.git/commitdiff
Add new footer menus (vertical and horizontal)
authorJérémy Fabre <blackmagik88@gmail.com>
Wed, 27 Jul 2016 14:02:48 +0000 (16:02 +0200)
committerJérémy Fabre <blackmagik88@gmail.com>
Wed, 27 Jul 2016 14:02:48 +0000 (16:02 +0200)
app/settings.py
app/static/src/sass/modules/navs/_nav-footer.scss
app/templates/base.html
app/templates/pages/menus/footer.html [deleted file]
app/templates/pages/menus/footer_horizontal.html [new file with mode: 0644]
app/templates/pages/menus/footer_vertical.html [new file with mode: 0644]

index 3e5c2f69332a05118b24aff00c981d1516902358..f491c1c78f02c83cd5161bad06ac49e009ca44ef 100644 (file)
@@ -44,8 +44,8 @@ from django.utils.translation import ugettext_lazy as _
 PAGE_MENU_TEMPLATES = (
     (1, _("Action"), "pages/menus/action.html"),
     (2, _("Departement"), "pages/menus/header.html"),
-    (3, _("Footer vertical"), "pages/menus/footer.html"),
-    (4, _("Footer horizontal"), "pages/menus/footer.html"),
+    (3, _("Footer vertical"), "pages/menus/footer_vertical.html"),
+    (4, _("Footer horizontal"), "pages/menus/footer_horizontal.html"),
 )
 
 # A sequence of fields that will be injected into Mezzanine's (or any
index ee1cb03ea6c654d011634fc7b28a1f5c8b2ea779..5b9d0e147996b97cf4c847f16deddc761c7788ce 100644 (file)
@@ -6,11 +6,28 @@ $module: ".nav-footer";
     margin: 0;
     padding: 0;
 
+    &--horizontal {
+
+        #{$module}__item {
+
+            display: inline-block;
+            @include margin-right(2);
+
+        }
+
+        #{$module}__item-link {
+
+            @include font-size(s);
+
+        }
+
+    }
+
     &__item-link {
         @include font-size(m);
         @include typeface(sans-serif);
         font-weight: weight(regular);
         color: white;
     }
-    
+
 }
index b8687dca970096d856ef52d8da950fee51271438..060cea21b8a041ab656dd15f8b329c3816b1c76a 100644 (file)
 
                     <div class="col-xs-4 col-sm-3 col-sm-push-1 tal">
 
-                        {% page_menu "pages/menus/footer.html" %}
+                        {% page_menu "pages/menus/footer_vertical.html" %}
 
                     </div>
 
 
                 </div>
 
+                <div class="row">
+
+                    <div class="col-sm-10 col-sm-push-1">
+
+                        {% page_menu "pages/menus/footer_horizontal.html" %}
+
+                    </div>
+
+                </div>
+
             </div>
 
         </div>
diff --git a/app/templates/pages/menus/footer.html b/app/templates/pages/menus/footer.html
deleted file mode 100644 (file)
index 44ad406..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-{% load i18n pages_tags staticfiles %}
-{% get_language_info_list for LANGUAGES as languages %}
-
-{% spaceless %}
-{% if page_branch_in_menu %}
-    {% for page in page_branch %}
-        {% if page.is_primary %}
-            {% if forloop.first %}
-                <ul class="nav-footer" role="navigation">
-            {% endif %}
-        {% endif %}
-        {% if page.in_menu %}
-            <li class="nav-footer__item {% if page.is_current_or_ascendant %}active{% endif %}">
-                <a class="nav-footer__item-link" href="{{ page.get_absolute_url }}" title="{{ page.title }}">{{ page.title }}</a>
-
-        {% endif %}
-        {% if page.has_children_in_menu and not forloop.first %}
-            {% page_menu page "pages/menus/header_tree.html" %}
-        {% endif %}
-            </li>
-        {% if page.is_primary %}
-            {% if forloop.last %}
-                </ul>
-            {% endif %}
-        {% endif %}
-    {% endfor %}
-{% endif %}
-{% endspaceless %}
diff --git a/app/templates/pages/menus/footer_horizontal.html b/app/templates/pages/menus/footer_horizontal.html
new file mode 100644 (file)
index 0000000..b80c63d
--- /dev/null
@@ -0,0 +1,25 @@
+{% load i18n pages_tags staticfiles %}
+{% get_language_info_list for LANGUAGES as languages %}
+
+{% spaceless %}
+{% if page_branch_in_menu %}
+    {% for page in page_branch %}
+        {% if page.is_primary %}
+            {% if forloop.first %}
+                <ul class="nav-footer nav-footer--horizontal" role="navigation">
+            {% endif %}
+        {% endif %}
+        {% if page.in_menu %}
+            <li class="nav-footer__item {% if page.is_current_or_ascendant %}active{% endif %}">
+                <a class="nav-footer__item-link" href="{{ page.get_absolute_url }}" title="{{ page.title }}">{{ page.title }}</a>
+
+        {% endif %}
+            </li>
+        {% if page.is_primary %}
+            {% if forloop.last %}
+                </ul>
+            {% endif %}
+        {% endif %}
+    {% endfor %}
+{% endif %}
+{% endspaceless %}
diff --git a/app/templates/pages/menus/footer_vertical.html b/app/templates/pages/menus/footer_vertical.html
new file mode 100644 (file)
index 0000000..2f58e8f
--- /dev/null
@@ -0,0 +1,25 @@
+{% load i18n pages_tags staticfiles %}
+{% get_language_info_list for LANGUAGES as languages %}
+
+{% spaceless %}
+{% if page_branch_in_menu %}
+    {% for page in page_branch %}
+        {% if page.is_primary %}
+            {% if forloop.first %}
+                <ul class="nav-footer" role="navigation">
+            {% endif %}
+        {% endif %}
+        {% if page.in_menu %}
+            <li class="nav-footer__item {% if page.is_current_or_ascendant %}active{% endif %}">
+                <a class="nav-footer__item-link" href="{{ page.get_absolute_url }}" title="{{ page.title }}">{{ page.title }}</a>
+
+        {% endif %}
+            </li>
+        {% if page.is_primary %}
+            {% if forloop.last %}
+                </ul>
+            {% endif %}
+        {% endif %}
+    {% endfor %}
+{% endif %}
+{% endspaceless %}