Previous fix was somewhat duct taped; following up to prevent console
errors.
Added Depends-On to test fix to devstack while we're at it.
Change-Id: Ie6c729edc20c9d6d03a0b6567fc5ce29cdc09415
Depends-On: I8c853c35c5b0b61925c27b461ad625266381f73b
Horizon themes are now configurable at a user level, through the use
of cookies. The themes that can be set are configurable at a
deployment level through settings.py. Horizon can be configured to
run with multiple themes, and allow users to choose which themes
they wish to run.
Django Compressor:
In order to support dynamic themes, each theme configuration must
be pre-compiled through the Django compressor. By making use of its
built in COMPRESS_OFFLINE_CONTEXT, we now return a generator to
create each of the theme's necessary offline contexts.
Templates:
Horizon themes allowed template overrides via their 'templates'
subfolder. In order to maintain this parity, a custom theme template
loader was created. It is run before the other loads, and simply
looks for a Django template in the current theme (cookie driven)
before diverting to the previous template loaders.
Static Files:
Horizon themes allowed static overrides of the images in
'dashboard/img' folder. A template tag, 'themable_asset' was created
to maintain this parity. Any asset that is wished to be made themable,
given that it is located in Horizon's 'static/dashboard' folder, can
now be made ot be themable. By making this a template tag, this
gives the developers more granular control over what branders can
customize.
Angular and Plugins:
By far, the trickiest part of this task, Angular and Plugins are
dynamic in the files that they 'discover'. SCSS is not flexible in
this manner at ALL. SCSS disallows the importation of a variable
name. To get around this, themes.scss was created as a Django
template. This template is the top level import file for all styles
within Horizon, and therefore, allows ALL the scss files to share a
common namespace and thus, can use shared variables as well as extend
shared styles.
Other:
This change is fundamental, in that it changes the method by which
Horizon ingests its SCSS files. Many problems existing in the
previous implementation, in an effort to make Horizon flexible, its
SCSS was made very inflexible. This patch corrects those problems.
Change-Id: Ic48b4b5c1d1a41f1e01a8d52784c9d38d192c8f1
Implements: blueprint horizon-dynamic-theme
Closes-Bug: #1480427
A major part of the css reorg is a better organization of the css
styles themselves. horizon.scss should be a global import level file.
Organize the Component Imports alphabetically. Also, standardize
quotes to match.
Change-Id: I39e62135d1200db56c46449c274d2acdccb72a00
Partially-Implements: blueprint horizon-theme-css-reorg
Bootswatch 3.3.5.2 is trying to load external assets from
googleapis.com
Bootswatch 3.3.5.3 makes this variable configurable, so we should
update and take advantage of this configuration.
Change-Id: Ib0a61af9568c44ec15aa4bd8bb85bc5699ddc05b
Closes-Bug: #1492070
In order to facilitate the bulk of the CSS Reorg effort, it was
extremely beneficial to quickly toggle between many different themes
in order to validate proper cascading inheritance. This work
prompted the following example theme.
The 'material' theme gives an example of how to make use of a 3rd
party theme using the theming functionality. In addition to
incorporating a theme, loaded as a static asset using
requirements.txt, it also gives examples of how to cleanly override
styles, variables, icon fonts and Django templates.
This theme is replacing 'blue' as the example of how to use a theme
other than 'default'.
To use this theme, add the theme to your local_settings.py:
CUSTOM_THEME_PATH = 'themes/material', recollect and recompress your
static files.
Change-Id: Ic67189de5aac5ca541ad6fe82b823e8fcf318bd0
Partially-Implements: blueprint horizon-theme-css-reorg