Skip to content

Instantly share code, notes, and snippets.

@machty
Last active May 17, 2017 19:41
Show Gist options
  • Save machty/f9e14b48b118ed0534d95a43f95fa78b to your computer and use it in GitHub Desktop.
Save machty/f9e14b48b118ed0534d95a43f95fa78b to your computer and use it in GitHub Desktop.
named block syntax graveyard
<x-foo>
<@header>
Howdy.
</@header>
<@body as |foo|>
Body {{foo}}
</@body>
<@footer>
Footer.
</@footer>
</x-modal>
<x-modal>
<!-- @header -->
Howdy.
<!-- @body as |foo| -->
Body {{foo}}
<!-- @footer -->
Footer.
</x-modal>
<x-modal>
{{@header = }}
Howdy.
{{@body = |foo|}}
Body {{foo}}
{{@footer = }}
Footer.
</x-modal>
<x-modal>
{{with @header}}
Howdy.
{{with @body as |foo|}}
Body {{foo}}
{{with @footer}}
Footer.
</x-modal>
<x-modal>
<block @header>
Howdy.
</block>
<block @body as |foo|>
Body {{foo}}
</block>
<block @footer>
Footer.
</block>
</x-modal>
<x-modal>
<template @header>
Howdy.
</template>
<template @body as |foo|>
Body {{foo}}
</template>
<template @footer>
Footer.
</template>
</x-modal>
<x-modal>
<begin @header />
Howdy.
<begin @body as foo />
Body {{foo}}
<begin @footer />
Footer.
</x-modal>
{{#let-block header}}
Howdy.
{{/let-block}}
{{#let-block body as |foo|}}
Body {{foo}}
{{/let-block}}
{{#let-block footer}}
Footer.
{{/let-block}}
<x-modal @header={{header}} @body={{body}} @footer={{footer}} />
<x-modal
@header={
Howdy.
}
@body=|foo| {
Body {{foo}}
}
@footer={
Footer.
}
/>
<x-modal>
{{#block @header}}
Howdy.
{{/block}}
{{#block @body as |foo|}}
Body {{foo}}
</block}}
{{#block @footer}}
Footer.
{{/block}}
</x-modal>
<x-modal>
{{@header =}}
Howdy.
{{=}}
{{@body = #|foo|}}
Body {{foo}}
{{#}}
{{#with @footer as}}
Footer.
{{/block}}
</x-modal>
<x-modal>
{{@header = }}
Howdy.
{{/@header}}
{{@body = as |foo|}}
Body {{foo}}
{{/@body}}
{{@footer = }}
Footer.
{{/footer}}
</x-modal>
<x-modal>
<let @header=|foo|>
Header {{foo}}
</let>
<let @body=|wat|>
Body {{wat}}
</let>
<let @footer=|zalgo|>
Footer {{zalgo}}
</let>
<let @footer=>
Footer {{zalgo}}
</let>
</x-modal>
<x-modal @title={{val}}>
{{@header = do}}
Howdy.
{{end}}
{{@body = do |foo|}}
Body {{foo}}
{{end}}
{{@footer = do}}
Footer.
{{end}}
</x-modal>
<x-modal ...>
<header>
Howdy.
</header>
<body as |foo|>
Body {{foo}}
</body>
<footer>
Footer.
</footer>
</x-modal>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment