[Ryuutama] fixing spellname (#7018)

* [Ryuutama]: adding icons to status effects

* [Ryuutama]: renaming images

* [Ryuutama]: updating images links to github

* [Ryuutama]: making notes icon bigger

* [Ryuutama]: fixing broken spell name

* [Ryuutama]: safer way to do character name

* [Ryuutama]: more space on top of icon

Co-authored-by: jlvgit <jlvel44@gmail.com>
This commit is contained in:
Jose Velazquez
2020-07-20 14:03:39 -05:00
committed by GitHub
co-authored by jlvgit
parent fb2a65784b
commit 668153543c
8 changed files with 86 additions and 34 deletions
+14 -4
View File
@@ -81,6 +81,10 @@ hr {
font-family: "pictos";
}
.sheet-font-12 {
font-size: 12px;
}
/* Default Repeating section buttons (Add, Modify, Done)
============================= */
.repcontainer .itemcontrol {
@@ -203,6 +207,8 @@ button.btn.repcontrol_edit:hover::after {
color: var(--header-text-color);
background-color: var(--header-bg-color);
font-size: 1.05em;
border-radius: 4px;
padding: 1px 5px;
}
.sheet-partyOptions {
@@ -256,6 +262,11 @@ button.btn.repcontrol_edit:hover::after {
margin: 3px;
}
.sheet-icon-small{
width: 30px;
padding: 3px;
}
.sheet-condionBar {
align-items: center;
padding: 6px 0 0 0;
@@ -496,7 +507,7 @@ input.sheet-overburdenPenalty {
.sheet-notesToggle {
position: relative;
right: 15px;
right: 21px;
top: 10px;
opacity: 0;
z-index: 999;
@@ -505,7 +516,8 @@ input.sheet-overburdenPenalty {
.sheet-notesIcon {
position: relative;
color: var(--header-bg-color);
top: 10px;
top: 12px;
font-size: 1.5em;
}
.sheet-notesArea {
@@ -559,8 +571,6 @@ input.sheet-overburdenPenalty {
}
.sheet-headerLabel {
border-radius: 4px;
padding: 1px 5px;
width: 240px;
height: 20px;
}
+72 -30
View File
@@ -14,6 +14,14 @@
}
}
function htmlEncodeString(string){
var codedLetters = [];
for (var i=string.length-1;i>=0;i--) {
codedLetters.unshift(['&#', string[i].charCodeAt(), ';'].join(''));
}
return codedLetters.join('');
}
on("change:injury change:condition", function() {
getAttrs(["condition", "injury"], function(values) {
setAttrs({
@@ -466,6 +474,17 @@
};
});
});
on("sheet:opened", () => {
getAttrs(["character_name", "safeCharacterName"], v => {
encodedName = htmlEncodeString(v.character_name)
if (encodedName != v.safeCharacterName){
setAttrs({
safeCharacterName: encodedName
});
};
});
});
</script>
<div>
@@ -500,6 +519,7 @@
<input type="number" name="attr_concentrationBonus" value="0"/>
<input type="number" name="attr_speciesConditionMod" value="0"/>
<input type="number" name="attr_speciesInitiativeMod" value="0"/>
<input type="hidden" name="attr_safeCharacterName" value=""/>
</div>
<!-- End Hidden Fields -->
@@ -779,7 +799,7 @@
<div class="sheet-spellRow">
<div class="spell-details">
<button class="spellName skill-check-button" type="roll" value="&{template:spell} {{name=@{spellName}}} {{cost=@{spellCost}}} {{duration=@{spellDuration}}} {{target=@{spellTarget}}} {{range=@{spellRange}}} {{effect=@{spellEffect}}} {{charname=@{character_name}}}" name="roll_repeatingSpellCard">
<button class="spellName skill-check-button" type="roll" value="&{template:spell} {{name=@{spellName}}} {{cost=@{spellCost}}} {{duration=@{spellDuration}}} {{target=@{spellTarget}}} {{range=@{spellRange}}} {{effect=@{spellEffect}}} {{charname=@{safeCharacterName}}}" name="roll_repeatingSpellCard">
<span name="attr_spellName"></span>
</button>
<span class="spellCost" name="attr_spellCost"></span>
@@ -982,46 +1002,68 @@
</div>
</div>
<hr>
<div class="sheet-3colrow">
<div class="sheet-col">
<label class="header headerLabel healthLabel" data-i18n="status-injury">Injury</label>
<input type="checkbox" class="penaltyCondition" name="attr_injured" value="2"/>
<input type="number" name="attr_injury" value="0" min="0"/> <span data-i18n="status-lowerdex">lowers DEX die size</span>
<div class="flex">
<div class="flex-column">
<label class="header" data-i18n="status-injury">Injury</label>
<div>
<img src="https://raw.githubusercontent.com/jlvgit/roll20-character-sheets/ryuutama-restyling/Ryuutama/images/bandaids.png" alt="bandaids" class="icon icon-small">
<input type="checkbox" class="penaltyCondition" name="attr_injured" value="2"/>
<input type="number" name="attr_injury" value="0" min="0"/>
</div>
<span class="font-12" data-i18n="status-lowerdex">lowers DEX die size</span>
</div>
<div class="sheet-col">
<label class="header headerLabel healthLabel" data-i18n="status-poison">Poison</label>
<input type="checkbox" class="penaltyCondition" name="attr_poisoned" value="2"/>
<input type="number" name="attr_poison" value="0" min="0"/> <span data-i18n="status-lowerstr">lowers STR die size</span>
<div class="flex-column">
<label class="header" data-i18n="status-poison">Poison</label>
<div>
<img src="https://raw.githubusercontent.com/jlvgit/roll20-character-sheets/ryuutama-restyling/Ryuutama/images/skullcrossbones.png" alt="skullcrossbones" class="icon icon-small">
<input type="checkbox" class="penaltyCondition" name="attr_poisoned" value="2"/>
<input type="number" name="attr_poison" value="0" min="0"/>
</div>
<span class="font-12" data-i18n="status-lowerstr">lowers STR die size</span>
</div>
<div class="sheet-col">
<label class="header headerLabel healthLabel" data-i18n="status-sickness">Sickness</label>
<input type="checkbox" class="penaltyCondition" name="attr_sick" value="2"/>
<input type="number" name="attr_sickness" value="0" min="0"/> <span data-i18n="status-lowerall">lowers all dice sizes</span>
<div class="flex-column">
<label class="header" data-i18n="status-sickness">Sickness</label>
<div>
<img src="https://raw.githubusercontent.com/jlvgit/roll20-character-sheets/ryuutama-restyling/Ryuutama/images/bedmeds.png" alt="bed" class="icon icon-small">
<input type="checkbox" class="penaltyCondition" name="attr_sick" value="2"/>
<input type="number" name="attr_sickness" value="0" min="0"/>
</div>
<span class="font-12" data-i18n="status-lowerall">lowers all dice sizes</span>
</div>
</div>
<div class="sheet-3colrow">
<div class="sheet-col">
<label class="header headerLabel healthLabel" data-i18n="status-exhaustion">Exhaustion</label>
<input type="checkbox" class="penaltyCondition" name="attr_exhausted" value="2"/>
<input type="number" name="attr_exhaustion" value="0" min="0"/> <span data-i18n="status-lowerspi">lowers SPI die size</span>
<div class="flex-column">
<label class="header" data-i18n="status-exhaustion">Exhaustion</label>
<div>
<img src="https://raw.githubusercontent.com/jlvgit/roll20-character-sheets/ryuutama-restyling/Ryuutama/images/moonstars.png" alt="exhaustion" class="icon icon-small">
<input type="checkbox" class="penaltyCondition" name="attr_exhausted" value="2"/>
<input type="number" name="attr_exhaustion" value="0" min="0"/>
</div>
<span class="font-12" data-i18n="status-lowerspi">lowers SPI die size</span>
</div>
<div class="sheet-col">
<label class="header headerLabel healthLabel" data-i18n="status-muddled">Muddled</label>
<input type="checkbox" class="penaltyCondition" name="attr_muddled" value="2"/>
<input type="number" name="attr_muddle" value="0" min="0"/> <span data-i18n="status-lowerint">lowers INT die size</span>
<div class="flex-column">
<label class="header" data-i18n="status-muddled">Muddled</label>
<div>
<img src="https://raw.githubusercontent.com/jlvgit/roll20-character-sheets/ryuutama-restyling/Ryuutama/images/questionmarks.png" alt="questionmarks" class="icon icon-small">
<input type="checkbox" class="penaltyCondition" name="attr_muddled" value="2"/>
<input type="number" name="attr_muddle" value="0" min="0"/>
</div>
<span class="font-12" data-i18n="status-lowerint">lowers INT die size</span>
</div>
<div class="sheet-col">
<label class="header headerLabel healthLabel" data-i18n="status-shock">Shock</label>
<input type="checkbox" class="penaltyCondition" name="attr_shocked" value="2"/>
<input type="number" name="attr_shock" value="0" min="0"/> <span data-i18n="status-lowerall">lowers all dice sizes</span>
<div class="flex-column">
<label class="header" data-i18n="status-shock">Shock</label>
<div>
<img src="https://raw.githubusercontent.com/jlvgit/roll20-character-sheets/ryuutama-restyling/Ryuutama/images/brokenheart.png" alt="brokenheart" class="icon icon-small">
<input type="checkbox" class="penaltyCondition" name="attr_shocked" value="2"/>
<input type="number" name="attr_shock" value="0" min="0"/>
</div>
<span class="font-12" data-i18n="status-lowerall">lowers all dice sizes</span>
</div>
</div>
<hr>
<div class="sheet-row">
<div class="sheet-col">
<label class="header headerLabel checkLabel terrainLabel" data-i18n="terrain-modifiers">Terrain Modifiers</label>
<span class="pictos notesIcon">i</span>
<span class="pictos notesIcon">W</span>
<input type="checkbox" name="attr_terrainNotesToggle" class="notesToggle sheet-hider">
<div class="terrainNotes">
<textarea name="attr_terrainNotes" class="notesArea" placeholder="Notes" data-i18n-placeholder="notes"></textarea>
@@ -1062,7 +1104,7 @@
<div class="sheet-row">
<div class="sheet-col">
<label class="header headerLabel checkLabel weatherLabel" data-i18n="weather-modifiers">Weather Modifiers</label>
<span class="pictos notesIcon">i</span>
<span class="pictos notesIcon">W</span>
<input type="checkbox" name="attr_weatherNotesToggle" class="notesToggle sheet-hider">
<div class="terrainNotes">
<textarea name="attr_weatherNotes" class="notesArea" placeholder="Notes" data-i18n-placeholder="notes"></textarea>
Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB