diff --git a/README.rst b/README.rst index 8d037af..78eaae1 100644 --- a/README.rst +++ b/README.rst @@ -104,6 +104,9 @@ All settings are optional. Add them to ``settings.py`` to customize ``django-cas Template settings: +* ``CAS_LOGO_URL``: Url to the logo showed in the up left corner on the default + templates. Set it to ``False`` to disable it. + * ``CAS_LOGIN_TEMPLATE``: Path to the template showed on ``/login`` then the user is not autenticated. The default is ``"cas_server/login.html"``. * ``CAS_WARN_TEMPLATE``: Path to the template showed on ``/login?service=...`` then diff --git a/cas_server/default_settings.py b/cas_server/default_settings.py index fe5de28..34b8aa5 100644 --- a/cas_server/default_settings.py +++ b/cas_server/default_settings.py @@ -10,6 +10,7 @@ # (c) 2015 Valentin Samir """Default values for the app's settings""" from django.conf import settings +from django.contrib.staticfiles.templatetags.staticfiles import static def setting_default(name, default_value): @@ -17,6 +18,8 @@ def setting_default(name, default_value): value = getattr(settings, name, default_value) setattr(settings, name, value) +setting_default('CAS_LOGO_URL', static("cas_server/logo.png")) + setting_default('CAS_LOGIN_TEMPLATE', 'cas_server/login.html') setting_default('CAS_FEDERATE_TEMPLATE', 'cas_server/federate.html') setting_default('CAS_WARN_TEMPLATE', 'cas_server/warn.html') diff --git a/cas_server/static/cas_server/login.css b/cas_server/static/cas_server/login.css index 865312a..cd81500 100644 --- a/cas_server/static/cas_server/login.css +++ b/cas_server/static/cas_server/login.css @@ -40,3 +40,10 @@ body { border-top-right-radius: 0; } +#app-name { + text-align: center; +} +#app-name img { + width:110px; +} + diff --git a/cas_server/static/cas_server/logo.png b/cas_server/static/cas_server/logo.png new file mode 100644 index 0000000..0bbae02 Binary files /dev/null and b/cas_server/static/cas_server/logo.png differ diff --git a/cas_server/static/cas_server/logo.svg b/cas_server/static/cas_server/logo.svg new file mode 100644 index 0000000..b9c3cdd --- /dev/null +++ b/cas_server/static/cas_server/logo.svg @@ -0,0 +1,114 @@ + + + + diff --git a/cas_server/templates/cas_server/base.html b/cas_server/templates/cas_server/base.html index 9a51014..cb3a93e 100644 --- a/cas_server/templates/cas_server/base.html +++ b/cas_server/templates/cas_server/base.html @@ -12,6 +12,15 @@ {% block bootstrap3_content %}