Files
roll20-character-sheets-tester/TailsOfEquestria/pug/fields.pug
T

75 lines
1.9 KiB
Plaintext

mixin fraction(name)
.fraction
input(type='number', name='attr_' + name)
span /
input(type='number', name='attr_' + name + '_max')
mixin input(type, name)
input(type=type, name='attr_' + name, placeholder=attributes.placeholder, style=attributes.style, value=attributes.value)
mixin labelledAbove(label)
.labelledAbove(style=attributes.style)
label= label
.inner: block
mixin labelledBoxH(label)
.labelledBoxH(class=attributes.class, style=attributes.style)
label= label
.inner: block
mixin labelledBoxV(label)
.labelledBoxV(class=attributes.class, style=attributes.style)
label= label
.inner: block
mixin labelledUnderlined(label)
.labelledUnderlined(style=attributes.style)
label= label
.inner: block
mixin option(view, value, isSelected)
-
if(!value)
value = view;
option(value=value, selected=isSelected)= view
mixin readOnlyBox(name)
.readOnlyBox(style=attributes.style): span(name='attr_' + name)
input(type='hidden', name='attr_' + name)
mixin repeating(name)
fieldset(class='repeating_' + name)
block
mixin rollButton(attr, notes)
-
var tpl = '&{template:toe} {{charName=@{character_name}}} {{attr=' + attr + '}} {{result=[[@{' + attr + '}]]}}';
if(notes)
tpl += '{{notes=@{' + notes + '}}}';
button(type='roll', value=tpl)
mixin select(name)
select(name='attr_' + name, style=attributes.style)
block
mixin selectDice(name)
+select(name)(style=attributes.style)
+option('none', 'null', true)
+option('d4')
+option('d6')
+option('d8')
+option('d10')
+option('d12')
+option('d20')
mixin selectTrait(name)
+select(name)(style=attributes.style)
+option('none', 'null', true)
+option('body')
+option('mind')
+option('charm')
mixin textarea(name)
textarea(name='attr_' + name, style=attributes.style, placeholder=attributes.placeholder)