Add Description to bottom of rolls
Changes: + Add helper to strip Html + add description of items to bottom of roll
This commit is contained in:
parent
250fc499ae
commit
c793fe77b9
|
|
@ -81,6 +81,11 @@ Hooks.once("init", async () => {
|
|||
return false;
|
||||
});
|
||||
|
||||
Handlebars.registerHelper("stripHtml", function (param) {
|
||||
var regex = /(<([^>]+)>)/gi;
|
||||
return param.replace(regex, "");
|
||||
});
|
||||
|
||||
// Default Sheet für Items definieren und das Standardsheet deaktivieren
|
||||
Items.unregisterSheet("core", ItemSheet);
|
||||
Items.registerSheet("midgard5", M5ItemSheet, { makeDefault: true });
|
||||
|
|
|
|||
|
|
@ -7,6 +7,14 @@
|
|||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
.roll-description-header {
|
||||
text-align: start;
|
||||
vertical-align: middle;
|
||||
padding: 0.3rem 0 0.1rem 0;
|
||||
font-weight: bold;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.roll-spell-details {
|
||||
text-align: right;
|
||||
padding-right: 1rem;
|
||||
|
|
@ -31,7 +39,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.roll-row:not( :hover ) {
|
||||
.roll-row:not(:hover) {
|
||||
.roll-total {
|
||||
visibility: visible;
|
||||
}
|
||||
|
|
@ -73,4 +81,4 @@
|
|||
background-color: rgb(54, 202, 88, 0.5);
|
||||
color: rgb(0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,5 +90,11 @@
|
|||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{#if i.description}}
|
||||
<tr>
|
||||
<h2 class="roll-description-header">Beschreibung:</h2>
|
||||
<span>{{stripHtml i.description}}</span>
|
||||
</tr>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue