mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
add concise syntax example in README.md for applying rendering logic with separate tags
This commit is contained in:
parent
cca2b0a452
commit
995aaa3288
17
README.md
17
README.md
@ -103,6 +103,23 @@ html lang="en"
|
|||||||
- No colors!
|
- No colors!
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Alternatively, you can choose to apply rendering logic as separate "tags":
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!DOCTYPE html>
|
||||||
|
html lang="en"
|
||||||
|
head
|
||||||
|
title - Marko Templating Engine
|
||||||
|
body
|
||||||
|
h1 - Hello ${data.name}!
|
||||||
|
if(data.colors.length)
|
||||||
|
ul
|
||||||
|
for(color in data.colors)
|
||||||
|
li - ${color}
|
||||||
|
else
|
||||||
|
div - No colors!
|
||||||
|
```
|
||||||
|
|
||||||
## Mixed syntax
|
## Mixed syntax
|
||||||
|
|
||||||
You can even mix and match the concise syntax with the HTML syntax within the same document.
|
You can even mix and match the concise syntax with the HTML syntax within the same document.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user