From 0fd085af2483af16797f3c4ea1fcababe284b9ef Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Fri, 14 Apr 2017 14:43:46 +0200 Subject: [PATCH] [TASK] Keep header in detail view --- lib/infobox/main.js | 2 +- lib/sidebar.js | 6 ++++-- scss/modules/_base.scss | 3 ++- scss/modules/_sidebar.scss | 3 --- scss/modules/_tabs.scss | 4 ++-- scss/night.scss | 3 ++- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/infobox/main.js b/lib/infobox/main.js index 0a0ba39..4e080a5 100644 --- a/lib/infobox/main.js +++ b/lib/infobox/main.js @@ -19,7 +19,7 @@ define(['infobox/link', 'infobox/node', 'infobox/location'], function (link, nod sidebar.hide(); el = document.createElement('div'); - sidebar.container.insertBefore(el, sidebar.container.firstChild); + sidebar.container.children[1].append(el); el.scrollIntoView(false); el.classList.add('infobox'); diff --git a/lib/sidebar.js b/lib/sidebar.js index 8a7400d..d9742fb 100644 --- a/lib/sidebar.js +++ b/lib/sidebar.js @@ -44,11 +44,13 @@ define(function () { }; self.hide = function hide() { - container.classList.add('hidden'); + container.children[1].classList.add('hide'); + container.children[2].classList.add('hide'); }; self.reveal = function reveal() { - container.classList.remove('hidden'); + container.children[1].classList.remove('hide'); + container.children[2].classList.remove('hide'); }; self.container = sidebar; diff --git a/scss/modules/_base.scss b/scss/modules/_base.scss index 581c156..933e3c7 100644 --- a/scss/modules/_base.scss +++ b/scss/modules/_base.scss @@ -10,6 +10,7 @@ body { header { background: transparentize($color-black, .98); + border-bottom: 1px solid darken($color-white, 10%); } h1, @@ -67,5 +68,5 @@ strong { } .hide { - display: none; + display: none !important; // sass-lint:disable-line no-important } diff --git a/scss/modules/_sidebar.scss b/scss/modules/_sidebar.scss index 3046307..9ab49fb 100644 --- a/scss/modules/_sidebar.scss +++ b/scss/modules/_sidebar.scss @@ -63,7 +63,6 @@ } } - .infobox, .container { @if $shadows == 1 { @include shadow(2); @@ -73,9 +72,7 @@ background: transparentize($color-white, .03); min-height: 100vh; overflow-y: visible; - } - .container { &.hidden { display: none; } diff --git a/scss/modules/_tabs.scss b/scss/modules/_tabs.scss index ebffdfb..2065139 100644 --- a/scss/modules/_tabs.scss +++ b/scss/modules/_tabs.scss @@ -2,8 +2,8 @@ @if $shadows == 1 { @include shadow(1); } @else { - border: solid darken($color-white, 10%); - border-width: 1px 0; + border: 0 solid darken($color-white, 10%); + border-bottom-width: 1px; } background: transparentize($color-black, .98); display: flex; diff --git a/scss/night.scss b/scss/night.scss index 3dbdc6b..e942057 100644 --- a/scss/night.scss +++ b/scss/night.scss @@ -15,6 +15,7 @@ html { header { background: transparentize($color-black, .98); + border-bottom-color: lighten($color-white, 10%); } //@import 'modules/leaflet'; @@ -87,7 +88,7 @@ html { //@import 'modules/tabs'; .tabs { background: transparentize($color-black, .98); - border-color: lighten($color-white, 10%); + border-bottom-color: lighten($color-white, 10%); li { color: transparentize($color-black, .5);