Feature/chat message styles (#514)

* style items and action chat messages

* enhance death move chat message and fix border bottom from title actions

* fix padding bottom

* Added basic chat-message.hbs

* .

* style remaing chat messages

* style action messages

* remove console log

* add colapsable descriptions in chat messages

* inital style for message rolls

* fix deal damage button style

* add new partchments

* Roll Chat message new design template

* j

* l

* p

* y

* fix _getTags type error and add a alias label for non base messages

* Fix damage & healing roll

* Fix conflict

* Deleting old templates

* Good for now

* fix labels in duality rolls messages and style experience and effects messages

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
Co-authored-by: Dapoolp <elcatnet@gmail.com>
This commit is contained in:
Murilo Brito 2025-08-02 04:24:51 -03:00 committed by GitHub
parent a4b1130142
commit 74df2c4e87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
72 changed files with 1661 additions and 996 deletions

View file

@ -0,0 +1,118 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
@import '../../utils/spacing.less';
.daggerheart.chat {
&.domain-card {
display: flex;
flex-direction: column;
align-items: center;
.card-img {
width: 100%;
height: 200px;
mask-image: linear-gradient(0deg, transparent 0%, black 10%, black 90%, transparent 100%);
object-fit: cover;
}
details[open] {
.fa-chevron-down {
transform: rotate(180deg);
transition: all 0.3s ease;
}
}
.domain-card-move {
width: 100%;
.fa-chevron-down {
transition: all 0.3s ease;
margin-left: auto;
}
.domain-card-header {
display: flex;
flex-direction: row;
align-items: center;
margin: 8px;
padding-bottom: 5px;
width: -webkit-fill-available;
gap: 5px;
border-bottom: 1px solid @golden;
&:hover {
background: light-dark(@dark-blue-10, @golden-10);
cursor: pointer;
transition: all 0.3s ease;
}
.domain-label {
display: flex;
flex-direction: column;
width: 100%;
padding-bottom: 5px;
width: -webkit-fill-available;
gap: 5px;
.title {
font-size: 20px;
color: @golden;
font-family: @font-subtitle;
margin: 0;
}
.tags {
display: flex;
gap: 10px;
flex-wrap: wrap;
.tag {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 3px 5px;
font-size: 12px;
font-family: @font-body;
background: light-dark(@dark-15, @beige-15);
border: 1px solid light-dark(@dark, @beige);
color: light-dark(@dark, @beige);
border-radius: 3px;
}
}
}
}
}
.description {
color: @beige;
padding: 8px;
font-family: @font-body;
}
.ability-card-footer {
display: flex;
flex-wrap: wrap;
gap: 5px;
width: 100%;
padding: 0 8px;
button {
font-family: @font-body;
font-weight: 600;
height: 40px;
flex: 1 1 calc(50% - 5px);
&:nth-last-child(1):nth-child(odd) {
flex-basis: 100%;
}
}
.ability-card-action-cost {
margin: auto;
font-size: 1.5em;
}
}
}
}

View file

@ -0,0 +1,101 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
@import '../../utils/spacing.less';
.daggerheart.chat {
&.action {
display: flex;
flex-direction: column;
align-items: center;
details[open] {
.fa-chevron-down {
transform: rotate(180deg);
transition: all 0.3s ease;
}
}
.action-move {
width: 100%;
.fa-chevron-down {
transition: all 0.3s ease;
margin-left: auto;
}
.action-section {
display: flex;
flex-direction: row;
align-items: center;
margin: 8px 8px 0;
padding-bottom: 5px;
width: -webkit-fill-available;
gap: 5px;
border-bottom: 1px solid @golden;
&:hover {
background: light-dark(@dark-blue-10, @golden-10);
cursor: pointer;
transition: all 0.3s ease;
}
.action-img {
width: 40px;
height: 40px;
border-radius: 3px;
object-fit: cover;
}
.action-header {
display: flex;
flex-direction: column;
gap: 5px;
.title {
font-size: 20px;
color: @golden;
font-family: @font-subtitle;
margin: 0;
}
.label {
font-size: 12px;
color: @beige;
font-family: @font-body;
margin: 0;
}
}
}
}
.description {
color: @beige;
padding: 8px;
font-family: @font-body;
}
.ability-card-footer {
display: flex;
flex-wrap: wrap;
gap: 5px;
width: 100%;
padding: 0 8px;
button {
font-family: @font-body;
font-weight: 600;
height: 40px;
flex: 1 1 calc(50% - 5px);
&:nth-last-child(1):nth-child(odd) {
flex-basis: 100%;
}
}
.ability-card-action-cost {
margin: auto;
font-size: 1.5em;
}
}
}
}

View file

@ -1,31 +1,8 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
@import '../../utils/spacing.less';
.daggerheart.chat {
&.downtime {
display: flex;
flex-direction: column;
align-items: center;
.downtime-title-container {
display: flex;
flex-direction: column;
align-items: center;
.downtime-subtitle {
font-size: 17px;
}
}
.downtime-image {
width: 80px;
}
.action-use-button {
width: 100%;
}
}
&.resource-roll {
.reroll-message {
text-align: center;
@ -34,7 +11,7 @@
}
}
&.roll {
/* &.roll {
.dice-flavor {
text-align: center;
font-weight: bold;
@ -342,6 +319,9 @@
button {
flex: 1;
height: 40px;
font-family: @font-body;
font-weight: 600;
}
}
@ -356,59 +336,7 @@
&:not(.expanded) .dice-tooltip {
grid-template-rows: 0fr;
}
}
&.domain-card {
display: flex;
flex-direction: column;
align-items: center;
.domain-card-title {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
div {
font-size: 20px;
font-variant: small-caps;
font-weight: bold;
}
h2 {
width: 100%;
text-align: center;
margin: 0;
}
}
.ability-card-footer {
display: flex;
width: 100%;
margin-top: @fullMargin;
flex-wrap: wrap;
button {
border-radius: 6px;
background: @positive;
border-color: black;
flex-basis: calc(50% - 2px);
&:nth-of-type(n + 3) {
margin-top: @tinyMargin;
}
}
.ability-card-action-cost {
margin: auto;
font-size: 1.5em;
}
}
img {
width: 80px;
}
}
} */
button {
&.inner-button {
@ -435,3 +363,362 @@
}
}
}
.daggerheart,
#chat-notifications {
.chat-message {
--text-color: light-dark(@dark-blue, @golden);
--bg-color: light-dark(@dark-blue-40, @golden-40);
&.duality {
&.hope {
--text-color: @golden;
--bg-color: @golden-40;
.message-header,
.message-content {
background-color: @golden-bg;
}
}
&.fear {
--text-color: @chat-blue;
--bg-color: @chat-blue-40;
.message-header,
.message-content {
background-color: @chat-blue-bg;
}
}
&.critical {
--text-color: @chat-purple;
--bg-color: @chat-purple-40;
.message-header,
.message-content {
background-color: @chat-purple-bg;
}
}
}
.chat-roll {
font-size: var(--font-size-12);
padding: 0 20px;
> .roll-part-header {
font-size: var(--font-size-14);
}
.roll-part-header {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
color: light-dark(@dark, @beige);
margin: 5px 0;
span {
display: flex;
align-items: center;
gap: 5px;
text-transform: capitalize;
padding: 0 10px;
}
&:before,
&:after {
content: ' ';
height: 1px;
}
&:before {
background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, var(--text-color) 100%);
}
&:after {
background: linear-gradient(90deg, var(--text-color) 0%, rgba(0, 0, 0, 0) 100%);
}
}
.roll-part-extra {
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
margin-top: 8px;
}
.roll-part-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 5px;
padding: 5px 0;
.dice-tooltip {
width: 100%;
.wrapper {
display: flex;
flex-direction: column;
gap: 10px;
> :first-child:not(.target-selector) {
margin-top: 5px;
}
> :last-child {
margin-bottom: 5px;
}
}
}
.roll-result-container {
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
color: var(--text-color);
font-weight: 700;
font-family: 'Cinzel', sans-serif;
.roll-result-value {
font-size: var(--font-size-24);
}
.roll-result-desc {
font-size: var(--font-size-16);
margin-top: 2px;
}
}
.roll-difficulty {
margin-top: -5px;
}
}
}
.roll-dice {
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
font-weight: 700;
font-family: 'Cinzel', sans-serif;
flex-wrap: wrap;
.roll-die {
display: flex;
flex-direction: column;
gap: 3px;
label {
text-align: center;
height: var(--font-size-12);
}
> div {
display: flex;
align-items: center;
justify-content: center;
gap: 5px;
// font-size: var(--font-size-20);
}
}
}
fieldset {
display: flex;
flex-direction: column;
// gap: 10px;
border-color: var(--text-color);
border-radius: 5px;
legend {
display: flex;
align-items: center;
gap: 10px;
padding: 0 5px;
color: var(--text-color);
}
}
.target-selector {
+ .roll-part-extra {
margin: 0;
}
.target-choice {
display: flex;
font-size: var(--font-size-14);
color: var(--text-color);
padding: 5px 0;
.button-target-selection {
flex: 1;
text-align: center;
}
.button-target-selection:hover,
.target-selected {
font-weight: bold;
text-shadow: 0px 0px 8px var(--text-color);
}
}
}
i {
text-align: center;
}
.roll-target {
display: flex;
width: 100%;
gap: 10px;
align-items: center;
.target-img {
border-radius: 50%;
width: 40px;
height: 40px;
object-fit: cover;
}
.target-data {
flex: 1;
}
.target-save {
display: flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
&:hover > i {
scale: 1.2;
}
i {
&.fa-check {
color: @green;
}
&.fa-xmark {
color: @medium-red;
}
}
}
}
.roll-formula {
background-color: var(--bg-color);
color: var(--text-color);
border-radius: 4px;
padding: 3px 5px;
width: fit-content;
margin: auto;
}
.roll-difficulty,
.target-hit-status {
color: @green;
background-color: @green-10;
border: 1px solid currentColor;
border-radius: 4px;
padding: 3px 5px;
text-transform: uppercase;
font-weight: 600;
&.is-miss {
color: @medium-red;
background-color: @medium-red-10;
}
}
.target-hit-status {
width: fit-content;
margin-top: 2px;
}
div[data-action='expandRoll'] {
.roll-part-header > div > span {
&:before,
&:after {
content: '\f078';
font-family: var(--font-awesome);
color: var(--text-color);
transition: all 0.3s ease;
}
}
.on-reduced {
display: grid;
overflow: hidden;
grid-template-rows: 1fr;
transition: grid-template-rows 250ms ease;
.wrapper {
display: flex;
gap: 10px;
overflow: hidden;
}
}
&.expanded {
.roll-part-header > div > span {
&:before,
&:after {
transform: rotate(180deg);
}
}
.on-reduced {
grid-template-rows: 0fr;
}
}
}
.roll-part + .roll-part {
margin-top: 0;
}
.target-section {
.roll-part-content {
gap: 10px;
}
.roll-part-extra {
position: relative;
.target-pending-saves {
display: flex;
align-items: center;
justify-content: center;
height: 25px;
width: 25px;
&.is-absolute {
position: absolute;
bottom: 0;
right: 0;
}
}
}
}
.roll-buttons {
display: flex;
gap: 5px;
margin-top: 8px;
button {
flex: 1;
}
}
.font-20 {
font-size: var(--font-size-20);
}
.dice-roll .dice-tooltip fieldset {
margin-bottom: 5px;
.roll-dice {
gap: 10px;
}
}
}
}

