From 5b35c3dd3becea6529f19c752703c6c8dc512613 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 31 Jul 2017 13:58:38 -0500 Subject: [PATCH] Make login template use same logo as home page --- tailbone/static/css/login.css | 2 +- tailbone/templates/login.mako | 2 +- tailbone/views/auth.py | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tailbone/static/css/login.css b/tailbone/static/css/login.css index 5786565a..2603f961 100644 --- a/tailbone/static/css/login.css +++ b/tailbone/static/css/login.css @@ -4,7 +4,7 @@ ******************************/ #logo { - margin: auto; + margin: 40px auto; } div.form { diff --git a/tailbone/templates/login.mako b/tailbone/templates/login.mako index f0b84c24..93d62ef8 100644 --- a/tailbone/templates/login.mako +++ b/tailbone/templates/login.mako @@ -14,7 +14,7 @@ <%def name="logo()"> - ${h.image(request.static_url('tailbone:static/img/home_logo.png'), "Rattail Logo", id='logo')} + ${h.image(image_url, "{} logo".format(capture(self.app_title)), id='logo', width=500)} <%def name="login_form()"> diff --git a/tailbone/views/auth.py b/tailbone/views/auth.py index 6f782501..1f7dabde 100644 --- a/tailbone/views/auth.py +++ b/tailbone/views/auth.py @@ -117,9 +117,14 @@ class AuthenticationView(View): else: self.request.session.flash("Invalid username or password", 'error') + image_url = self.rattail_config.get( + 'tailbone', 'main_image_url', + default=self.request.static_url('tailbone:static/img/home_logo.png')) + return { 'form': forms.FormRenderer(form), 'referrer': referrer, + 'image_url': image_url, 'dialog': mobile, }