Increase header logo height

This commit is contained in:
Eric Lippmann 2017-11-21 15:28:19 +01:00
parent 09c70ec3fb
commit 4c32935c48
4 changed files with 34 additions and 23 deletions

View File

@ -13,19 +13,22 @@ html {
} }
#header { #header {
height: 3em;
left: 0;
position: fixed;
top: 0;
width: 100%; width: 100%;
padding-bottom: 3em;
position: fixed;
left: 0;
top: 0;
} }
#sidebar { #sidebar {
width: 12em;
position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
position: fixed; top: 4.5em;
top: 2.25em;
width: 12em;
} }
#main { #main {

View File

@ -37,14 +37,18 @@
} }
#header-logo-container { #header-logo-container {
height: 2.667em; background: inherit;
margin: .1667em 0 .1667em .7em; height: 6em;
width: 100px; padding: 1.25em;
width: 16em;
position: fixed;
left: 0;
margin-top: -3em;
} }
#header-logo { #header-logo {
background-image: url('../img/icinga-logo.svg'); background-image: url('../img/icinga-logo.svg');
background-position: left center; background-position: center center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain; background-size: contain;
display: block; display: block;
@ -238,6 +242,12 @@ html.no-js .controls > .tabs {
// Collpased sidebar // Collpased sidebar
#layout.sidebar-collapsed { #layout.sidebar-collapsed {
#header-logo-container {
height: 3.167em;
padding: 0.25em 0.125em;
width: 4em;
}
#header-logo { #header-logo {
background-image: url('../img/icinga-logo-compact.svg'); background-image: url('../img/icinga-logo-compact.svg');
} }
@ -247,6 +257,7 @@ html.no-js .controls > .tabs {
} }
#sidebar { #sidebar {
top: 2.25em;
width: 3em; width: 3em;
} }

View File

@ -215,7 +215,7 @@
if ($flyout.length) { if ($flyout.length) {
$flyout.css({ $flyout.css({
top: $target.position().top - parseInt($flyout.css('margin-top'), 10) top: $target.offset().top + $target.outerHeight()
}); });
} }
}; };

View File

@ -579,7 +579,7 @@
if (typeof $container === 'undefined') { if (typeof $container === 'undefined') {
var $header = $('#header'); var $header = $('#header');
var $headerLogo = $('#header-logo'); var $headerLogo = $('#header-logo-container');
var $main = $('#main'); var $main = $('#main');
var $search = $('#search'); var $search = $('#search');
var $sidebar = $('#sidebar'); var $sidebar = $('#sidebar');
@ -595,8 +595,7 @@
display: 'none' display: 'none'
}); });
$main.css({ $main.css({
top: $header.height() + $sidebar.outerHeight(), top: $header.outerHeight() + $sidebar.outerHeight()
zIndex: 2
}); });
$sidebar $sidebar
.on( .on(
@ -611,16 +610,14 @@
this.mobileMenu = true; this.mobileMenu = true;
} }
} else { } else {
$headerLogo.css({
top: $header.css('height')
});
$main.css({ $main.css({
top: $header.css('height'), top: $header.css('height')
zIndex: ''
}); });
$sidebar.css({ $sidebar.css({
top: $header.css('height'), top: $headerLogo.offset().top + $headerLogo.outerHeight()
zIndex: ''
});
$header.css({
height: $header.height() + 'px'
}); });
if (this.mobileMenu) { if (this.mobileMenu) {
@ -657,7 +654,7 @@
var $controls = $(this); var $controls = $(this);
var $fakeControls = $controls.next('.fake-controls'); var $fakeControls = $controls.next('.fake-controls');
$controls.css({ $controls.css({
top: $container.offset().top, top: $container.offsetParent().position().top,
width: $fakeControls.outerWidth() width: $fakeControls.outerWidth()
}); });
$fakeControls.height($controls.height()); $fakeControls.height($controls.height());