Migrate to mithril.js
This commit is contained in:
21
myapp/templates/private/layout.js
Normal file
21
myapp/templates/private/layout.js
Normal file
@@ -0,0 +1,21 @@
|
||||
function layout_decorator(controller) {
|
||||
return {
|
||||
render: function(vnode) {
|
||||
return m(Layout, m(controller, vnode.attrs))
|
||||
}
|
||||
}
|
||||
};
|
||||
function Layout() {
|
||||
return {
|
||||
view: function(vnode) {
|
||||
let result = [
|
||||
m(MenuGeneral),
|
||||
// m(SearchBar),
|
||||
m("section", vnode.children),
|
||||
m(Footer),
|
||||
m(Backtotop),
|
||||
];
|
||||
return result;
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user