- Quantized images to reduce size/load times

- Styled rolltemplate results to:
     * Remove empty elements
     * Space out text lines better
     * Center text
This commit is contained in:
Simon Brooke
2026-01-23 10:27:12 +00:00
parent 618fac2523
commit fff22f6f28
16 changed files with 54 additions and 29 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 798 KiB

After

Width:  |  Height:  |  Size: 409 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 KiB

After

Width:  |  Height:  |  Size: 61 KiB

+26 -3
View File
@@ -121,7 +121,7 @@ div[class^='household'] > h3 {
}
.household-main-grid {
background-image: url(https://files.d20.io/images/462001615/LxeTNXvoqNHhlYbwfQS7Mg/original.png?176165202255);
background-image: url(https://files.d20.io/images/472619011/4RL_X08JO1jaaEJPHfq7BA/original.png?1769090854);
background-color: #fdfcf3;
background-size:cover;
display: grid;
@@ -425,7 +425,7 @@ div[class^='household'] > h3 {
}
.household-avatar {
background-image: url(https://files.d20.io/images/462001457/jDLLcdvP4XFCRYOk4vO4hw/original.png?176165176855);
background-image: url(https://files.d20.io/images/472619025/e8qfzgnVvhonVMD_aGRp4A/original.png?1769090861);
/* background-color: #d9d2e9;*/
/* clip-path: polygon(*/
/* 5% 0%,*/
@@ -866,7 +866,30 @@ div[class^='household'] > h3 {
font-style: italic;
}
.sheet-rolltemplate-diceroller > div > div > div:empty {
.sheet-rolltemplate-diceroller > div > div > div > span {
margin-top: 10px;
}
.sheet-rolltemplate-diceroller > div > div > div > a {
pointer-events: none;
}
.sheet-rolltemplate-diceroller > div > div > div:empty,
.sheet-rolltemplate-diceroller > div > div > div:not(nth-of-type(7)):not(:has(a)) {
display: none;
}
.sheet-rolltemplate-diceroller > div > div > div:nth-of-type(7) {
font-size: 1.6em;
display: inline-block;
margin-bottom: 5px;
}
.sheet-rolltemplate-diceroller > div > div > div:not(:nth-of-type(7)):not(:has(a)) {
display: none;
}
.sheet-rolltemplate-diceroller > div > div > div:nth-of-type(7):has(span:nth-of-type(1):empty) .sheet-rolltemplate-diceroller > div > div > div:nth-of-type(7):has(span:nth-of-type(1): empty) {
display: none;
}
+28 -26
View File
@@ -5,22 +5,22 @@
<div class="household-main-grid">
<!-- Dice images -->
<input type="hidden" name="attr_diceface1"
value="[img](https://files.d20.io/images/471434251/pprHBpukXPUHYE9DEQYISg/original.png)"/>
value="[img](https://files.d20.io/images/472619007/J2KfqPVPcobbXSgxqmrBMQ/original.png)"/>
<input type="hidden" name="attr_diceface2"
value="[img](https://files.d20.io/images/471434247/bT-7x_wKn0Edi_rRL2o4Mw/original.png)"/>
value="[img](https://files.d20.io/images/472619008/54rUC72-dP_R4yNcmZDWNw/original.png)"/>
<input type="hidden" name="attr_diceface3"
value="[img](https://files.d20.io/images/471434250/MfbFbMRjNSOBLTLcYT-y7g/original.png)"/>
value="[img](https://files.d20.io/images/472619010/tN25xHUzhzHgwYc_8m4oiQ/original.png)"/>
<input type="hidden" name="attr_diceface4"
value="[img](https://files.d20.io/images/471434248/KGxtYKMqHRxDy7IHH5H7Vw/original.png)"/>
value="[img](https://files.d20.io/images/472619009/L0S6Aiz3aR54OrTNTsxnWA/original.png)"/>
<input type="hidden" name="attr_diceface5"
value="[img](https://files.d20.io/images/471434249/u5F-b5f0kcyymOPyQfnoyQ/original.png)"/>
value="[img](https://files.d20.io/images/472619015/BLdD2v707EvLS0NIwTx7AA/original.png)"/>
<input type="hidden" name="attr_diceface6"
value="[img](https://files.d20.io/images/471434253/k0CdmgS-mAD7xQfvShR3xw/original.png)"/>
value="[img](https://files.d20.io/images/472619016/CJGnEpgCHKJ-8Nvvwhyn0Q/original.png)"/>
<input type="hidden" name="attr_lastroll" value=""/>
<div class="household-skills">
<div>
<img src="https://files.d20.io/images/462275918/_Sm2b8Tet-6lKKa1BQMt4Q/original.png">
<img src="https://files.d20.io/images/472619018/P3FYrBpx_b_nHxODFChfQg/original.png">
<div class="household-skills-society">
<span data-i18n="society-u" class="hhtooltip"></span>
<input type="checkbox" name="attr_society_skill1" id="society_skill1" checked>
@@ -86,7 +86,7 @@
</div>
<br>
<div>
<img src="https://files.d20.io/images/462275600/thtWKTXN1EUgbFgXVITsBw/original.png">
<img src="https://files.d20.io/images/472619017/Y4Kiv3TgcB9U0UMFfglmSQ/original.png">
<div class="household-skills-academia">
<span data-i18n="academia-u" class="hhtooltip"></span>
<input type="checkbox" name="attr_academia_skill1" id="academia_skill1" checked>
@@ -152,7 +152,7 @@
</div>
<br>
<div>
<img src="https://files.d20.io/images/462275597/M955_rkXIxqTssBoosdqWw/original.png">
<img src="https://files.d20.io/images/472619023/ki0Rg-_mlcOtcCTF2-BdRA/original.png">
<div class="household-skills-war">
<span data-i18n="war-u" class="hhtooltip"></span>
<input type="checkbox" name="attr_war_skill1" id="war_skill1" checked>
@@ -218,7 +218,7 @@
</div>
<br>
<div>
<img src="https://files.d20.io/images/462275598/kmlcJmqFk1WTT-Uo-hcO0Q/original.png">
<img src="https://files.d20.io/images/472619019/1HPp35XVdu5hyg91G9_CEw/original.png">
<div class="household-skills-street">
<span data-i18n="street-u" class="hhtooltip"></span>
<input type="checkbox" name="attr_street_skill1" id="street_skill1" checked>
@@ -346,9 +346,9 @@
<div class="household-avatar">
<img name="attr_character_avatar">
<img class="household-logo"
src="https://files.d20.io/images/462962055/jxjL6TGTOZNU1EMRhqfJRQ/original.png?1762337183">
src="https://files.d20.io/images/472619024/WD5IjZX7QHO-jEwMjLQkVQ/original.png">
<div class="outgunned-dice-roller">
<input type="number" name="attr_num_dice" min="0">
<input type="number" name="attr_num_dice" min="2" max="9">
<button type="action" name="act_diceroller" data-i18n="roll-u">ROLL</button>
<br>
<br>
@@ -619,14 +619,16 @@
<div class="sheet-household-rolltemplate">
<div>
<span>{{character}}</span>
<div>{{diceresult1}} {{resulttype1}}</div>
<div>{{diceresult2}} {{resulttype2}}</div>
<div>{{diceresult3}} {{resulttype3}}</div>
<div>{{diceresult4}} {{resulttype4}}</div>
<div>{{diceresult5}} {{resulttype5}}</div>
<div>{{diceresult6}} {{resulttype6}}</div>
<span>{{message}}</span>
<span>{{result}}</span>
<div>{{diceresult1}} <span>{{resulttype1}}</span></div>
<div>{{diceresult2}} <span>{{resulttype2}}</span></div>
<div>{{diceresult3}} <span>{{resulttype3}}</span></div>
<div>{{diceresult4}} <span>{{resulttype4}}</span></div>
<div>{{diceresult5}} <span>{{resulttype5}}</span></div>
<div>{{diceresult6}} <span>{{resulttype6}}</span></div>
<div>
<span>{{message}}</span>
<span>{{result}}</span>
</div>
</div>
</div>
</rolltemplate>
@@ -852,12 +854,12 @@
// Did the re-roll succeed? Yes, if:
// 1. There are more successes
// 2. One or more of the successes is better
let message = "Re-Roll Failed!\nLose A Success!";
let message = "Re-Roll Failed!\n\nLose A Success!";
if(free) {
message = "Free Re-Roll!";
}
if(allin) {
message = "All-In Failed!\nLose ALL Successes!";
message = "All-In Failed!\n\nLose ALL Successes!";
}
let extraSuccesses = 0;
let increasedSuccesses = 0;
@@ -873,17 +875,17 @@
}
if(extraSuccesses || increasedSuccesses) {
message = msgType + " Success!\n";
message = msgType + " Success!\n\n";
if(extraSuccesses) {
message += " " + extraSuccesses + " Extra Success" + (extraSuccesses > 1 ? "es!" : "!\n");
message += "" + extraSuccesses + " Extra Success" + (extraSuccesses > 1 ? "es!" : "!\n\n");
}
if(increasedSuccesses) {
message += " " + increasedSuccesses + " Increased Success" + (increasedSuccesses > 1 ? "es!" : "!\n" );
message += "" + increasedSuccesses + " Increased Success" + (increasedSuccesses > 1 ? "es!" : "!\n" );
}
aggregatedRolls.betterResult = true;
}
else if(free) {
message = msgType + " Flat!\nNo Change!";
message = msgType + " Flat!\n\nNo Change!";
aggregatedRolls.betterResult = false;
}
else {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB