diff --git a/base/context_processors.py b/base/context_processors.py index 4294c2b5eb..3f0acc6ca5 100644 --- a/base/context_processors.py +++ b/base/context_processors.py @@ -7,7 +7,7 @@ These are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used by RequestContext. """ from settings import SEAFILE_VERSION, SITE_TITLE, SITE_NAME, SITE_BASE, \ - ENABLE_SIGNUP, MAX_FILE_NAME + ENABLE_SIGNUP, MAX_FILE_NAME, BRANDING_CSS, LOGO_PATH, LOGO_URL try: from settings import BUSINESS_MODE except ImportError: @@ -35,6 +35,9 @@ def base(request): return { 'seafile_version': SEAFILE_VERSION, 'site_title': SITE_TITLE, + 'branding_css': BRANDING_CSS, + 'logo_path': LOGO_PATH, + 'logo_url': LOGO_URL, 'business_mode': BUSINESS_MODE, 'cloud_mode': request.cloud_mode, 'org': org, diff --git a/settings.py b/settings.py index 90de7b2d03..fcd7679606 100644 --- a/settings.py +++ b/settings.py @@ -205,6 +205,14 @@ SITE_TITLE = 'Private Seafile' SITE_BASE = 'http://seafile.com' SITE_NAME = 'Seafile' +# Path to the Logo Imagefile (relative to the media path) +LOGO_PATH = 'img/logo.png' +# URL to which the logo links +LOGO_URL = SITE_BASE + +# css to modify the seafile css +BRANDING_CSS = '' + # Using Django to server static file. Set to `False` if deployed behide a web # server. SERVE_STATIC = True diff --git a/templates/base.html b/templates/base.html index 8ed2360354..c22db6c14b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -13,7 +13,11 @@ -{% block extra_style %}{% endblock %} +{% block extra_style %} +{% if branding_css != '' %} + +{% endif %} +{% endblock %}
@@ -82,8 +86,8 @@