From 72acde7122a79c5a68a9e9ec1e3885a6f2d443a2 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Wed, 31 Jul 2019 00:07:29 +0200 Subject: [PATCH] Add footer with links --- ihatemoney/static/css/main.css | 112 ++++++++-- ihatemoney/static/images/book.svg | 1 + ihatemoney/static/images/cog.svg | 1 + ihatemoney/static/images/github.svg | 1 + ihatemoney/static/images/mobile-alt.svg | 1 + ihatemoney/static/images/plus.svg | 1 + ihatemoney/templates/layout.html | 191 ++++++++++-------- .../templates/sidebar_table_layout.html | 2 +- 8 files changed, 211 insertions(+), 99 deletions(-) create mode 100644 ihatemoney/static/images/book.svg create mode 100644 ihatemoney/static/images/cog.svg create mode 100644 ihatemoney/static/images/github.svg create mode 100644 ihatemoney/static/images/mobile-alt.svg create mode 100644 ihatemoney/static/images/plus.svg diff --git a/ihatemoney/static/css/main.css b/ihatemoney/static/css/main.css index 47ede778..73ea5136 100644 --- a/ihatemoney/static/css/main.css +++ b/ihatemoney/static/css/main.css @@ -7,7 +7,6 @@ body { /* For fixed navbar */ padding-top: 3.5rem; - padding-bottom: 2rem; } /* Navbar */ @@ -130,16 +129,91 @@ body { } footer { - margin-left: -15px; - margin-right: -15px; - margin-top: 30px; - position: fixed; - bottom: 0px; - height: 2em; width: 100%; + font: normal 16px sans-serif; + padding: 45px 50px; +} + +@media (min-width: 768px) { + footer { + padding-left: calc(25% + 50px); + } +} + +footer .footer-limiter { + max-width: 880px; + margin: 0 auto; +} + +footer .footer-left p { + color: #8f9296; + font-size: 14px; + margin: 0; +} + +/* Footer links */ +footer p.footer-links { + font-size: 18px; + font-weight: bold; + color: #ffffff; + margin: 0 0 10px; + padding: 0; +} + +footer p.footer-links a { + display: inline-block; + line-height: 1.8; + text-decoration: none; + color: inherit; +} + +footer .footer-right { + float: right; + margin-top: 6px; + max-width: 180px; +} + +footer .footer-right a { + display: inline-block; + width: 35px; + height: 35px; + background-color: #33383b; + border-radius: 2px; + + font-size: 20px; + color: #ffffff; text-align: center; - background-color: #fff; - opacity: 0.8; + line-height: 35px; + + margin-left: 3px; + border-radius: 50%; + opacity: 0.5; +} +footer .footer-right a:hover { + opacity: 1; +} + +footer .footer-left { + padding-top: 6px; + line-height: 35px; +} + +/* If you don't want the footer to be responsive, remove these media queries */ + +@media (max-width: 600px) { + footer .footer-left, + footer .footer-right { + text-align: center; + } + + footer .footer-right { + float: none; + margin: 0 auto 20px; + } + + footer .footer-left p.footer-links { + line-height: 1.8; + } } .identifier { @@ -330,14 +404,22 @@ tr:hover .extra-info { } .globe-europe svg { - display: inline-block; - border-bottom: 0.2em solid transparent; - height: 1.2em; - fill: rgba(255,255,255,.5) + fill: rgba(255, 255, 255, 0.5); } .navbar-nav .dropdown-toggle:hover .globe-europe svg { - fill: rgba(255,255,255,.75); + fill: rgba(255, 255, 255, 0.75); } .navbar-dark .navbar-nav .show > .nav-link svg { fill: white; -} \ No newline at end of file +} +.icon svg { + display: inline-block; + border-bottom: 0.2em solid transparent; + height: 1.2em; +} +.icon.plus svg { + margin-right: 3px; +} +footer .icon svg { + fill: white; +} diff --git a/ihatemoney/static/images/book.svg b/ihatemoney/static/images/book.svg new file mode 100644 index 00000000..d27fdae7 --- /dev/null +++ b/ihatemoney/static/images/book.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ihatemoney/static/images/cog.svg b/ihatemoney/static/images/cog.svg new file mode 100644 index 00000000..fb5bd35a --- /dev/null +++ b/ihatemoney/static/images/cog.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ihatemoney/static/images/github.svg b/ihatemoney/static/images/github.svg new file mode 100644 index 00000000..7870c06d --- /dev/null +++ b/ihatemoney/static/images/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ihatemoney/static/images/mobile-alt.svg b/ihatemoney/static/images/mobile-alt.svg new file mode 100644 index 00000000..e8084596 --- /dev/null +++ b/ihatemoney/static/images/mobile-alt.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ihatemoney/static/images/plus.svg b/ihatemoney/static/images/plus.svg new file mode 100644 index 00000000..95992e1f --- /dev/null +++ b/ihatemoney/static/images/plus.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ihatemoney/templates/layout.html b/ihatemoney/templates/layout.html index 10bb6281..5f61949c 100644 --- a/ihatemoney/templates/layout.html +++ b/ihatemoney/templates/layout.html @@ -1,6 +1,6 @@ {% import "forms.html" as forms %} - + {{ _("Account manager") }}{% block title %}{% endblock %} @@ -26,100 +26,125 @@ }); - -
-
+ - - +
+ {% block body %} +
+ {% block content %}{% endblock %} +
+ {% endblock %}
-
-{% block body %} -
- {% block content %}{% endblock %} -
-
-{% endblock %} +
+ {% for message in get_flashed_messages() %} +
{{ message }}
+ {% endfor %} +
-
- {% for message in get_flashed_messages() %} -
{{ message }}
- {% endfor %} -
+ {% block footer %} + + {% endblock %} diff --git a/ihatemoney/templates/sidebar_table_layout.html b/ihatemoney/templates/sidebar_table_layout.html index 239acb3b..9d588a31 100644 --- a/ihatemoney/templates/sidebar_table_layout.html +++ b/ihatemoney/templates/sidebar_table_layout.html @@ -1,7 +1,7 @@ {% extends "layout.html" %} {% block body %} -
+