root: allow for changing of logo and branding

This commit is contained in:
Jens Langhammer 2020-09-13 17:52:33 +02:00
parent 8b99afa34d
commit bebeff9f7f
5 changed files with 21 additions and 6 deletions

View file

@ -21,8 +21,10 @@
</div> </div>
<a class="pf-c-page__header-brand-link"> <a class="pf-c-page__header-brand-link">
<div class="pf-c-brand pb-brand"> <div class="pf-c-brand pb-brand">
<img src="{% static 'passbook/logo.svg' %}" alt="passbook icon" /> <img src="{{ config.passbook.branding.logo }}" alt="passbook icon">
<small><small>passbook</small></small> {% if config.passbook.branding.title_show %}
<small><small>{{ config.passbook.branding.title }}</small></small>
{% endif %}
</div> </div>
</a> </a>
</div> </div>

View file

@ -10,7 +10,7 @@
<link rel="preload" href="{% static 'passbook/fonts/DINEngschriftStd.woff' %}" as="font" type="font/woff"> <link rel="preload" href="{% static 'passbook/fonts/DINEngschriftStd.woff' %}" as="font" type="font/woff">
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>{% block title %}{% trans title|default:"passbook" %}{% endblock %}</title> <title>{% block title %}{% trans title|default:config.passbook.branding.title %}{% endblock %}</title>
<link rel="icon" type="image/png" href="{% static 'passbook/logo.png' %}"> <link rel="icon" type="image/png" href="{% static 'passbook/logo.png' %}">
<link rel="shortcut icon" type="image/png" href="{% static 'passbook/logo.png' %}"> <link rel="shortcut icon" type="image/png" href="{% static 'passbook/logo.png' %}">
<link rel="stylesheet" type="text/css" href="{% static 'node_modules/@patternfly/patternfly/patternfly.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'node_modules/@patternfly/patternfly/patternfly.css' %}">

View file

@ -23,8 +23,10 @@
<div class="pf-c-login__container"> <div class="pf-c-login__container">
<header class="pf-c-login__header"> <header class="pf-c-login__header">
<div class="pf-c-brand pb-brand"> <div class="pf-c-brand pb-brand">
<img src="{% static 'passbook/logo.svg' %}" alt="passbook icon" /> <img src="{{ config.passbook.branding.logo }}" alt="passbook icon" />
<p>passbook</p> {% if config.passbook.branding.title_show %}
<p>{{ config.passbook.branding.title }}</p>
{% endif %}
</div> </div>
</header> </header>
{% block main_container %} {% block main_container %}
@ -49,6 +51,13 @@
<a href="{{ link.href }}">{{ link.name }}</a> <a href="{{ link.href }}">{{ link.name }}</a>
</li> </li>
{% endfor %} {% endfor %}
{% if config.passbook.branding.title != "passbook" %}
<li>
<a href="https://github.com/beryju/passbook">
{% trans 'Powered by passbook' %}
</a>
</li>
{% endif %}
</ul> </ul>
</footer> </footer>
</div> </div>

View file

@ -21,6 +21,10 @@ error_reporting:
send_pii: false send_pii: false
passbook: passbook:
branding:
title: passbook
title_show: true
logo: static/passbook/brand.svg
# Optionally add links to the footer on the login page # Optionally add links to the footer on the login page
footer_links: footer_links:
- name: Documentation - name: Documentation

View file

@ -26,7 +26,7 @@
<!-- START CENTERED WHITE CONTAINER --> <!-- START CENTERED WHITE CONTAINER -->
<table role="presentation" class="main"> <table role="presentation" class="main">
<img src="{% inline_static_binary "passbook/logo.svg" %}" alt=""> <img src="{% inline_static_binary config.passbook.branding.logo %}" alt="">
<!-- START MAIN CONTENT AREA --> <!-- START MAIN CONTENT AREA -->
<tr> <tr>
<td class="wrapper"> <td class="wrapper">