diff --git a/univcloud/apps/launcher.py b/univcloud/apps/launcher.py index 8647487..eb8557e 100644 --- a/univcloud/apps/launcher.py +++ b/univcloud/apps/launcher.py @@ -18,6 +18,9 @@ '''Launcher App''' +import urlparse +from django.template.defaultfilters import slugify + from .base import BaseApp class App(BaseApp): @@ -27,13 +30,21 @@ class App(BaseApp): sizey = 1 label = None url = None + picto = None - def __init__(self, app_id, label='label', url='#', **kwargs): + def __init__(self, app_id, label='label', url='#', picto=None, **kwargs): super(App, self).__init__(app_id, **kwargs) self.label = label self.url = url + self.picto = picto def get_content_args(self): args = super(App, self).get_content_args() + app_domain = None args.update({'url': self.url, 'label': self.label}) + if self.url: + app_domain = urlparse.urlparse(self.url)[1] + args['app_domain'] = app_domain + if self.picto: + args['app_picto'] = self.picto return args diff --git a/univcloud/static/css/style.css b/univcloud/static/css/style.css index afd41f2..258722b 100644 --- a/univcloud/static/css/style.css +++ b/univcloud/static/css/style.css @@ -33,6 +33,10 @@ div.gridster > ul > li { border-radius: 0em; } +div.gridster > ul > li:hover { + border-style: solid; +} + div.gridster > ul > li.scroll { overflow-y: auto; } @@ -143,6 +147,48 @@ div.app { height: 100%; } +div.app-has-picto { + font-size: 100%; + padding-top: 0; + text-align: left; +} + +div.app-has-picto a { + display: block; + width: 100%; + height: 100%; +} + +div.app-has-picto a span { + position: absolute; + bottom: 3px; + left: 5px; +} + +div.app-picto-wcs a { + background: transparent url(../img/face-monkey-symbolic.png) center center no-repeat; +} + +li.bright-bg div.app-picto-wcs a { + background-image: url(../img/face-monkey-symbolic-dark.png); +} + +div.app-picto-unpidf a { + background: transparent url(../img/accessories-dictionary-symbolic.png) center center no-repeat; +} + +li.bright-bg div.app-picto-unpidf a { + background-image: url(../img/accessories-dictionary-symbolic-dark.png); +} + +li.dark-bg div.app-has-picto a { + color: white; +} + +li.bright-bg div.app-has-picto a { + color: black; +} + #iframe { display: none; } diff --git a/univcloud/static/img/accessories-dictionary-symbolic-dark.png b/univcloud/static/img/accessories-dictionary-symbolic-dark.png new file mode 100644 index 0000000..8c6f457 Binary files /dev/null and b/univcloud/static/img/accessories-dictionary-symbolic-dark.png differ diff --git a/univcloud/static/img/accessories-dictionary-symbolic.png b/univcloud/static/img/accessories-dictionary-symbolic.png new file mode 100644 index 0000000..26620de Binary files /dev/null and b/univcloud/static/img/accessories-dictionary-symbolic.png differ diff --git a/univcloud/static/img/face-monkey-symbolic-dark.png b/univcloud/static/img/face-monkey-symbolic-dark.png new file mode 100644 index 0000000..f7d66e2 Binary files /dev/null and b/univcloud/static/img/face-monkey-symbolic-dark.png differ diff --git a/univcloud/static/img/face-monkey-symbolic.png b/univcloud/static/img/face-monkey-symbolic.png new file mode 100644 index 0000000..9b6b53c Binary files /dev/null and b/univcloud/static/img/face-monkey-symbolic.png differ diff --git a/univcloud/templates/apps/launcher.html b/univcloud/templates/apps/launcher.html index 8f93ddd..a23c2b4 100644 --- a/univcloud/templates/apps/launcher.html +++ b/univcloud/templates/apps/launcher.html @@ -1,5 +1,5 @@ -
- {{label}} +
+ {{label}}