diff --git a/biophi/common/web/app_config.py b/biophi/common/web/app_config.py index e3e2266..d6c1f96 100644 --- a/biophi/common/web/app_config.py +++ b/biophi/common/web/app_config.py @@ -18,4 +18,7 @@ # Show newsletter popup at the bottom of landing page # using provided user/newsletter ID (something like c7bcd0367a4cdbbfe2ef413ff/c5b4d513538dcdb730f72a9db) -MAILCHIMP_NEWSLETTER = os.environ.get('MAILCHIMP_NEWSLETTER') \ No newline at end of file +MAILCHIMP_NEWSLETTER = os.environ.get('MAILCHIMP_NEWSLETTER') + +# Optional banner HTML (will not be sanitized!) +BANNER_HTML = os.environ.get('BANNER_HTML') diff --git a/biophi/common/web/static/main.css b/biophi/common/web/static/main.css index 1384bb6..9f31714 100644 --- a/biophi/common/web/static/main.css +++ b/biophi/common/web/static/main.css @@ -15,6 +15,19 @@ color: rgba(255,255,255,.90); } +.nav-custom-banner { + padding: 0.5rem 1rem; + color: white; +} + +.nav-custom-banner a{ + color: #a194f1; + text-decoration: underline; +} +.nav-custom-banner a:hover{ + color: #c5bcff; +} + #header { background-position: center 80%; background-size: cover; diff --git a/biophi/common/web/templates/layout.html b/biophi/common/web/templates/layout.html index f8ad560..00164e0 100644 --- a/biophi/common/web/templates/layout.html +++ b/biophi/common/web/templates/layout.html @@ -41,6 +41,9 @@ diff --git a/biophi/common/web/views.py b/biophi/common/web/views.py index f17b080..49d5998 100644 --- a/biophi/common/web/views.py +++ b/biophi/common/web/views.py @@ -33,6 +33,7 @@ app.jinja_env.globals.update(sorted=sorted) app.jinja_env.globals.update(min=min) app.jinja_env.globals.update(max=max) +app.jinja_env.globals.update(BANNER_HTML=app.config['BANNER_HTML']) app.register_blueprint(biophi_humanization, url_prefix='/humanization')