eknkc/amber — pull request #22 by jaschaephraim (2014-07-07 02:48:06+00:00)
Title: Add mixin functionality

I've added Jade-style mixin functionality:
```
mixin input($id, $label, $type)
label[for=$id] #{$label}
input[id=$id][type=$type]
!!! 5
html
body
form
+input("name", "Enter your name", "text")
```
results in:
```html

{{$id := "name"}}{{$label := "Enter your name"}}{{$type := "text"}}
{{$label}}
{{$id := "occupation"}}{{$label := "Enter your occupation"}}{{$type := "text"}}
{{$label}}

```
which executes to:
```html

Enter your name

Enter your occupation

```
Template data, variables, expressions, etc., can also be passed to the mixin:
```
+input(SomeId, $someLabel, "te" + "xt")
```
Let me know what you think or if anything is buggy. Thanks for the good work with Amber.