//- @pugdoc name: img description: A mixin to create a sheet image element. Particularly useful when using the image attribute syntax. arguments: attributes: example: | include _htmlelements.pug +img({name:'my image',class:'some-class'}) mixin img(obj) - checkKUse(); - obj.class = obj.class ? replaceProblems(obj.class) : undefined; - obj['data-i18n-alt'] = obj['data-i18n-alt'] || obj.name; - obj.name = attrName(obj.name); - obj.title = obj.title || attrTitle(obj.name); - obj.name = `attr_${obj.name}`; img&attributes(obj) //-End Mixin //- @pugdoc name: span description: Creates a span element and formats the name of the span for compatibility with the Roll20 attribute system. arguments: - {object} attrObj - The object describing the span itself. - {block} block - What is contained within the span attributes: example: | include _htmlelements.pug +span({name:'attribute backed span',trigger:{calculation:'calculateAttribute'}}) mixin span(obj) - checkKUse(); - obj.class = obj.class ? replaceProblems(obj.class) : undefined; if obj.name - obj.name = attrName(obj.name); - obj.title = obj.title || attrTitle(obj.name); - obj.name = `attr_${obj.name}`; - addFieldToFieldsetObj(obj); - const elementObj = makeElementObj(obj); span&attributes(elementObj) block if obj.name - obj.type = 'span'; - storeTrigger(obj); //-End Mixin //- @pugdoc name: div description: Creates a div element and will properly format the name attribute of the div if it is provided arguments: - {object} divObj - The object describing the div - {block} block - The contents of the div attributes: example: | include _htmlelements.pug +div({name:'background image'}) mixin div(obj) - checkKUse(); - obj.class = obj.class ? replaceProblems(obj.class) : undefined; if obj.name - obj.name = attrName(obj.name); - obj.title = obj.title || attrTitle(obj.name); - obj.name = `attr_${obj.name}`; div&attributes(obj) block //-End Mixin