From 5c8db8b5a3e363be63f21700149ef5891410374c Mon Sep 17 00:00:00 2001 From: Jayaram Pai Date: Mon, 28 Apr 2014 20:16:48 +0530 Subject: Oscad workshop notification added. --- forums/settings.py | 5 ++++- static/website/css/nice-bar.css | 4 ++-- static/website/templates/base.html | 13 +++++++++++++ website/templatetags/nice_bar.py | 25 +++++++++++++++++++++++++ 4 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 website/templatetags/nice_bar.py diff --git a/forums/settings.py b/forums/settings.py index be17520..406ac21 100644 --- a/forums/settings.py +++ b/forums/settings.py @@ -185,7 +185,10 @@ LOGGING = { AUTH_USER_MODEL = 'drupal_auth.Users' AUTHENTICATION_BACKENDS = ( 'drupal_auth.backends.DrupalAuthBackend', ) DATABASE_ROUTERS = ['drupal_auth.routers.DrupalAuthRouter'] -TEMPLATE_CONTEXT_PROCESSORS += ('website.context_processors.admin_processor', ) +TEMPLATE_CONTEXT_PROCESSORS += ( + 'django.core.context_processors.request', + 'website.context_processors.admin_processor', +) COMPRESS_ROOT = PROJECT_DIR + "/static/" COMPRESS_ENABLED = True diff --git a/static/website/css/nice-bar.css b/static/website/css/nice-bar.css index 6159b09..9294c7e 100644 --- a/static/website/css/nice-bar.css +++ b/static/website/css/nice-bar.css @@ -1,8 +1,8 @@ .nice-bar { display: none; width: 100%; - background: #70a865; - border-bottom: 3px solid #27ae60; + background: #0074D9; + border-bottom: 3px solid #ffffff; font-size: 0.85em; } .nice-bar .nice-text { diff --git a/static/website/templates/base.html b/static/website/templates/base.html index 172c901..d0697dd 100644 --- a/static/website/templates/base.html +++ b/static/website/templates/base.html @@ -7,9 +7,21 @@ + {% endcompress %}
+ {% load nice_bar %} + {% if request|is_nice_bar_visible %} + + {% endif %}