Created
December 5, 2012 00:49
-
-
Save jonschlinkert/4210821 to your computer and use it in GitHub Desktop.
mustache variables idea
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It would be fun to creat mustache mixins with variables like in LESS: | |
page-header.mustache | |
```sass | |
<div class="page-header"> | |
<h1>@{variable}</h1> | |
</div> | |
``` | |
and use it like this | |
```mustache | |
{{> header("Alerts") }} | |
``` | |
And have it compile to: | |
```html | |
<div class="page-header"> | |
<h1>Alerts</h1> | |
</div> | |
``` | |
I know that's not "logic-less", but still interesting. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would change the mustache to this...
{{> header({variable: "Alerts"}) }}