diff --git a/source/index.ts b/source/index.ts index 4bf06ab..b048aa7 100644 --- a/source/index.ts +++ b/source/index.ts @@ -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 }); diff --git a/source/style/roll.less b/source/style/roll.less index c5b91a7..eb75e84 100644 --- a/source/style/roll.less +++ b/source/style/roll.less @@ -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); } -} \ No newline at end of file +} diff --git a/templates/chat/roll-m5.hbs b/templates/chat/roll-m5.hbs index c8bd1bb..c7e816d 100644 --- a/templates/chat/roll-m5.hbs +++ b/templates/chat/roll-m5.hbs @@ -90,5 +90,11 @@ {{/each}} + {{#if i.description}} + +

Beschreibung:

+ {{stripHtml i.description}} + + {{/if}} \ No newline at end of file