Allow for configurable logo in the top left corner using ENTERPRISE_LOGO_URL parameter.

This commit is contained in:
Jake Moshenko 2014-12-12 18:25:30 -05:00
parent ea3d909477
commit 79b61e7709
3 changed files with 17 additions and 6 deletions

View file

@ -38,7 +38,12 @@
} }
#quay-logo { #quay-logo {
height: 36px;
width: 100px; width: 100px;
background-repeat: no-repeat;
background-size: contain;
background-position: center;
display: inline-block;
} }
#padding-container { #padding-container {
@ -2864,10 +2869,8 @@ p.editable:hover i {
.navbar-brand { .navbar-brand {
padding: 6px; padding: 6px;
} line-height: 1px;
font-size: 1px;
.navbar-brand img {
height: 36px;
} }
.user-dropdown > img { .user-dropdown > img {

View file

@ -4,7 +4,7 @@
≡ ≡
</button> </button>
<a class="navbar-brand" href="/" target="{{ appLinkTarget() }}"> <a class="navbar-brand" href="/" target="{{ appLinkTarget() }}">
<img id="quay-logo" src="/static/img/quay-logo.png"> <span id="quay-logo" style="background-image: url('{{ getEnterpriseLogo() }}')"></span>
</a> </a>
</div> </div>

View file

@ -4072,7 +4072,7 @@ quayApp.directive('headerBar', function () {
restrict: 'C', restrict: 'C',
scope: { scope: {
}, },
controller: function($scope, $element, $location, UserService, PlanService, ApiService, NotificationService) { controller: function($scope, $element, $location, UserService, PlanService, ApiService, NotificationService, Config) {
$scope.notificationService = NotificationService; $scope.notificationService = NotificationService;
// Monitor any user changes and place the current user into the scope. // Monitor any user changes and place the current user into the scope.
@ -4091,6 +4091,14 @@ quayApp.directive('headerBar', function () {
} }
return ""; return "";
}; };
$scope.getEnterpriseLogo = function() {
if (!Config.ENTERPRISE_LOGO_URL) {
return '/static/img/quay-logo.png';
}
return Config.ENTERPRISE_LOGO_URL;
};
} }
}; };
return directiveDefinitionObject; return directiveDefinitionObject;