From aaf38eb02812e47e9402eddb48d2948e3b8ea0a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Wed, 27 Jul 2016 16:02:48 +0200 Subject: [PATCH] Add new footer menus (vertical and horizontal) --- app/settings.py | 4 +-- .../src/sass/modules/navs/_nav-footer.scss | 19 +++++++++++++- app/templates/base.html | 12 ++++++++- .../pages/menus/footer_horizontal.html | 25 +++++++++++++++++++ .../{footer.html => footer_vertical.html} | 3 --- 5 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 app/templates/pages/menus/footer_horizontal.html rename app/templates/pages/menus/{footer.html => footer_vertical.html} (84%) diff --git a/app/settings.py b/app/settings.py index 3e5c2f69..f491c1c7 100644 --- a/app/settings.py +++ b/app/settings.py @@ -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 diff --git a/app/static/src/sass/modules/navs/_nav-footer.scss b/app/static/src/sass/modules/navs/_nav-footer.scss index ee1cb03e..5b9d0e14 100644 --- a/app/static/src/sass/modules/navs/_nav-footer.scss +++ b/app/static/src/sass/modules/navs/_nav-footer.scss @@ -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; } - + } diff --git a/app/templates/base.html b/app/templates/base.html index b8687dca..060cea21 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -197,7 +197,7 @@
- {% page_menu "pages/menus/footer.html" %} + {% page_menu "pages/menus/footer_vertical.html" %}
@@ -238,6 +238,16 @@ +
+ +
+ + {% page_menu "pages/menus/footer_horizontal.html" %} + +
+ +
+ diff --git a/app/templates/pages/menus/footer_horizontal.html b/app/templates/pages/menus/footer_horizontal.html new file mode 100644 index 00000000..b80c63dd --- /dev/null +++ b/app/templates/pages/menus/footer_horizontal.html @@ -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 %} + + {% endif %} + {% endif %} + {% endfor %} +{% endif %} +{% endspaceless %} diff --git a/app/templates/pages/menus/footer.html b/app/templates/pages/menus/footer_vertical.html similarity index 84% rename from app/templates/pages/menus/footer.html rename to app/templates/pages/menus/footer_vertical.html index 44ad4060..2f58e8ff 100644 --- a/app/templates/pages/menus/footer.html +++ b/app/templates/pages/menus/footer_vertical.html @@ -13,9 +13,6 @@ {% if page.is_primary %} -- 2.39.5