gui: add header to sidebar

This commit is contained in:
Nils Schneider 2015-07-08 21:28:26 +02:00
parent 68de68fd25
commit 27752b2270
3 changed files with 15 additions and 5 deletions

View file

@ -1,8 +1,11 @@
define([], function () { define([], function () {
return function () { return function (tag) {
if (!tag)
tag = "div"
var self = this var self = this
var container = document.createElement("div") var container = document.createElement(tag)
self.add = function (d) { self.add = function (d) {
d.render(container) d.render(container)

View file

@ -71,6 +71,8 @@ function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Linklist,
buttons.appendChild(buttonToggle) buttons.appendChild(buttonToggle)
var title = new Title(config) var title = new Title(config)
var header = new Container("header")
var infobox = new Infobox(config, sidebar, router) var infobox = new Infobox(config, sidebar, router)
var tabs = new Tabs() var tabs = new Tabs()
var overview = new Container() var overview = new Container()
@ -89,12 +91,14 @@ function (chroma, Map, Sidebar, Tabs, Container, Meshstats, Linklist,
dataTargets.push(linklist) dataTargets.push(linklist)
dataTargets.push(statistics) dataTargets.push(statistics)
overview.add(meshstats) sidebar.add(header)
header.add(meshstats)
overview.add(newnodeslist) overview.add(newnodeslist)
overview.add(lostnodeslist) overview.add(lostnodeslist)
sidebar.add(tabs) sidebar.add(tabs)
tabs.add("Übersicht", overview) tabs.add("Aktuelles", overview)
tabs.add("Knoten", nodelist) tabs.add("Knoten", nodelist)
tabs.add("Verbindungen", linklist) tabs.add("Verbindungen", linklist)
tabs.add("Statistiken", statistics) tabs.add("Statistiken", statistics)

View file

@ -33,13 +33,16 @@ $buttondistance: 12pt;
} }
} }
.tabs, header {
background: rgba(0, 0, 0, 0.02);
}
.tabs { .tabs {
padding: 1em 0 0 !important; padding: 1em 0 0 !important;
margin: 0; margin: 0;
list-style: none; list-style: none;
display: flex; display: flex;
font-family: Roboto; font-family: Roboto;
background: rgba(0, 0, 0, 0.02);
@include shadow(1); @include shadow(1);
} }