allow to change logo. default color for flash msg

- two new environment variables allow to change logo background color
  and graphic
- flash messages are now green (not cyan)
master
Alexander Graf 3 years ago
parent d8b4a016af
commit 0094268410

@ -56,6 +56,8 @@ DEFAULT_CONFIG = {
'WEBMAIL': 'none', 'WEBMAIL': 'none',
'RECAPTCHA_PUBLIC_KEY': '', 'RECAPTCHA_PUBLIC_KEY': '',
'RECAPTCHA_PRIVATE_KEY': '', 'RECAPTCHA_PRIVATE_KEY': '',
'LOGO_URL': None,
'LOGO_BACKGROUND': None,
# Advanced settings # Advanced settings
'LOG_LEVEL': 'WARNING', 'LOG_LEVEL': 'WARNING',
'SESSION_KEY_BITS': 128, 'SESSION_KEY_BITS': 128,

@ -19,7 +19,7 @@
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars" title="{% trans %}toggle sidebar{% endtrans %}" aria-expanded="false"></i><span class="sr-only">{% trans %}toggle sidebar{% endtrans %}</span></a> <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars" title="{% trans %}toggle sidebar{% endtrans %}" aria-expanded="false"></i><span class="sr-only">{% trans %}toggle sidebar{% endtrans %}</span></a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
{%- for page, url in path %} {%- for page, url in path %}
{%- if loop.index > 1 %} {%- if loop.index > 1 %}
<i class="fas fa-greater-than text-xs text-gray" aria-hidden="true"></i> <i class="fas fa-greater-than text-xs text-gray" aria-hidden="true"></i>
{%- endif %} {%- endif %}
@ -28,25 +28,25 @@
{%- else %} {%- else %}
<span class="nav-link d-inline-block">{{ page }}</span> <span class="nav-link d-inline-block">{{ page }}</span>
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
</li> </li>
</ul> </ul>
<ul class="navbar-nav ml-auto"> <ul class="navbar-nav ml-auto">
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link" data-toggle="dropdown" href="#" aria-expanded="false"> <a class="nav-link" data-toggle="dropdown" href="#" aria-expanded="false">
<i class="fas fa-language text-xl" aria-hidden="true" title="{% trans %}change language{% endtrans %}"></i><span class="sr-only">Language</span> <i class="fas fa-language text-xl" aria-hidden="true" title="{% trans %}change language{% endtrans %}"></i><span class="sr-only">Language</span>
<span class="badge badge-primary navbar-badge">{{ session['language'] }}</span></a> <span class="badge badge-primary navbar-badge">{{ session['language'] }}</span></a>
<div class="dropdown-menu dropdown-menu-right p-0" id="mailu-languages"> <div class="dropdown-menu dropdown-menu-right p-0" id="mailu-languages">
{%- for locale in config.translations.values() %} {%- for locale in config.translations.values() %}
<a class="dropdown-item{% if locale.language == session['language'] %} active{% endif %}" href="{{ url_for('.set_language', language=locale.language) }}">{{ locale.get_language_name().title() }}</a> <a class="dropdown-item{% if locale.language == session['language'] %} active{% endif %}" href="{{ url_for('.set_language', language=locale.language) }}">{{ locale.get_language_name().title() }}</a>
{%- endfor %} {%- endfor %}
</div> </div>
</li> </li>
</ul> </ul>
</nav> </nav>
<aside class="main-sidebar sidebar-dark-primary nav-compact elevation-4"> <aside class="main-sidebar sidebar-dark-primary nav-compact elevation-4">
<a href="{{ url_for('.domain_list' if current_user.manager_of or current_user.global_admin else '.user_settings') }}" class="brand-link bg-primary"> <a href="{{ url_for('.domain_list' if current_user.manager_of or current_user.global_admin else '.user_settings') }}" class="brand-link bg-mailu-logo"{% if config["LOGO_BACKGROUND"] %} style="background-color:{{ config["LOGO_BACKGROUND"] }}!important;"{% endif %}>
<img src="{{ url_for('.static', filename='mailu.png') }}" width="33" height="33" alt="Mailu" class="brand-image mailu-logo img-circle elevation-3"> <img src="{{ config["LOGO_URL"] if config["LOGO_URL"] else url_for('.static', filename='mailu.png') }}" width="33" height="33" alt="Mailu" class="brand-image mailu-logo img-circle elevation-3">
<span class="brand-text font-weight-light">{{ config["SITENAME"] }}</span> <span class="brand-text font-weight-light">{{ config["SITENAME"] }}</span>
</a> </a>
{%- include "sidebar.html" %} {%- include "sidebar.html" %}
@ -66,7 +66,7 @@
</div> </div>
</section> </section>
<div class="content"> <div class="content">
{{ utils.flashed_messages(container=False) }} {{ utils.flashed_messages(container=False, default_category='success') }}
{%- block content %}{%- endblock %} {%- block content %}{%- endblock %}
</div> </div>
</div> </div>

Loading…
Cancel
Save