Commit 7ee2fc15 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

ui: Configurable fonts base url

parent 962dfe09
......@@ -185,3 +185,7 @@
#
## Message to display for vms with empty fqdn value
#UI_NO_FQDN_MESSAGE = 'No available FQDN'
#
##Base url for external css fonts. If set to ``None``, no external css fonts
##will be loaded.
#UI_FONTS_BASE_URL = "//fonts.googleapis.com/"
......@@ -8,8 +8,12 @@
<!--<meta http-equiv="X-UA-Compatible" content="IE=7">-->
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link href="https://fonts.googleapis.com/css?family=Ubuntu&subset=latin,greek" rel="stylesheet" type="text/css" >
<link href='https://fonts.googleapis.com/css?family=Open+Sans&subset=latin,greek' rel='stylesheet' type='text/css'>
{% if SYNNEFO_FONTS_BASE_URL %}
<link href="{{ SYNNEFO_FONTS_BASE_URL }}css?family=Ubuntu&subset=latin,greek"
rel="stylesheet" type="text/css" >
<link href='{{ SYNNEFO_FONTS_BASE_URL }}css?family=Open+Sans&subset=latin,greek'
rel='stylesheet' type='text/css'>
{% endif %}
<link rel="shortcut icon" href="{{ BRANDING_FAVICON_URL }}" />
......
......@@ -121,6 +121,9 @@ UI_SYNNEFO_JS_LIB_URL = \
"UI_SYNNEFO_JS_LIB_URL", UI_SYNNEFO_JS_URL + "lib/")
UI_SYNNEFO_JS_WEB_URL = \
getattr(settings, "UI_SYNNEFO_JS_WEB_URL", UI_SYNNEFO_JS_URL + "ui/web/")
UI_SYNNEFO_FONTS_BASE_URL = \
getattr(settings,
"UI_FONTS_BASE_URL", "//fonts.googleapis.com/")
# extensions
ENABLE_GLANCE = getattr(settings, 'UI_ENABLE_GLANCE', True)
......@@ -173,6 +176,7 @@ def template(name, request, context):
'UI_MEDIA_URL': UI_MEDIA_URL,
'SYNNEFO_JS_URL': UI_SYNNEFO_JS_URL,
'SYNNEFO_JS_LIB_URL': UI_SYNNEFO_JS_LIB_URL,
'SYNNEFO_FONTS_BASE_URL': UI_SYNNEFO_FONTS_BASE_URL,
'SYNNEFO_JS_WEB_URL': UI_SYNNEFO_JS_WEB_URL,
'SYNNEFO_IMAGES_URL': UI_SYNNEFO_IMAGES_URL,
'SYNNEFO_CSS_URL': UI_SYNNEFO_CSS_URL,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment