From 0f88216c78809eb44e8a9d3f7be895dd67ece846 Mon Sep 17 00:00:00 2001 From: Mathieu Pillard Date: Thu, 23 Jun 2016 16:15:36 +0200 Subject: [PATCH] Remove django-moz-header entirely We were not using it for much anymore, only a couple css rules and a few lines in templates. --- requirements/prod_without_hash.txt | 1 - src/olympia/lib/settings_base.py | 8 ----- src/olympia/templates/amo_footer.html | 21 ----------- src/olympia/templates/amo_footer_small.html | 7 ---- src/olympia/templates/copyright.html | 39 ++++++++++++++++----- src/olympia/templates/footer.html | 20 ++++++++++- src/olympia/templates/menu_links.html | 35 ------------------ static/css/moz_header/footer.css | 1 + static/css/restyle/restyle.less | 14 +++++++- 9 files changed, 64 insertions(+), 82 deletions(-) delete mode 100644 src/olympia/templates/amo_footer.html delete mode 100644 src/olympia/templates/amo_footer_small.html delete mode 100644 src/olympia/templates/menu_links.html create mode 100644 static/css/moz_header/footer.css diff --git a/requirements/prod_without_hash.txt b/requirements/prod_without_hash.txt index 35a73a5b9c..ce866aba9f 100644 --- a/requirements/prod_without_hash.txt +++ b/requirements/prod_without_hash.txt @@ -1,6 +1,5 @@ # Temporary fork. -e git+https://github.com/yohanboniface/jingo-minify.git@amo.2014.09.03#egg=jingo_minify --e git+https://github.com/mozilla/django-moz-header.git@djangoapp#egg=django-moz-header ## Forked. -e git+https://github.com/EnTeQuAk/django-cache-machine@1cac98a3e1dcc3cb654665cc67b6b15ab60d62c4#egg=django-cache-machine diff --git a/src/olympia/lib/settings_base.py b/src/olympia/lib/settings_base.py index 7cef51b626..9fe61288d1 100644 --- a/src/olympia/lib/settings_base.py +++ b/src/olympia/lib/settings_base.py @@ -410,7 +410,6 @@ INSTALLED_APPS = ( # Third party apps 'product_details', - 'moz_header', 'cronjobs', 'csp', 'aesfield', @@ -488,8 +487,6 @@ MINIFY_BUNDLES = { 'css/legacy/jquery-lightbox.css', 'css/legacy/autocomplete.css', 'css/zamboni/zamboni.css', - 'moz_header/header.css', - 'moz_header/footer.css', 'css/zamboni/tags.css', 'css/zamboni/tabs.css', 'css/impala/formset.less', @@ -505,8 +502,6 @@ MINIFY_BUNDLES = { 'css/legacy/jquery-lightbox.css', 'css/impala/site.less', 'css/impala/typography.less', - 'moz_header/header.css', - 'moz_header/footer.css', 'css/impala/forms.less', 'css/common/invisible-upload.less', 'css/impala/header.less', @@ -676,9 +671,6 @@ MINIFY_BUNDLES = { # Users 'js/zamboni/users.js', - # Hover delay for global header - 'moz_header/menu.js', - # Password length and strength 'js/zamboni/password-strength.js', diff --git a/src/olympia/templates/amo_footer.html b/src/olympia/templates/amo_footer.html deleted file mode 100644 index dc273e42cd..0000000000 --- a/src/olympia/templates/amo_footer.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "moz_header/footer.html" %} - -{% block copyright %} - {% block lang_form %} -
- - - {% for key, value in request.GET.items() %} - - {% endfor %} - -
- {% endblock %} - {% include 'copyright.html' %} -{% endblock %} diff --git a/src/olympia/templates/amo_footer_small.html b/src/olympia/templates/amo_footer_small.html deleted file mode 100644 index 3a646683b3..0000000000 --- a/src/olympia/templates/amo_footer_small.html +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/src/olympia/templates/copyright.html b/src/olympia/templates/copyright.html index ca9a6772b0..d348069f8e 100644 --- a/src/olympia/templates/copyright.html +++ b/src/olympia/templates/copyright.html @@ -1,8 +1,31 @@ -{% extends 'moz_header/copyright.html' %} - -{% block extra_footer_links %} - {% if not hide_mobile_link %} -  | {{ _('View Mobile Site') }} - {% endif %} -  | {{ _('Site Status')}} -{% endblock %} + diff --git a/src/olympia/templates/footer.html b/src/olympia/templates/footer.html index caa926e082..35a4af6c44 100644 --- a/src/olympia/templates/footer.html +++ b/src/olympia/templates/footer.html @@ -9,6 +9,24 @@ diff --git a/src/olympia/templates/menu_links.html b/src/olympia/templates/menu_links.html deleted file mode 100644 index fc225e916d..0000000000 --- a/src/olympia/templates/menu_links.html +++ /dev/null @@ -1,35 +0,0 @@ -{% extends "moz_header/menu_links.html" %} - -{% block amo_links %} -
  • {{ _('Add-ons') }} - -
  • -{% endblock %} - -{% block about_links %} -
  • {{ _('About') }} - -
  • -{% endblock %} diff --git a/static/css/moz_header/footer.css b/static/css/moz_header/footer.css new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/static/css/moz_header/footer.css @@ -0,0 +1 @@ + diff --git a/static/css/restyle/restyle.less b/static/css/restyle/restyle.less index e9fe2d1b4f..905040f71f 100644 --- a/static/css/restyle/restyle.less +++ b/static/css/restyle/restyle.less @@ -1112,15 +1112,27 @@ body:not(.developer-hub) section.secondary { } #footer #lang_form { - margin-top: 12px; + margin: 12px 0 15px 27px; label { color: @link-on-white-bg; + display: block; font-family: @primary-font; + font-size: 14px; + margin: 10px 0 4px; text-transform: none; } } +.html-rtl #footer #lang_form { + margin: 12px 27px 15px 0; +} + +#footer #copyright p { + font-size: 85%; + margin-bottom: 0.5em; +} + // Add-on Details Page #breadcrumbs { display: none;