JSFiddle - React, Tailwind, and code Playground

by Chase Wilson

HTML

<!-- /this/is/an/override/template.js -->
<div id="{{this.name}}-wrapper">
  <header>
    <h2>This is an example of a block template.js</h2>
  </header>
  
  <div id="{{this.name}}-right">
    {{ this.getChild('child.name) }}
  </div>
  
  <div id="{{block.name}}-left">
    {{ this.getChild('other.child) }}
  </div>
</div>

JavaScript

app.addLayout('/the/route',function(){
  /* Possible initialization crap */
  
  return {
    'main.block' : new Block({
      module: 'twitter',
      template:'/this/is/an/override/template.js',
      children: {
         'child.name': new Block({
        
        })
        ,'other.child': new Block({
          children:{
            
          }
        })
      }
    })
  };
});

app.addLayout(new Layout('/the/route',{
  'main.block' : new Block({
      module: 'twitter',
      template:'/this/is/an/override/template.js',
      children: {
         'child.name': new Block({
        
        })
        ,'other.child': new Block({
          children:{
            
          }
        })
      }
    })
});