diff --git a/module/documents/chatMessage/CryptRollMessage.mjs b/module/documents/chatMessage/CryptRollMessage.mjs new file mode 100644 index 0000000..7b0efc8 --- /dev/null +++ b/module/documents/chatMessage/CryptRollMessage.mjs @@ -0,0 +1,11 @@ +import { filePath } from "../../consts.mjs"; + +export class CryptRollMessage extends ChatMessage { + static get template() { + switch (this.type) { + case `roll`: + return filePath(`templates/chat/roll.hbs`); + } + return super.template; + }; +}; diff --git a/templates/chat/frame.hbs b/templates/chat/frame.hbs new file mode 100644 index 0000000..9a0ba23 --- /dev/null +++ b/templates/chat/frame.hbs @@ -0,0 +1,7 @@ +
\ No newline at end of file diff --git a/templates/css/chatmessage.css b/templates/css/chatmessage.css new file mode 100644 index 0000000..05014b9 --- /dev/null +++ b/templates/css/chatmessage.css @@ -0,0 +1,15 @@ +.ripcrypt.chat-message { + position: relative; + background: var(--base-background); + color: var(--base-text); + + .author { + position: absolute; + text-align: center; + top: 0; + left: 50%; + transform: translateY(-50%) translateX(-50%); + background: var(--title-background); + color: var(--title-text); + } +} diff --git a/templates/css/common.css b/templates/css/common.css index 175d7a9..37a4fee 100644 --- a/templates/css/common.css +++ b/templates/css/common.css @@ -23,4 +23,6 @@ label, input, select { cursor: pointer; } -} \ No newline at end of file +} + +@import url("./chatmessage.css"); diff --git a/templates/css/themes/dark.css b/templates/css/themes/dark.css index 9c0c05d..827c389 100644 --- a/templates/css/themes/dark.css +++ b/templates/css/themes/dark.css @@ -7,6 +7,9 @@ --base-text: white; --base-background: black; + --title-text: white; + --title-background: var(--accent-3); + --section-header-text: white; --section-header-background: var(--accent-1);