View file

@ -0,0 +1,87 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
@import '../../utils/spacing.less';
.daggerheart.chat {
&.downtime {
display: flex;
flex-direction: column;
align-items: center;
details[open] {
.fa-chevron-down {
transform: rotate(180deg);
transition: all 0.3s ease;
}
}
.downtime-moves-list {
display: flex;
flex-direction: column;
gap: 5px;
width: 100%;
.fa-chevron-down {
transition: all 0.3s ease;
margin-left: auto;
}
.downtime-move {
width: 100%;
.downtime-label {
display: flex;
align-items: center;
gap: 5px;
border-bottom: 1px solid @golden;
margin: 0 8px;
padding-bottom: 5px;
width: -webkit-fill-available;
&:hover {
background: light-dark(@dark-blue-10, @golden-10);
cursor: pointer;
transition: all 0.3s ease;
}
.downtime-image {
width: 40px;
height: 40px;
border-radius: 3px;
}
.header-label {
padding: 8px;
.title {
font-size: 16px;
color: @golden;
font-family: @font-subtitle;
margin: 0;
}
.label {
font-size: 12px;
color: @beige;
font-family: @font-body;
margin: 0;
}
}
}
.description {
padding: 8px;
color: beige;
font-family: @font-body;
font-size: 14px;
}
}
.action-use-button {
width: -webkit-fill-available;
margin: 0 8px;
font-family: @font-body;
font-weight: 600;
height: 40px;
}
}
}
}

View file

@ -1,3 +1,12 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
.chat-message.dh-chat-message {
.message-content {
padding: 0;
}
}
.chat-message {
.duality-modifiers,
.duality-result,
@ -6,6 +15,66 @@
}
.message-content {
padding: 0 8px;
font-family: @font-body;
color: light-dark(@dark, @beige);
blockquote {
border-left: 5px solid light-dark(@dark-blue-40, @golden-40);
}
a[href] {
color: light-dark(@dark-blue, @golden);
}
a[href]:hover,
a[href].active {
font-weight: bold;
text-shadow: 0 0 8px light-dark(@dark-blue, @golden);
}
button {
background: light-dark(transparent, @golden);
border: 1px solid light-dark(@dark-blue, @dark-blue);
color: light-dark(@dark-blue, @dark-blue);
outline: none;
box-shadow: none;
&:hover {
background: light-dark(@light-black, @dark-blue);
color: light-dark(@dark-blue, @golden);
}
&.glow {
animation: glow 0.75s infinite alternate;
}
&:disabled {
background: light-dark(transparent, @golden);
color: light-dark(@dark-blue, @dark-blue);
opacity: 0.6;
cursor: not-allowed;
&:hover {
background: light-dark(transparent, @golden);
color: light-dark(@dark-blue, @dark-blue);
}
}
&.reverted {
background: light-dark(@dark-blue-10, @golden-10);
color: light-dark(@dark-blue, @golden);
border: 1px solid light-dark(@dark, transparent);
&:hover {
background: light-dark(transparent, @golden);
color: light-dark(@dark-blue, @dark-blue);
}
img {
border-radius: 3px;
}
}
}
.enriched-effect {
display: flex;
align-items: center;
@ -24,6 +93,24 @@
white-space: nowrap;
}
}
.dice-roll .dice-formula,
.dice-roll .dice-total {
box-shadow: none;
border: none;
background: light-dark(@dark-blue-40, @golden-40);
color: light-dark(@dark-blue, @golden);
font-weight: 600;
align-content: center;
}
.dice-roll .dice-formula {
height: 27px;
}
.dice-roll .dice-total {
height: 34px;
}
}
}

View file

@ -1,195 +0,0 @@
@import '../../utils/colors.less';
@import '../../utils/spacing.less';
.theme-colorful {
.chat-message.duality {
border-color: black;
padding: 8px 0 0 0;
fieldset.daggerheart.chat {
border-top-width: 0;
display: contents;
legend {
&:before,
&:after {
display: none;
}
}
}
.message-header {
color: var(--color-light-3);
padding: 0 8px;
}
&.hope {
background: linear-gradient(0, rgba(165, 42, 42, 0.6) 40px, rgba(0, 0, 0, 0.6));
}
&.fear {
background: linear-gradient(0, @fearBackgroundEnd, @fearBackgroundStart);
}
&.critical {
background: linear-gradient(0, @criticalBackgroundEnd, @criticalBackgroundStart);
}
.chat-message header {
color: var(--color-light-3);
}
> * {
padding: 0 8px;
}
.message-content {
.duality-modifiers,
.duality-result,
.dice-title {
display: flex;
}
.duality-modifiers {
display: flex;
gap: 2px;
margin-bottom: 4px;
flex-wrap: wrap;
.duality-modifier {
padding: 2px;
border-radius: 6px;
border: 1px solid;
background: var(--color-dark-6);
font-size: 12px;
white-space: nowrap;
}
}
.dice-flavor {
color: var(--color-light-1);
text-shadow: 0 0 1px black;
border-bottom: 1px solid;
display: flex;
align-items: end;
justify-content: space-between;
padding: 0 8px;
margin: 0 -8px 2px;
font-weight: unset;
}
.dice-result {
.duality-modifiers {
display: flex; // Default => display: none;
gap: 2px;
margin-bottom: 4px;
.duality-modifier {
padding: 2px;
border-radius: 6px;
border: 1px solid;
background: var(--color-dark-6);
font-size: 12px;
}
}
.dice-formula,
> .dice-total,
.part-header {
display: none;
}
.dice-tooltip {
grid-template-rows: 1fr;
.wrapper {
.tooltip-part {
display: flex;
align-items: end;
gap: 0.25rem;
.dice {
.dice-rolls {
margin-bottom: 0;
&.duality {
li {
display: flex;
align-items: center;
justify-content: center;
position: relative;
background: unset;
line-height: unset;
font-weight: unset;
}
}
}
}
.duality-modifier {
display: flex;
margin-bottom: 6px;
color: var(--color-light-1);
text-shadow: 0 0 1px black;
font-size: var(--font-size-16);
}
}
}
}
.target-selection {
label {
color: var(--color-light-1);
}
}
.target-section {
margin: 4px 0;
border: 2px solid;
margin-top: 5px;
.dice-total {
box-shadow: unset;
border: unset;
border-radius: unset;
font-size: var(--font-size-18);
}
}
.dice-actions {
justify-content: space-between;
&.duality-alone {
justify-content: end;
margin-top: -20px;
}
> * {
display: flex;
color: var(--color-light-1);
text-shadow: 0 0 1px black;
font-weight: bold;
background: var(--color-dark-1);
padding: 4px;
border-color: black;
min-height: unset;
height: 26px;
flex: unset;
margin: 0;
}
.duality-action {
border-radius: 0 6px 0 0;
margin-left: -8px;
&.duality-action-effect {
border-top-left-radius: 6px;
margin-left: initial;
}
}
.duality-result {
border-radius: 6px 0 0 0;
margin-right: -8px;
}
}
.duality-result {
display: flex;
color: var(--color-light-1);
text-shadow: 0 0 1px black;
font-weight: bold;
background: var(--color-dark-1);
padding: 4px;
border-color: black;
min-height: unset;
height: 26px;
flex: unset;
margin: 0;
margin-left: auto;
align-self: center;
border-radius: 6px;
}
}
}
button {
&.inner-button {
color: var(--color-light-1);
text-shadow: 0 0 1px black;
font-weight: bold;
background: var(--color-dark-1);
border-color: black;
}
}
}
}