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:
@@ -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,
|
||||
|
@@ -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
|
||||
|
@@ -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 %}
|
||||
|
||||
|
Reference in New Issue
Block a user