mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Merge pull request #132 from alphagov/colours-per-environment
Use different colours for each environment
This commit is contained in:
@@ -100,7 +100,10 @@ def init_app(app, config_overrides):
|
|||||||
|
|
||||||
@app.context_processor
|
@app.context_processor
|
||||||
def inject_global_template_variables():
|
def inject_global_template_variables():
|
||||||
return {'asset_path': '/static/'}
|
return {
|
||||||
|
'asset_path': '/static/',
|
||||||
|
'header_colour': app.config['HEADER_COLOUR']
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def convert_to_boolean(value):
|
def convert_to_boolean(value):
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
<!--[if gt IE 8]><!-->
|
<!--[if gt IE 8]><!-->
|
||||||
<link rel="stylesheet" media="screen" href="{{ asset_path }}stylesheets/main.css" />
|
<link rel="stylesheet" media="screen" href="{{ asset_path }}stylesheets/main.css" />
|
||||||
<!--<![endif]-->
|
<!--<![endif]-->
|
||||||
|
<style>
|
||||||
|
#global-header-bar { background-color: {{header_colour}} }
|
||||||
|
</style>
|
||||||
<!--[if IE 6]>
|
<!--[if IE 6]>
|
||||||
<link rel="stylesheet" media="screen" href="{{ asset_path }}/stylesheets/main-ie6.css" />
|
<link rel="stylesheet" media="screen" href="{{ asset_path }}/stylesheets/main-ie6.css" />
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|||||||
13
config.py
13
config.py
@@ -39,6 +39,8 @@ class Config(object):
|
|||||||
MAX_CONTENT_LENGTH = 10 * 1024 * 1024 # 10mb
|
MAX_CONTENT_LENGTH = 10 * 1024 * 1024 # 10mb
|
||||||
UPLOAD_FOLDER = '/tmp'
|
UPLOAD_FOLDER = '/tmp'
|
||||||
|
|
||||||
|
HEADER_COLOUR = '#FFBF47' # $yellow
|
||||||
|
|
||||||
|
|
||||||
class Development(Config):
|
class Development(Config):
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
@@ -53,10 +55,19 @@ class Test(Development):
|
|||||||
WTF_CSRF_ENABLED = False
|
WTF_CSRF_ENABLED = False
|
||||||
|
|
||||||
|
|
||||||
class Live(Config):
|
class Preview(Config):
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
HTTP_PROTOCOL = 'https'
|
HTTP_PROTOCOL = 'https'
|
||||||
SESSION_COOKIE_SECURE = True
|
SESSION_COOKIE_SECURE = True
|
||||||
|
HEADER_COLOUR = '#F47738' # $orange
|
||||||
|
|
||||||
|
|
||||||
|
class Staging(Preview):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class Live(Staging):
|
||||||
|
HEADER_COLOUR = '#B10E1E' # $red
|
||||||
|
|
||||||
|
|
||||||
configs = {
|
configs = {
|
||||||
|
|||||||
Reference in New Issue
Block a user