Skip to content
All gists
Back to GitHub
Sign in
Sign up
Sign in
Sign up
{{ message }}
Instantly share code, notes, and snippets.
dbouwman
/
hack.hbs
Last active
Apr 28, 2016
Star
0
Fork
1
Star
Code
Revisions
11
Forks
1
Embed
What would you like to do?
Embed
Embed this gist in your website.
Share
Copy sharable link for this gist.
Clone via HTTPS
Clone with Git or checkout with SVN using the repository’s web address.
Learn more about clone URLs
Download ZIP
Raw
hack.hbs
//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.
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.