Skip to content

Instantly share code, notes, and snippets.

@dbouwman dbouwman/hack.hbs
Last active Apr 28, 2016

Embed
What would you like to do?
//Pseudo Templates
// Run-Time
{{#page-layout model=model }} //the model here is the something with a `.rows[]` property
{{#each model.rows as |row|}}
{{#layout-row model=row }}
{{#layout-cards model=row.cards}} //formerly grid-layout; uses nester to conver x,y,h,w --> bootstrap rows and cols
{{#each bootstrapifiedCards.rows as |row|}}
{{#bs-row model=row onSearch=(action onSearch)}}
{{#each row.cols as |col|}}
{{bs-col model=col}}
{{#if model.rows}}
{{#each model.rows as |row| ~}}
{{bs-row model=row onSearch=onSearch}}
{{/each}}
{{else}}
{{component model.component.name model=model onSearch=onSearch}}
{{/if}}
{{/bs-col}}
{{/each}}
{{/bs-row}}
{{/layout-cards}}
{{/layout-row}}
{{/each}}
{{/layout}}
//edit
{{#page-layout-editor model=model}}
{{#each model.rows as |row|}}
{{#layout-row-editor style=row.style}}
{{#layout-cards-editor model=row.cards}} //formerly card-canvas
{{#each model.cards as |card|}}
{{#card-editor model=card}}
{{component model.componentName ...}}
{{/card-editor}}
{{/each}}
{{/layout-cards-editor}}
{{/layout-row-editor}}
{{/each}}
{{/layout-editor}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.