Permalink
Browse files

Update README.md

  • Loading branch information...
1 parent 26072b1 commit 95defb905a36963ec462a4f76881d5374d262e61 @baryshev committed Mar 17, 2012
Showing with 24 additions and 24 deletions.
  1. +24 −24 README.md
View
@@ -60,17 +60,17 @@ See full example in [examples](https://github.com/baryshev/just/tree/master/exam
```
<% for (var i = 0; i < articles.length; i++) { %>
-<% this.partial('article', { article: articles[i] }); %>
+ <% this.partial('article', { article: articles[i] }); %>
<% } %>
```
or
```
<% if (user.authenticated) { %>
-<%@ partials/user %>
+ <%@ partials/user %>
<% } else { %>
-<%@ partials/auth %>
+ <%@ partials/auth %>
<% } %>
```
@@ -82,7 +82,7 @@ or
or
```
-<% this.extend('layout', { customVar: 'Hello, World!' }); %>
+<%! layout { customVar: 'Hello, World!' } %>
```
Use
@@ -92,12 +92,6 @@ Use
<%*%>
```
-or
-
-```
-<% this.child(); %>
-```
-
in parent template to define the insertion point.
### Partials
@@ -109,41 +103,47 @@ in parent template to define the insertion point.
or
```
-<% this.partial('partial', { customVar: 'Hello, World!' }); %>
+<%@ partial { customVar: 'Hello, World!' } %>
```
### Blocks
```
<%[ blockName %>
-<p>This is block content</p>
+ <p>This is block content</p>
<%]%>
```
-or
-
-```
-<% this.blockStart('blockName'); %>
-<p>This is block content</p>
-<% this.blockEnd(); %>
-```
-
Use
```
<%* blockName %>
```
-or
+in parent template to define the insertion point.
+
+Blocks supports more than one level of inheritance and may be redefined.
+
+### Conditions
```
-<% this.child('blockName'); %>
+<%? someVar == 1 %>
+ <p>Var is 1</p>
+<%: someVar == 2 %>
+ <p>Var is 2</p>
+<%:%>
+ <p>Var is other</p>
+<%?%>
```
-in parent template to define the insertion point.
+### Loops
-Blocks supports more than one level of inheritance and may be redefined.
+```
+<%| comments comment %>
+ <p><%= comment.text %></p>
+<%|%>
+```
## Options

0 comments on commit 95defb9

Please sign in to comment.