vegana-js
Version:
vegana is a container based js framework
43 lines (31 loc) • 843 B
JavaScript
//modules
const engine = require('vegana-engine');
//controllers
const log = false;
const type = 'page';
//ids
const pageId = "page-xxxx";
//import conts
//import comps
//init page
const init = () => {
make.init.page(pageId,"page"); //init page
build(); //start build
}
//fetch data
function fetch(){
common.tell('fetching',log);
build();
}
//build page
function build(){
common.tell('building',log);
//greetings text div
let greetings = make.div(pageId + "text-div",pageId,"greetings");
if(greetings !== false){
make.text(greetings,"greetings this is the nnnn page");
}
return; //always return after the build completes
}
//do not change current exports you are free to add your own though.
module.exports = {init:init,ref:pageId,type:type}