style toplevel searchbar

This commit is contained in:
rottencandy 2019-08-14 19:12:26 +05:30
parent 4554e161d1
commit 4ccda01ee2
2 changed files with 10 additions and 5 deletions

View File

@ -4,11 +4,10 @@ let rs = require('rswebui');
const sidebar = () => {
let active = 0;
const tabs = Object.keys(sections);
return {
view: () => m('.sidebar',
tabs.map((panelName, index) => m('a', {
href: '/config/' + panelName,
view: (v) => m('.sidebar',
v.attrs.tabs.map((panelName, index) => m('a', {
href: v.attrs.baseRoute + panelName,
oncreate: m.route.link,
class: index === active ?
'selected-sidebar-link' : '',
@ -31,7 +30,10 @@ let sections = {
const Layout = {
view: vnode => m('.tab-page', [
m(sidebar),
m(sidebar, {
tabs: Object.keys(sections),
baseRoute: '/config/',
}),
m('.node-panel', vnode.children),
])
};

View File

@ -44,6 +44,9 @@ input[type=text], input[type=password], input[type=number], textarea {
max-width: 70%;
font-size: 1em;
padding: 0.1em;
}input.searchbar {
display: block;
margin: 1em 0 0 1em;
}
button {