-
Notifications
You must be signed in to change notification settings - Fork 0
/
mixins.pug
48 lines (38 loc) · 1010 Bytes
/
mixins.pug
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
45
46
47
48
mixin tab
- window.mixinTabN = window.mixinTabN || 0
- mixinTabN++
input.mixinTab(id='mixinTab' + mixinTabN, type='radio', name='mixinTabs',
checked=mixinTabN == 1)
label.mixinTab(for='mixinTab' + mixinTabN)
block
mixin section
- window.mixinSectionN = window.mixinSectionN || 0
- mixinSectionN++
section.mixinSection(id='mixinSection' + mixinSectionN)
block
mixin list(items)
ul
each item in items
li= item
mixin table(collection, headers)
- headers = headers || collection[0] && Object.keys(collection[0]) || []
table.mixinTable
thead
tr
each h in headers
th= h
tbody
each o in collection
tr
each h in headers
td= o[h]
mixin box
div.mixinBox
block
mixin field(name, label)
- label = label || name
label.mixinLabel
input(name=name, placeholder=label)&attributes(attributes)
span= label
mixin value(name, value)
input(type='hidden', name=name, value=value)