Commit Graph

6 Commits

Author SHA1 Message Date
Diana Whitten 378623217d Branding: Horizon Header should be more composable
A recent branding effort exposed several aspects of the header
templates that need to be more composable to enable richer
customizations.

The Horizon _header.html template has many components within it:
region pickers, user menus, logos. All of these things are highly
desirable to customize, but because it is all contained in the same
template, a brander will have to override the entire template. This
is not ideal as it increase the cost of maintenance.

The splash section of the login page, the context selector, the logo
section of the header, the user menu and the region selector are now
composable to a much more granular level.  The top navigation menus
can now be used outside of existing within a list.  The templates
now allow use as normal, standalone dropdown items.

Also, the current primary color used for 'material' was highly
unpleasant with OpenStack Red.  Another color on the material design
palette was chosen, very close to the previous blue. See
https://www.google.com/design/spec/style/color.html#color-color-palette

To showcase this new composability, 'material' now shows how to
customize the logo and logo-splash beyond just replacing the png, but
now allowing the use of any type of image.  In this case, the
OpenStack logos have been upgraded with their svg counterparts.

It was also noted that the context selection menu was using the wrong
variable to set the color of its links. This was corrected.

Closes-Bug: #1518584

Change-Id: Ib544176b9836e17fc913170664646e1d10eda831
2016-01-14 20:44:37 -07:00
Rajat Vig 6698d26fba Set target to _self for Header Links
Angular Panels have enabled ngRoute and HTML5 which
allows Angular to handle routing which makes all
routes to pass via Angular.

Links that do not have route defintion as a result stop
working.
This can be fixed by specifying the target="_self" on the <a> tags.

This is already in place for the Sidebar. It needs to done for the
Header Links as well.

Closes-Bug: #1531734
Change-Id: Ida76b40fdf0b66ba3ee3af4d32701974c312af57
2016-01-08 19:51:03 +00:00
Timur Sufiev dab7e45c74 Fix for the broken header's dropdowns for both v0.11.2 and v0.13
The dropdownToggle directive from angular-ui/bootstrap v0.11.2
conflicts with the native Bootstrap data-toggle="dropdown" attribute
(see https:github.com/angular-ui/bootstrap/issues/2156). This is fixed
in 0.13, but before that it'd be valuable to ensure that the same html
markup works the same way with both versions of angular-ui/bootstrap
(0.11.2 and 0.13). The decorator code could be safely deleted once
Horizon migrates to angular-ui/bootstrap v0.13.

Also fix dropdowns in material theme templates.

Closes-Bug: #1466146
Change-Id: I8f01c1ce7b0a5dc29bf9d8aba23c9ea7e6e1ec35
2015-11-26 18:00:26 +03:00
Rob Cresswell f2b2289b4a Drop Django 1.7 support
Django 1.7 support ends in December 2015
(https://www.djangoproject.com/download/#supported-versions), so it
will not be supported by Mitaka release.

This patch removes many of the deprecation warnings:-

`RedirectView.permanent` change:
https://docs.djangoproject.com/en/1.8/ref/class-based-views/base/

`url` change:
https://docs.djangoproject.com/en/1.8/internals/deprecation/
See version 1.5 notes for the url and ssi template tag change

`django.forms.utils` change:
https://docs.djangoproject.com/en/1.8/internals/deprecation/
See version 1.9 notes

`firstof` change:
https://docs.djangoproject.com/en/1.8/internals/deprecation/
See version 1.8 notes for cycle and firstof template tags

Change-Id: If546c087e73d189daa92e5bd63f0533fcf19089f
Partially-Implements: blueprint drop-dj17
2015-11-16 11:55:38 +00:00
lin-hua-cheng 1f19522a85 Add optional Report Bug link to Horizon
Change-Id: I2d0053adbdfcb196683c709f755f778427e6109b
Closes-Bug: #1499476
2015-09-25 17:29:15 -07:00
Diana Whitten a1b645830f Theming Mechanism now supports 3rd party themes
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
2015-09-02 07:47:15 -07:00