Theming: Fix preview and center alignment of logo

This commit is contained in:
Julius Haertl 2016-07-25 18:54:13 +02:00
parent 9281b008c5
commit db755d7236
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with 5 additions and 4 deletions

View File

@ -75,11 +75,11 @@ function preview(setting, value) {
var logos = document.getElementsByClassName('logo-icon');
var timestamp = new Date().getTime();
if (value !== '') {
logos[0].style.background = "url('" + OC.generateUrl('/apps/theming/logo') + "?v" + timestamp + "')";
logos[0].style.backgroundSize = "62px 34px";
logos[0].style.backgroundImage = "url('" + OC.generateUrl('/apps/theming/logo') + "?v" + timestamp + "')";
logos[0].style.backgroundSize = "contain";
} else {
logos[0].style.background = "url('" + OC.getRootPath() + '/core/img/logo-icon.svg?v' + timestamp +"')";
logos[0].style.backgroundSize = "62px 34px";
logos[0].style.backgroundImage = "url('" + OC.getRootPath() + '/core/img/logo-icon.svg?v' + timestamp +"')";
logos[0].style.backgroundSize = "contain";
}
}
}

View File

@ -82,6 +82,7 @@
display: inline-block;
background-image: url('../img/logo-icon.svg');
background-repeat: no-repeat;
background-position: center center;
width: 62px;
height: 34px;
}