1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 16:31:13 +00:00

added possibility to add branding to seahub

This commit is contained in:
Phillip Thelen
2013-04-15 04:01:28 -07:00
parent 89dc430f88
commit 87e68decaf
3 changed files with 19 additions and 4 deletions

View File

@@ -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,

View File

@@ -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

View File

@@ -13,7 +13,11 @@
<!--[if IE]>
<link rel="shortcut icon" href="{{ MEDIA_URL }}img/favicon.ico?t=1362454620"/>
<![endif]-->
{% block extra_style %}{% endblock %}
{% block extra_style %}
{% if branding_css != '' %}
<style>{{branding_css}}</style>
{% endif %}
{% endblock %}
</head>
<body>
@@ -82,8 +86,8 @@
<div id="header">
<div id="header-inner">
{% block notice_panel %}{% endblock %}
<a href="http://seafile.com/" id="logo" class="fleft">
<img src="{{ MEDIA_URL }}img/logo.png?t=1362454620" title="Seafile" alt="Seafile logo" />
<a href="{{logo_url}}" id="logo" class="fleft">
<img src="{{ MEDIA_URL }}{{ logo_path }}" title="Seafile" alt="Seafile logo" />
</a>
{% block nav %}{% endblock %}