diff options
Diffstat (limited to 'src/main/resources')
-rw-r--r-- | src/main/resources/bwlpModule.js | 10 | ||||
-rw-r--r-- | src/main/resources/guac-manifest.json | 2 | ||||
-rw-r--r-- | src/main/resources/secondary-logo.html | 3 | ||||
-rw-r--r-- | src/main/resources/styles/login.css | 15 |
4 files changed, 23 insertions, 7 deletions
diff --git a/src/main/resources/bwlpModule.js b/src/main/resources/bwlpModule.js index f0605e3..8e45c74 100644 --- a/src/main/resources/bwlpModule.js +++ b/src/main/resources/bwlpModule.js @@ -5,8 +5,10 @@ angular.module('group', [ angular.module('index').requires.push('group'); // Set custom logo -$http = angular.injector(["ng"]).get("$http"); -$http.get('api/ext/de.bwlehrpool.bwgpul/logoUrl').then(function (response) { - if (!response.data) return - document.documentElement.style.setProperty('--logo', "url('" + response.data + "')") +$http = angular.injector(['ng']).get('$http'); +$http.get('api/ext/de.bwlehrpool.bwgpul/logoConfig').then(function (response) { + if (!response.data || !response.data.url) return; + let cssVar = response.data.primary ? '--primary-logo' : '--secondary-logo'; + document.documentElement.style.setProperty(cssVar, "url('" + response.data.url + "')"); + document.documentElement.style.setProperty('--secondary-logo-display', "block"); }) diff --git a/src/main/resources/guac-manifest.json b/src/main/resources/guac-manifest.json index de2a5cf..565984d 100644 --- a/src/main/resources/guac-manifest.json +++ b/src/main/resources/guac-manifest.json @@ -6,7 +6,7 @@ "largeIcon" : "images/Logo_bwLehrpool_symbol.png", "authProviders": ["de.bwlehrpool.bwlp_guac.BwlpAuthenticationProvider"], "listeners" : ["de.bwlehrpool.bwlp_guac.TunnelListener"], - "html" : [ "login-logo.html", "selection-logo.html" ], + "html" : [ "login-logo.html", "selection-logo.html", "secondary-logo.html" ], "translations" : [ "translations/en.json", "translations/de.json" diff --git a/src/main/resources/secondary-logo.html b/src/main/resources/secondary-logo.html new file mode 100644 index 0000000..9ab3aef --- /dev/null +++ b/src/main/resources/secondary-logo.html @@ -0,0 +1,3 @@ +<meta name="after" content=".login-ui .login-dialog"> + +<img class="secondary-logo"> diff --git a/src/main/resources/styles/login.css b/src/main/resources/styles/login.css index 8fe590b..a85c6a8 100644 --- a/src/main/resources/styles/login.css +++ b/src/main/resources/styles/login.css @@ -1,5 +1,16 @@ :root { - --logo: url('app/ext/de.bwlehrpool/images/Logo_bwLehrpool.svg'); + --primary-logo: url('app/ext/de.bwlehrpool/images/Logo_bwLehrpool.svg'); + --secondary-logo: url('app/ext/de.bwlehrpool/images/Logo_bwLehrpool.svg'); + --secondary-logo-display: none; +} + +.secondary-logo { + display: var(--secondary-logo-display); + position: absolute; + left: 20px; + bottom: 20px; + width: 215px; + content: var(--secondary-logo); } .login-ui .login-logo, .login-ui .selection-logo { @@ -7,7 +18,7 @@ display: block; margin-left: auto; margin-right: auto; - content: var(--logo); + content: var(--primary-logo); } .login-ui .selection-logo { |