renamed tree and inline modules to ModeText & ModeConnections
This commit is contained in:
@@ -343,24 +343,21 @@ var _Intro = {
|
||||
}
|
||||
|
||||
|
||||
// ______
|
||||
// /_ __/_______ ___
|
||||
// / / / ___/ _ \/ _ \
|
||||
// / / / / / __/ __/
|
||||
// /_/ /_/ \___/\___/
|
||||
// ______ __ _
|
||||
// / ____/___ ____ ____ ___ _____/ /_(_)___ ____ _____
|
||||
// / / / __ \/ __ \/ __ \/ _ \/ ___/ __/ / __ \/ __ \/ ___/
|
||||
// / /___/ /_/ / / / / / / / __/ /__/ /_/ / /_/ / / / (__ )
|
||||
// \____/\____/_/ /_/_/ /_/\___/\___/\__/_/\____/_/ /_/____/
|
||||
module.exports = {
|
||||
// oninit : function(vn){
|
||||
// this.lang = vn.attrs.lang;
|
||||
// },
|
||||
oncreate: function(vn){
|
||||
document.body.classList.add('tree');
|
||||
document.body.classList.add('mode-connections');
|
||||
_Ui.init();
|
||||
},
|
||||
view: function(vn){
|
||||
console.log('_Tree view', vn.attrs.lang);
|
||||
console.log('_ModeConnections view', vn.attrs.lang);
|
||||
return [
|
||||
m(_Header),
|
||||
m('main', {id:"content", 'class':'tree'}, _dbs.data[vn.attrs.lang].map(function(p){
|
||||
m('main', {id:"content", 'class':'mode-connections'}, _dbs.data[vn.attrs.lang].map(function(p){
|
||||
if(p.id == 'intro'){
|
||||
return m(_Intro,p);
|
||||
}else{
|
||||
@@ -372,15 +369,3 @@ module.exports = {
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// function(){
|
||||
// switch(_dbs.lang){
|
||||
// case 'fr':
|
||||
// return "Hello dots !";
|
||||
// break;
|
||||
// case 'bra':
|
||||
// return '"Hola dots !"'
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
@@ -197,7 +197,7 @@ var _Item = {
|
||||
onclick: function(e){
|
||||
vn.state.active = vn.state.active ? 0 : 1;
|
||||
}
|
||||
}, this.type),
|
||||
}, m.trust(markdown.renderInline(this.type))),
|
||||
// create text node
|
||||
m(_Text, {'text':this.text, 'id':this.id})
|
||||
]
|
||||
@@ -323,24 +323,25 @@ var _Intro = {
|
||||
}
|
||||
}
|
||||
|
||||
// ____ __ _
|
||||
// / _/___ / / (_)___ ___
|
||||
// / // __ \/ / / / __ \/ _ \
|
||||
// _/ // / / / /___/ / / / / __/
|
||||
// /___/_/ /_/_____/_/_/ /_/\___/
|
||||
|
||||
// ______ __
|
||||
// /_ __/__ _ __/ /_
|
||||
// / / / _ \| |/_/ __/
|
||||
// / / / __/> </ /_
|
||||
// /_/ \___/_/|_|\__/
|
||||
module.exports = {
|
||||
// oninit : function(vn){
|
||||
// this.lang = vn.attrs.lang;
|
||||
// },
|
||||
oncreate: function(vn){
|
||||
document.body.classList.add('inline');
|
||||
oncreate(vn){
|
||||
document.body.classList.add('mode-text');
|
||||
_Ui.init();
|
||||
},
|
||||
view: function(vn){
|
||||
console.log('_Inline view', vn.attrs.lang);
|
||||
view(vn){
|
||||
console.log('_ModeText view', vn.attrs.lang);
|
||||
return [
|
||||
m(_Header),
|
||||
m('main', {id:"content", 'class':'inline'}, _dbs.data[vn.attrs.lang].map(function(p){
|
||||
m('main', {id:"content", 'class':'mode-text'}, _dbs.data[vn.attrs.lang].map(function(p){
|
||||
console.log("MAP _dbs", p);
|
||||
if(p.id == 'intro'){
|
||||
return m(_Intro,p);
|
||||
@@ -69,15 +69,15 @@ var _RouteMenu = {
|
||||
m('h3', 'Mode'),
|
||||
m('ul', [
|
||||
m('li', m('a', {
|
||||
'href':'/'+lang+'/inline'+path[3],
|
||||
'href':`/${lang}/text${path[3]}`,
|
||||
oncreate : m.route.link,
|
||||
onupdate : m.route.link
|
||||
}, "inline")),
|
||||
}, "Text")),
|
||||
m('li', m('a', {
|
||||
'href':'/'+lang+'/tree'+path[3],
|
||||
'href':`/${lang}/connections${path[3]}`,
|
||||
oncreate : m.route.link,
|
||||
onupdate : m.route.link
|
||||
}, "tree")),
|
||||
}, "Connections")),
|
||||
])
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user