From bebeff9f7fce2e06ba2d4756e3f8063f029780b8 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 13 Sep 2020 17:52:33 +0200 Subject: [PATCH] root: allow for changing of logo and branding --- passbook/core/templates/base/page.html | 6 ++++-- passbook/core/templates/base/skeleton.html | 2 +- passbook/core/templates/login/base_full.html | 13 +++++++++++-- passbook/lib/default.yml | 4 ++++ .../templates/stages/email/for_email/base.html | 2 +- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/passbook/core/templates/base/page.html b/passbook/core/templates/base/page.html index 1e4e48978..d66ae5955 100644 --- a/passbook/core/templates/base/page.html +++ b/passbook/core/templates/base/page.html @@ -21,8 +21,10 @@
- passbook icon - passbook + passbook icon + {% if config.passbook.branding.title_show %} + {{ config.passbook.branding.title }} + {% endif %}
diff --git a/passbook/core/templates/base/skeleton.html b/passbook/core/templates/base/skeleton.html index 0ba0c1796..303dbffd7 100644 --- a/passbook/core/templates/base/skeleton.html +++ b/passbook/core/templates/base/skeleton.html @@ -10,7 +10,7 @@ - {% block title %}{% trans title|default:"passbook" %}{% endblock %} + {% block title %}{% trans title|default:config.passbook.branding.title %}{% endblock %} diff --git a/passbook/core/templates/login/base_full.html b/passbook/core/templates/login/base_full.html index 1f5a84d85..c2638a503 100644 --- a/passbook/core/templates/login/base_full.html +++ b/passbook/core/templates/login/base_full.html @@ -23,8 +23,10 @@
{% block main_container %} @@ -49,6 +51,13 @@ {{ link.name }} {% endfor %} + {% if config.passbook.branding.title != "passbook" %} +
  • + + {% trans 'Powered by passbook' %} + +
  • + {% endif %}
    diff --git a/passbook/lib/default.yml b/passbook/lib/default.yml index 77ff78a58..0caab8ac3 100644 --- a/passbook/lib/default.yml +++ b/passbook/lib/default.yml @@ -21,6 +21,10 @@ error_reporting: send_pii: false passbook: + branding: + title: passbook + title_show: true + logo: static/passbook/brand.svg # Optionally add links to the footer on the login page footer_links: - name: Documentation diff --git a/passbook/stages/email/templates/stages/email/for_email/base.html b/passbook/stages/email/templates/stages/email/for_email/base.html index 996f22e58..08d2e9913 100644 --- a/passbook/stages/email/templates/stages/email/for_email/base.html +++ b/passbook/stages/email/templates/stages/email/for_email/base.html @@ -26,7 +26,7 @@ - +