Merge "favicon, logo and logo-splash should allow theme overrides"

This commit is contained in:
Jenkins 2015-07-31 13:32:13 +00:00 committed by Gerrit Code Review
commit 0e4337dc23
2 changed files with 12 additions and 0 deletions

View File

@ -411,6 +411,11 @@ If the static theme folder also contains a sub-folder 'templates', then
the path to that sub-folder will be prepended to TEMPLATE_DIRS tuple the path to that sub-folder will be prepended to TEMPLATE_DIRS tuple
to allow for theme specific template customizations. to allow for theme specific template customizations.
If the theme folder (or its static folder) contain an 'img' directory,
then all images contained within dashboard/img can be overridden by providing
a file with the same name. This makes it very easy to customize logo.png,
logo-splash.png and favicon.ico.
``DROPDOWN_MAX_ITEMS`` ``DROPDOWN_MAX_ITEMS``
---------------------- ----------------------

View File

@ -307,6 +307,13 @@ STATICFILES_DIRS.append(
('custom', CUSTOM_THEME), ('custom', CUSTOM_THEME),
) )
# Load the subdirectory 'img' of a custom theme if it exists, thereby allowing
# very granular theme overrides of all dashboard img files using the first-come
# first-serve filesystem loader.
if os.path.exists(os.path.join(CUSTOM_THEME, 'img')):
STATICFILES_DIRS.insert(0, ('dashboard/img',
os.path.join(CUSTOM_THEME, 'img')))
# populate HORIZON_CONFIG with auto-discovered JavaScript sources, mock files, # populate HORIZON_CONFIG with auto-discovered JavaScript sources, mock files,
# specs files and external templates. # specs files and external templates.
find_static_files(ROOT_PATH, HORIZON_CONFIG) find_static_files(ROOT_PATH, HORIZON_CONFIG)