Migrate to mithril.js
This commit is contained in:
21
myapp/templates/public/components/menu-general.js
Normal file
21
myapp/templates/public/components/menu-general.js
Normal file
@@ -0,0 +1,21 @@
|
||||
let MenuGeneral = {
|
||||
oninit: function(vnode) {
|
||||
document.title = SETTINGS.TITLE;
|
||||
},
|
||||
view: function(vnode) {
|
||||
result = [];
|
||||
result.push(
|
||||
m('div', {class: 'row'},
|
||||
m('div', {class: 'col py-2'}, [
|
||||
m(m.route.Link, {class: 'btn btn-outline-secondary', href: '/'}, m('i', {class: 'fa fa-home'})),
|
||||
m(m.route.Link, {class: 'btn btn-outline-secondary border-0', href: '/pages'}, 'Статьи'),
|
||||
m(m.route.Link, {class: 'btn btn-outline-secondary border-0', href: '/tags'}, 'Метки'),
|
||||
m(m.route.Link, {class: 'btn btn-outline-secondary border-0', href: '/users'}, 'Пользователи'),
|
||||
m(m.route.Link, {class: 'btn btn-outline-secondary border-0', href: '/api/browse'}, 'API JSON-RPC'),
|
||||
m(m.route.Link, {class: 'btn btn-outline-success float-end', href: '/login'}, m('i', {class: 'fa fa-sign-in'})),
|
||||
])
|
||||
)
|
||||
)
|
||||
return result;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user