mixin.blocks.pug
720 Bytes
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
40
41
42
43
44
mixin form(method, action)
form(method=method, action=action)
- var csrf_token_from_somewhere = 'hey'
input(type='hidden', name='_csrf', value=csrf_token_from_somewhere)
block
html
body
+form('GET', '/search')
input(type='text', name='query', placeholder='Search')
input(type='submit', value='Search')
html
body
+form('POST', '/search')
input(type='text', name='query', placeholder='Search')
input(type='submit', value='Search')
html
body
+form('POST', '/search')
mixin bar()
#bar
block
mixin foo()
#foo
+bar
block
+foo
p one
p two
p three
mixin baz
#baz
block
+baz()= '123'