From ec84acacdcb7dd385ef8c76cad07388ec076382a Mon Sep 17 00:00:00 2001 From: Jessica Tallon Date: Tue, 30 Sep 2014 11:23:24 +0100 Subject: [PATCH] Fix #952 - Force the footer to the bottom of the page --- mediagoblin/static/css/base.css | 21 +- mediagoblin/templates/mediagoblin/base.html | 244 ++++++++++---------- 2 files changed, 142 insertions(+), 123 deletions(-) diff --git a/mediagoblin/static/css/base.css b/mediagoblin/static/css/base.css index 0bd58738..f9d90df1 100644 --- a/mediagoblin/static/css/base.css +++ b/mediagoblin/static/css/base.css @@ -25,7 +25,7 @@ src: local('Lato Regular'), local('Lato-Regular'), url('../fonts/Lato-Regular.ttf') format('truetype'); } -body { +html, body { background-color: #161616; color: #C3C3C3; padding: 0; @@ -110,6 +110,23 @@ input, textarea { /* website structure */ +#wrap { + min-height: 100%; + height: auto; + + /* This must be equal to the footer height + 5px */ + margin-bottom: -35px; +} + +#wrap:after { + content: ""; + display: block; +} + +footer, #wrap:after { + height: 30px; +} + header { width: 100%; padding: 0; @@ -176,9 +193,7 @@ a.logo { footer { width: 100%; - height: 30px; border-top: 1px solid #333; - bottom: 0px; padding: 8px 0; text-align: center; font-size: 0.875em; diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index 13cfb47b..16a0d4f6 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -62,138 +62,142 @@ {% include 'mediagoblin/bits/body_start.html' %} {% block mediagoblin_body %} - {% block mediagoblin_header %} -
-
-
-
- {%- include "mediagoblin/bits/logo.html" -%} - {% block mediagoblin_header_title %}{% endblock %} -
-
- {%- if request.user %} - {% if request.user and - request.user.has_privilege('active') and - not request.user.is_banned() %} +
+ {% block mediagoblin_header %} +
+
+
+
+ {%- include "mediagoblin/bits/logo.html" -%} + {% block mediagoblin_header_title %}{% endblock %} +
+
+ {%- if request.user %} + {% if request.user and + request.user.has_privilege('active') and + not request.user.is_banned() %} - {% set notification_count = get_notification_count(request.user.id) %} - {% if notification_count %} + {% set notification_count = get_notification_count(request.user.id) %} + {% if notification_count %} + + {{ notification_count }} + {% endif %} - {{ notification_count }} + class="button_action header_dropdown_down" + aria-controls="header_dropdown">▼ + + {% elif request.user and not request.user.has_privilege('active') %} + {# the following link should only appear when verification is needed #} + + {% trans %}Verify your email!{% endtrans %} + or {% trans %}log out{% endtrans %} + {% elif request.user and request.user.is_banned() %} + {% trans %}log out{% endtrans %} + {% endif %} + {%- elif auth %} + - - {% elif request.user and not request.user.has_privilege('active') %} - {# the following link should only appear when verification is needed #} - - {% trans %}Verify your email!{% endtrans %} - or {% trans %}log out{% endtrans %} - {% elif request.user and request.user.is_banned() %} - {% trans %}log out{% endtrans %} - {% endif %} - {%- elif auth %} - - {%- trans %}Log in{% endtrans -%} - - {%- endif %} -
-
- {% if request.user and request.user.has_privilege('active') %} -
-

- - {% trans user_url=request.urlgen('mediagoblin.user_pages.user_home', - user=request.user.username), - user_name=request.user.username -%} - {{ user_name }}'s account - {%- endtrans %} - - · - {%- trans %}Change account settings{% endtrans -%} - · - - {%- trans %}Media processing panel{% endtrans -%} + > + {%- trans %}Log in{% endtrans -%} - · - {% template_hook("blog_dashboard_home") %} - {% trans %}Log out{% endtrans %} -

- - {%- trans %}Add media{% endtrans -%} - - - {%- trans %}Create new collection{% endtrans -%} - - {% template_hook("header_dropdown_buttons") %} - {% if request.user.has_privilege('moderator') %} + {%- endif %} +
+
+ {% if request.user and request.user.has_privilege('active') %} +

- {% trans %}Moderation powers:{% endtrans %} - - {%- trans %}Media processing panel{% endtrans -%} - + + {% trans user_url=request.urlgen('mediagoblin.user_pages.user_home', + user=request.user.username), + user_name=request.user.username -%} + {{ user_name }}'s account + {%- endtrans %} + · - - {%- trans %}User management panel{% endtrans -%} - + {%- trans %}Change account settings{% endtrans -%} · - - {%- trans %}Report management panel{% endtrans -%} + + {%- trans %}Media processing panel{% endtrans -%} - {% template_hook("moderation_powers") %} + · + {% template_hook("blog_dashboard_home") %} + {% trans %}Log out{% endtrans %}

- {% endif %} - {% include 'mediagoblin/fragments/header_notifications.html' %} -
+ + {%- trans %}Add media{% endtrans -%} + + + {%- trans %}Create new collection{% endtrans -%} + + {% template_hook("header_dropdown_buttons") %} + {% if request.user.has_privilege('moderator') %} +

+ {% trans %}Moderation powers:{% endtrans %} + + {%- trans %}Media processing panel{% endtrans -%} + + · + + {%- trans %}User management panel{% endtrans -%} + + · + + {%- trans %}Report management panel{% endtrans -%} + + {% template_hook("moderation_powers") %} +

+ {% endif %} + {% include 'mediagoblin/fragments/header_notifications.html' %} +
+ {% endif %} +
+
+
+ {% endblock %} +
+ {% include 'mediagoblin/bits/above_content.html' %} +
+ {% include "mediagoblin/utils/messages.html" %} + {% block mediagoblin_content %} + {% endblock mediagoblin_content %} + {% if csrf_token is defined %} + {% template_hook("persona_form") %} {% endif %} -
- -
- {% endblock %} -
- {% include 'mediagoblin/bits/above_content.html' %} -
- {% include "mediagoblin/utils/messages.html" %} - {% block mediagoblin_content %} - {% endblock mediagoblin_content %} - {% if csrf_token is defined %} - {% template_hook("persona_form") %} - {% endif %} +
- {%- include "mediagoblin/bits/base_footer.html" %} +
+ {%- include "mediagoblin/bits/base_footer.html" %} +
{%- endblock mediagoblin_body %} {% include 'mediagoblin/bits/body_end.html' %} -- 2.25.1