Roll Chat message new design template

This commit is contained in:
Dapoolp 2025-07-30 21:40:42 +02:00
parent f14cb3936a
commit a3ef43aad6
21 changed files with 733 additions and 276 deletions

View file

@ -0,0 +1,289 @@
@import '../../utils/colors.less';
.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: @fear;
--bg-color: @fear-40;
.message-header, .message-content {
background-color: @fear-bg;
}
}
&.critical {
--text-color: @critical;
--bg-color: @critical-40;
.message-header, .message-content {
background-color: @critical-bg;
}
}
}
.chat-roll {
font-size: var(--font-size-12);
padding: 0 20px;
.roll-part-header {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
color: light-dark(@dark, @beige);
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;
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: 10px;
font-weight: 700;
font-family: 'Cinzel', sans-serif;
.roll-die {
display: flex;
flex-direction: column;
gap: 3px;
label {
text-align: center;
height: var(--font-size-12);
}
> div {
display: flex;
align-items: center;
gap: 5px;
font-size: var(--font-size-24);
margin: auto;
img {
height: 30px;
}
}
}
}
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;
justify-content: space-evenly;
font-size: var(--font-size-14);
color: var(--text-color);
padding: 5px 0;
.target-selected {
font-weight: bold;
text-shadow: 0px 0px 8px var(--text-color);
}
}
}
.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;
}
}
}
.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;
}
.target-hit-status {
width: fit-content;
margin-top: 2px;
&.is-miss {
color: @medium-red;
background-color: @medium-red-10;
}
}
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-buttons {
display: flex;
gap: 5px;
margin-top: 8px;
button {
flex: 1;
}
}
}

View file

@ -1,195 +1,195 @@
@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;
}
}
}
}
// .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;
// }
// }
// }
// }

View file

@ -19,3 +19,7 @@
@import './resources/resources.less';
@import './settings/settings.less';
@import './chat/chat-temp.less';