add custom logo

This commit is contained in:
Davide Alberani 2015-05-10 10:30:37 +02:00
parent ec04251960
commit 708ea866d0
3 changed files with 29 additions and 11 deletions

View file

@ -43,13 +43,16 @@
--> -->
<body> <body>
<nav class="navbar navbar-default navbar-fixed-top" ng-controller="NavigationCtrl as n"> <nav class="navbar navbar-default navbar-fixed-top" ng-controller="NavigationCtrl">
<div class="container"> <div class="container">
<div class="collapse navbar-collapse"> <div class="navbar-header">
<div ng-if="logo.imgURL" class="navbar-brand"><img src="{{logo.imgURL}}" /></div>
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li ng-class="{active: n.isActive('/events') || n.isActive('/event')}"><a ui-sref="events">{{'Events' | translate}}</a></li> <li ng-class="{active: isActive('/events') || isActive('/event')}"><a ui-sref="events">{{'Events' | translate}}</a></li>
<li ng-class="{active: n.isActive('/persons') || n.isActive('/person') || n.isActive('/import/persons')}"><a ui-sref="persons">{{'Persons' | translate}}</a></li> <li ng-class="{active: isActive('/persons') || isActive('/person') || isActive('/import/persons')}"><a ui-sref="persons">{{'Persons' | translate}}</a></li>
</ul> </ul>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
<button class="btn btn-link"> <button class="btn btn-link">

View file

@ -7,13 +7,21 @@ var eventManControllers = angular.module('eventManControllers', []);
/* A controller that can be used to navigate. */ /* A controller that can be used to navigate. */
eventManControllers.controller('NavigationCtrl', ['$location', eventManControllers.controller('NavigationCtrl', ['$scope', '$location', 'Setting',
function ($location) { function ($scope, $location, Setting) {
this.go = function(url) { $scope.logo = {};
$scope.go = function(url) {
$location.url(url); $location.url(url);
}; };
this.isActive = function (view) { Setting.query({setting: 'logo'}, function(data) {
if (data && data.length) {
$scope.logo = data[0];
}
});
$scope.isActive = function(view) {
if (view === $location.path()) { if (view === $location.path()) {
return true; return true;
} }

View file

@ -2,6 +2,13 @@
/* nav-bar padding */ /* nav-bar padding */
body { padding-top: 70px; } body { padding-top: 70px; }
/* logo padding */
.navbar-brand {
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
}
/* fix styling for empty href */ /* fix styling for empty href */
.nav, .pagination, .carousel, .panel-title a { cursor: pointer; } .nav, .pagination, .carousel, .panel-title a { cursor: pointer; }
@ -50,8 +57,8 @@ body { padding-top: 70px; }
/* a small table with a fixed height */ /* a small table with a fixed height */
.small-table { .small-table {
height:200px; height: 200px !important;
overflow-x:hidden; overflow-x: hidden !important;
overflow-y:scroll; overflow-y: scroll !important;
} }