Feature/238 companion sheet template (#252)

* new companion sheet templates

* Data fixes

* Changed from evasion.value to evasion.total in display

* add attack config and disable experience value input

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
Murilo Brito 2025-07-03 10:44:20 -03:00 committed by GitHub
parent 1b9bd45e9c
commit cae659b9a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 1027 additions and 106 deletions

View file

@ -0,0 +1,75 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.companion {
.partner-section,
.attack-section {
display: flex;
flex-direction: column;
align-items: center;
.title {
display: flex;
gap: 15px;
align-items: center;
h3 {
font-size: 20px;
}
}
.items-list {
display: flex;
flex-direction: column;
gap: 10px;
align-items: center;
}
}
.partner-placeholder {
display: flex;
opacity: 0.6;
text-align: center;
font-style: italic;
justify-content: center;
}
.experience-list {
display: flex;
flex-direction: column;
gap: 5px;
width: 100%;
margin-top: 10px;
align-items: center;
.experience-row {
display: flex;
gap: 5px;
width: 250px;
align-items: center;
justify-content: space-between;
.experience-name {
width: 180px;
text-align: start;
font-size: 14px;
font-family: @font-body;
color: light-dark(@dark, @beige);
}
}
.experience-value {
height: 25px;
width: 35px;
font-size: 14px;
font-family: @font-body;
color: light-dark(@dark, @beige);
align-content: center;
text-align: center;
background: url(../assets/svg/experience-shield.svg) no-repeat;
.theme-light & {
background: url('../assets/svg/experience-shield-light.svg') no-repeat;
}
}
}
}

View file

@ -0,0 +1,197 @@
@import '../../utils/colors.less';
@import '../../utils/fonts.less';
.application.sheet.daggerheart.actor.dh-style.companion {
.companion-header-sheet {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
.profile {
height: 235px;
width: 100%;
object-fit: cover;
cursor: pointer;
mask-image: linear-gradient(0deg, transparent 0%, black 10%);
}
.actor-name {
display: flex;
align-items: center;
position: relative;
top: -30px;
gap: 20px;
padding: 0 20px;
margin-bottom: -30px;
input[type='text'] {
font-size: 24px;
height: 32px;
text-align: center;
border: 1px solid transparent;
outline: 2px solid transparent;
transition: all 0.3s ease;
&:hover {
outline: 2px solid light-dark(@dark, @golden);
}
}
}
.status-section {
display: flex;
gap: 5px;
justify-content: center;
.status-number {
justify-items: center;
.status-value {
position: relative;
display: flex;
width: 50px;
height: 40px;
border: 1px solid light-dark(@dark-blue, @golden);
border-bottom: none;
border-radius: 6px 6px 0 0;
padding: 0 6px;
font-size: 1.5rem;
align-items: center;
justify-content: center;
background: light-dark(transparent, @dark-blue);
z-index: 2;
&.armor-slots {
width: 80px;
height: 30px;
}
}
.status-label {
padding: 2px 10px;
width: 100%;
border-radius: 3px;
background: light-dark(@dark-blue, @golden);
h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
font-size: 12px;
color: light-dark(@beige, @dark-blue);
}
}
}
.status-bar {
position: relative;
width: 100px;
height: 40px;
justify-items: center;
.status-label {
position: relative;
top: 40px;
height: 22px;
width: 79px;
clip-path: path('M0 0H79L74 16.5L39 22L4 16.5L0 0Z');
background: light-dark(@dark-blue, @golden);
h4 {
font-weight: bold;
text-align: center;
line-height: 18px;
color: light-dark(@beige, @dark-blue);
}
}
.status-value {
position: absolute;
display: flex;
padding: 0 6px;
font-size: 1.5rem;
align-items: center;
width: 100px;
height: 40px;
justify-content: center;
text-align: center;
z-index: 2;
color: @beige;
input[type='number'] {
background: transparent;
font-size: 1.5rem;
width: 40px;
height: 30px;
text-align: center;
border: none;
outline: 2px solid transparent;
color: @beige;
&.bar-input {
padding: 0;
color: @beige;
backdrop-filter: none;
background: transparent;
transition: all 0.3s ease;
&:hover,
&:focus {
background: @semi-transparent-dark-blue;
backdrop-filter: blur(9.5px);
}
}
}
.bar-label {
width: 40px;
}
}
.progress-bar {
position: absolute;
appearance: none;
width: 100px;
height: 40px;
border: 1px solid light-dark(@dark-blue, @golden);
border-radius: 6px;
z-index: 1;
background: @dark-blue;
&::-webkit-progress-bar {
border: none;
background: @dark-blue;
border-radius: 6px;
}
&::-webkit-progress-value {
background: @gradient-hp;
border-radius: 6px;
}
&.stress-color::-webkit-progress-value {
background: @gradient-stress;
border-radius: 6px;
}
&::-moz-progress-bar {
background: @gradient-hp;
border-radius: 6px;
}
&.stress-color::-moz-progress-bar {
background: @gradient-stress;
border-radius: 6px;
}
}
}
.level-up-label {
font-size: 24px;
padding-top: 8px;
}
}
.companion-navigation {
display: flex;
gap: 8px;
align-items: center;
width: 100%;
}
}
}

View file

@ -1,11 +1,18 @@
.application.sheet.daggerheart.actor.dh-style.companion {
.profile {
height: 80px;
width: 80px;
.theme-light & {
background: url('../assets/parchments/dh-parchment-light.png');
}
.theme-dark & {
background-image: url('../assets/parchments/dh-parchment-dark.png');
}
.temp-container {
position: relative;
top: 32px;
}
// .profile {
// height: 80px;
// width: 80px;
// }
// .temp-container {
// position: relative;
// top: 32px;
// }
}

View file

@ -23,6 +23,16 @@
box-shadow: none;
outline: 2px solid light-dark(@dark, @beige);
}
&:disabled[type='text'],
&:disabled[type='number'] {
outline: 2px solid transparent;
cursor: not-allowed;
&:hover {
background: transparent;
}
}
}
input[type='checkbox'] {
@ -52,6 +62,18 @@
&.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);
}
}
}
select {