mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 09:21:54 +00:00
added possibility to add branding to seahub
This commit is contained in:
@@ -7,7 +7,7 @@ These are referenced from the setting TEMPLATE_CONTEXT_PROCESSORS and used by
|
|||||||
RequestContext.
|
RequestContext.
|
||||||
"""
|
"""
|
||||||
from settings import SEAFILE_VERSION, SITE_TITLE, SITE_NAME, SITE_BASE, \
|
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:
|
try:
|
||||||
from settings import BUSINESS_MODE
|
from settings import BUSINESS_MODE
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@@ -35,6 +35,9 @@ def base(request):
|
|||||||
return {
|
return {
|
||||||
'seafile_version': SEAFILE_VERSION,
|
'seafile_version': SEAFILE_VERSION,
|
||||||
'site_title': SITE_TITLE,
|
'site_title': SITE_TITLE,
|
||||||
|
'branding_css': BRANDING_CSS,
|
||||||
|
'logo_path': LOGO_PATH,
|
||||||
|
'logo_url': LOGO_URL,
|
||||||
'business_mode': BUSINESS_MODE,
|
'business_mode': BUSINESS_MODE,
|
||||||
'cloud_mode': request.cloud_mode,
|
'cloud_mode': request.cloud_mode,
|
||||||
'org': org,
|
'org': org,
|
||||||
|
@@ -205,6 +205,14 @@ SITE_TITLE = 'Private Seafile'
|
|||||||
SITE_BASE = 'http://seafile.com'
|
SITE_BASE = 'http://seafile.com'
|
||||||
SITE_NAME = 'Seafile'
|
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
|
# Using Django to server static file. Set to `False` if deployed behide a web
|
||||||
# server.
|
# server.
|
||||||
SERVE_STATIC = True
|
SERVE_STATIC = True
|
||||||
|
@@ -13,7 +13,11 @@
|
|||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
<link rel="shortcut icon" href="{{ MEDIA_URL }}img/favicon.ico?t=1362454620"/>
|
<link rel="shortcut icon" href="{{ MEDIA_URL }}img/favicon.ico?t=1362454620"/>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
{% block extra_style %}{% endblock %}
|
{% block extra_style %}
|
||||||
|
{% if branding_css != '' %}
|
||||||
|
<style>{{branding_css}}</style>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -82,8 +86,8 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="header-inner">
|
<div id="header-inner">
|
||||||
{% block notice_panel %}{% endblock %}
|
{% block notice_panel %}{% endblock %}
|
||||||
<a href="http://seafile.com/" id="logo" class="fleft">
|
<a href="{{logo_url}}" id="logo" class="fleft">
|
||||||
<img src="{{ MEDIA_URL }}img/logo.png?t=1362454620" title="Seafile" alt="Seafile logo" />
|
<img src="{{ MEDIA_URL }}{{ logo_path }}" title="Seafile" alt="Seafile logo" />
|
||||||
</a>
|
</a>
|
||||||
{% block nav %}{% endblock %}
|
{% block nav %}{% endblock %}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user