forked from thoughtnirvana/slimish-jinja2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.slim
39 lines (38 loc) · 956 Bytes
/
demo.slim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
!5
html
head
/ Inline static content.
title
- block title
|Slimish-Jinja Example
/ Self closing tag with attributes.
meta name="keywords" content="template language"
script
/ Empty jinja tag.
@block script
/ 'id' and 'class' shortcut.
body#home.fluid.liquid
/ Nested static content.
h1
|This is my header.
/ 'div' with 'id' and 'class' shortcut.
#contents.main
/ Empty html tag.
%div
p Dynamic {{ content }}
p
|Nested dyanmic {{ content }}
Left indent is preserved in text blocks.
p
|<a href="http://www.google.com">Google</a>
/ Dynamic attributes.
ul class="{{ user_class }}"
/ Jinja tag.
- for user in users
li {{ user.name }}
- if user.last_name
li {{ user.last_name }}
- elif user.middle_name
li {{ user.middle_name }}
- else
li No user found.