This repository has been archived by the owner on Jan 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
pug.html
54 lines (44 loc) · 8.94 KB
/
pug.html
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
49
50
51
52
53
54
<input name="attr_version" type="hidden" value="1"/><input class="type" name="attr_sheet_type" type="hidden" value="character"/><input class="display_string" name="attr_character_settings" type="hidden" value=""/><div class="pc container grid"><h1 class="center" data-i18n="trophy gold"></h1><div class="column"><div class="row grid 2column"><div class="col"><h2 data-i18n="name"></h2><label data-i18n-title="enter character name" title="enter character name"><input data-i18n-placeholder="character name" name="attr_character_name" placeholder="character name" title="@{character_name}" type="text" value=""/></label></div><div class="col"><h2 data-i18n="player"></h2><label data-i18n-title="enter player" title="enter player"><input data-i18n-placeholder="player" name="attr_player" placeholder="player" title="@{player}" type="text" value=""/></label></div></div><div class="row grid 2column"><div class="col"><h2 data-i18n="occupation"></h2><label data-i18n-title="enter occupation" title="enter occupation"><input data-i18n-placeholder="occupation" name="attr_occupation" placeholder="occupation" title="@{occupation}" type="text" value=""/></label><span data-i18n="occupation description"></span></div><div class="col repeating-container"><h3 data-i18n="skills"></h3><fieldset class="repeating_occupation-skills"><div class="rowx grid descriptor"><button class="text-left eclipse font-weight-bold" name="roll_button" type="roll"><span name="attr_name"></span></button><input class="toggles text-center" name="attr_collapse" title="@{collapse}" type="checkbox" value="collapse"/><span class="toggles text-center pictos">i</span><input class="toggles text-center" name="attr_settings" title="@{settings}" type="checkbox" value="settings"/><span class="toggles text-center pictos">p</span><div class="rowx collapse"><span class="collapse description" name="attr_description"></span></div><div class="rowx settings"><label data-i18n-title="enter name" title="enter name"><input data-i18n-placeholder="name" name="attr_name" placeholder="name" title="@{name}" type="text" value=""/></label><textarea name="attr_description" placeholder="description"></textarea></div></div></fieldset></div></div><div class="row grid 2column"><div class="col"><h2 data-i18n="background"></h2><label data-i18n-title="enter background" title="enter background"><input data-i18n-placeholder="background" name="attr_background" placeholder="background" title="@{background}" type="text" value=""/></label></div><div class="col"><h3 data-i18n="skill"></h3><label data-i18n-title="enter background skill" title="enter background skill"><input data-i18n-placeholder="background skill" name="attr_background_skill" placeholder="background skill" title="@{background_skill}" type="text" value=""/></label></div></div><div class="row grid 2column"><div class="col"><h2 data-i18n="training"></h2><span data-i18n="training description"></span></div><div class="col"><h3 data-i18n="skills"></h3><fieldset class="repeating_training-skills"><div class="rowx grid descriptor"><button class="text-left eclipse font-weight-bold" name="roll_button" type="roll"><span name="attr_name"></span></button><input class="toggles text-center" name="attr_collapse" title="@{collapse}" type="checkbox" value="collapse"/><span class="toggles text-center pictos">i</span><input class="toggles text-center" name="attr_settings" title="@{settings}" type="checkbox" value="settings"/><span class="toggles text-center pictos">p</span><div class="rowx collapse"><span class="collapse description" name="attr_description"></span></div><div class="rowx settings"><label data-i18n-title="enter name" title="enter name"><input data-i18n-placeholder="name" name="attr_name" placeholder="name" title="@{name}" type="text" value=""/></label><textarea name="attr_description" placeholder="description"></textarea></div></div></fieldset></div></div><div class="row grid 2column"><div class="col"><h2 data-i18n="household"></h2><span data-i18n="training description"></span></div><div class="col"><h3 data-i18n="household name & description"></h3><textarea name="attr_household description" placeholder="household description"></textarea></div></div><div class="row grid 2column"><div class="col"><h2 data-i18n="rituals"></h2><span data-i18n="rituals description"></span></div><div class="col"><h3 data-i18n="rituals"></h3><fieldset class="repeating_rituals"><div class="rowx grid descriptor"><button class="text-left eclipse font-weight-bold" name="roll_button" type="roll"><span name="attr_name"></span></button><input class="toggles text-center" name="attr_collapse" title="@{collapse}" type="checkbox" value="collapse"/><span class="toggles text-center pictos">i</span><input class="toggles text-center" name="attr_settings" title="@{settings}" type="checkbox" value="settings"/><span class="toggles text-center pictos">p</span><div class="rowx collapse"><span class="collapse description" name="attr_description"></span></div><div class="rowx settings"><label data-i18n-title="enter name" title="enter name"><input data-i18n-placeholder="name" name="attr_name" placeholder="name" title="@{name}" type="text" value=""/></label><textarea name="attr_description" placeholder="description"></textarea></div></div></fieldset></div></div><div class="row grid 2column"><div class="col"><h2 data-i18n="library"></h2><span data-i18n="library description"></span></div><div class="col"><h3 data-i18n="rituals"></h3><fieldset class="repeating_library-rituals"><div class="rowx grid descriptor"><button class="text-left eclipse font-weight-bold" name="roll_button" type="roll"><span name="attr_name"></span></button><input class="toggles text-center" name="attr_collapse" title="@{collapse}" type="checkbox" value="collapse"/><span class="toggles text-center pictos">i</span><input class="toggles text-center" name="attr_settings" title="@{settings}" type="checkbox" value="settings"/><span class="toggles text-center pictos">p</span><div class="rowx collapse"><span class="collapse description" name="attr_description"></span></div><div class="rowx settings"><label data-i18n-title="enter name" title="enter name"><input data-i18n-placeholder="name" name="attr_name" placeholder="name" title="@{name}" type="text" value=""/></label><textarea name="attr_description" placeholder="description"></textarea></div></div></fieldset></div></div></div><div class="column"></div><div class="column"></div></div><div class="footer"><span>Version </span><span name="attr_version"></span><span>Original template created by Emerald Productions, LLC</span><img src="https://raw.githubusercontent.com/clevett/roll20-SheetTemplate/master/src/imgs/EProd_Emerald_Gloss.png" alt="Emerald Productions logo of an E"/></div><div class="rolltemplates"><rolltemplate class="sheet-rolltemplate-rolls"><div class="sheet-template-container"><!-- - Display a header on the template ---><div class="sheet-template-header">{{#header}}{{header}}{{/header}}</div><!-- - Display the dice roll in the template ---><div class="sheet-template-body">{{#dice}}<div class="sheet-template-rowx">{{dice}}</div>{{/dice}}<!-- - Display a description. This is great for text included with a roll --->{{#desc}}<div class="sheet-template-rowx"><span class="sheet-template-desc"></span></div>{{/desc}}</div></div></rolltemplate></div><script type="text/worker">//Convert Integers to be Negative
const convertIntegerNegative = number => number > 0 ? -Math.abs(number) : number
//Convert an object with negative numbers
const convertIntegersNegatives = numbers => {
numbers => {
for (let [key, value] of Object.entries(numbers)) {
numbers[key] = convertIntegerNegative(value);
}
return numbers
}
}
//Pass in eventinfo.triggerName
const findRepeatingField = trigger => trigger.split('_')[1]
//Pass in eventinfo.triggerName
const getReprowid = trigger => {
const split = trigger.split('_');
return `${split[0]}_${split[1]}_${split[2]}`
}
//Pass in an object keep that has the repeating section
//Example repeating_weapon_-m1czg68yzicwhfdpyys_name
const getReprowAttribute = key => {
const getReprowid = processingFunctions.getReprowid(key)
return key.split(`${getReprowid}_`)[1]
}
//Provide the function with an array of keys to find transations for
//Example ['strenght', 'agility', 'willpower']
const getTranslations = translationKeys => {
let translations = {}
translationKeys.forEach(key => translations[`${key}`] = getTranslationByKey(key))
return translations
}
const parseInteger = string => parseInt(string) || 0
//Use for convernting the result of getAttrs from strings into integers
const parseIntegers = numbers => {
for (let [key, value] of Object.entries(numbers)) {
numbers[key] = parseInt(value) || 0
}
return numbers
}
const setAttributes = (update, silent) => silent && typeof update === 'object' ? setAttrs(update, {silent:true}) : typeof update === 'object' ? setAttrs(update) : console.error(`${update} is not an object`)
//returns strength from @{strenght}
const sliceAttr = attribute => attribute.slice(2, -1)
const sumIntegers = numbers => numbers.reduce((a,b) => a + b, 0)
</script>