Skip to content

Commit

Permalink
Add "post item to chat" buttons to character/cabal sheets.
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickburk1988 committed Feb 3, 2024
1 parent 19e9c67 commit 74ce2cf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 24 deletions.
23 changes: 11 additions & 12 deletions style/unknown-armies.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@
border-radius:0;
}
.unknownarmies.sheet.cabal .item-list--milestones .item-list__header,.unknownarmies.sheet.cabal .item-list--milestones .item-list__item{
grid-template-columns:5fr 1fr 4rem;
grid-template-columns:5fr 2fr 6rem;
padding-left:.625rem;
}
.unknownarmies.sheet.cabal .item-list--artifacts [data-action=create-item]{
border-radius:0;
}
.unknownarmies.sheet.cabal .item-list--artifacts .item-list__header,.unknownarmies.sheet.cabal .item-list--artifacts .item-list__item{
grid-template-columns:3fr 2fr 1fr 4rem;
grid-template-columns:3fr 1fr 6rem;
padding-left:.625rem;
}
.unknownarmies.sheet.cabal .item-list--items [data-action=create-item]{
border-radius:0;
}
.unknownarmies.sheet.cabal .item-list--items .item-list__header,.unknownarmies.sheet.cabal .item-list--items .item-list__item{
grid-template-columns:1fr 4rem;
grid-template-columns:1fr 6rem;
padding-left:.625rem;
}

Expand Down Expand Up @@ -198,28 +198,28 @@
border-radius:0;
}
.unknownarmies.sheet.character .item-list--rituals .item-list__header,.unknownarmies.sheet.character .item-list--rituals .item-list__item{
grid-template-columns:3fr 1fr 4rem;
grid-template-columns:3fr 1fr 6rem;
padding-left:.625rem;
}
.unknownarmies.sheet.character .item-list--spells [data-action=create-item]{
border-radius:0;
}
.unknownarmies.sheet.character .item-list--spells .item-list__header,.unknownarmies.sheet.character .item-list--spells .item-list__item{
grid-template-columns:3fr 1fr 4rem;
grid-template-columns:3fr 1fr 6rem;
padding-left:.625rem;
}
.unknownarmies.sheet.character .item-list--artifacts [data-action=create-item]{
border-radius:0;
}
.unknownarmies.sheet.character .item-list--artifacts .item-list__header,.unknownarmies.sheet.character .item-list--artifacts .item-list__item{
grid-template-columns:3fr 2fr 1fr 4rem;
grid-template-columns:3fr 1fr 6rem;
padding-left:.625rem;
}
.unknownarmies.sheet.character .item-list--items [data-action=create-item]{
border-radius:0;
}
.unknownarmies.sheet.character .item-list--items .item-list__header,.unknownarmies.sheet.character .item-list--items .item-list__item{
grid-template-columns:1fr 4rem;
grid-template-columns:1fr 6rem;
padding-left:.625rem;
}
.unknownarmies.sheet.character .identity:not(:first-of-type){
Expand Down Expand Up @@ -453,7 +453,7 @@
text-transform:uppercase;
}

.unknownarmies.sheet button[data-action=create-item],.unknownarmies.sheet button[data-action=destroy-item],.unknownarmies.sheet button[data-action=edit-item]{
.unknownarmies.sheet button[data-action=create-item],.unknownarmies.sheet button[data-action=destroy-item],.unknownarmies.sheet button[data-action=edit-item],.unknownarmies.sheet button[data-action=post-item]{
background-color:rgba(12,13,15,.1);
color:inherit;
}
Expand Down Expand Up @@ -485,14 +485,14 @@
.unknownarmies.sheet button[data-action=create-item]:focus,.unknownarmies.sheet button[data-action=create-item]:hover{
filter:brightness(20);
}
.unknownarmies.sheet button[data-action=destroy-item],.unknownarmies.sheet button[data-action=edit-item]{
.unknownarmies.sheet button[data-action=destroy-item],.unknownarmies.sheet button[data-action=edit-item],.unknownarmies.sheet button[data-action=post-item]{
border:0;
border-radius:0;
height:2rem;
transition:filter .1s;
width:2rem;
}
.unknownarmies.sheet button[data-action=destroy-item]:focus,.unknownarmies.sheet button[data-action=destroy-item]:hover,.unknownarmies.sheet button[data-action=edit-item]:focus,.unknownarmies.sheet button[data-action=edit-item]:hover{
.unknownarmies.sheet button[data-action=destroy-item]:focus,.unknownarmies.sheet button[data-action=destroy-item]:hover,.unknownarmies.sheet button[data-action=edit-item]:focus,.unknownarmies.sheet button[data-action=edit-item]:hover,.unknownarmies.sheet button[data-action=post-item]:focus,.unknownarmies.sheet button[data-action=post-item]:hover{
filter:brightness(20);
}
.unknownarmies.sheet button[data-action=improve]{
Expand Down Expand Up @@ -710,8 +710,7 @@
flex-grow:1;
}
.unknownarmies.sheet .lower-content{
grid-auto-rows:1fr;
height:100%;
grid-auto-rows:min-content;
}
.unknownarmies.sheet .lower-content--2-columns{
grid-template-columns:repeat(2, 1fr);
Expand Down
9 changes: 3 additions & 6 deletions template/actor/cabal-sheet.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<span>+{{item.system.percentage}}%</span>
</div>
<div class="item-list__column">
<button data-action="post-item"><i class="fas fa-message"></i></button>
<button data-action="edit-item"><i class="fas fa-edit"></i></button>
<button data-action="destroy-item"><i class="fas fa-trash"></i></button>
</div>
Expand All @@ -66,9 +67,6 @@
<div class="item-list__column">
<span>{{localize 'UA.Artifact'}}</span>
</div>
<div class="item-list__column">
<span>{{localize 'UA.Power'}}</span>
</div>
<div class="item-list__column">
<span>{{localize 'UA.Charges'}}</span>
</div>
Expand All @@ -79,13 +77,11 @@
<div class="item-list__column">
<span>{{item.name}}</span>
</div>
<div class="item-list__column">
<span>{{item.system.power}}</span>
</div>
<div class="item-list__column">
<span>{{#if item.system.charges.isHidden}}&quest;{{else}}{{#if item.system.charges.isEternal}}&infin;{{else}}{{item.system.charges.amount}}{{/if}}{{/if}}</span>
</div>
<div class="item-list__column">
<button data-action="post-item"><i class="fas fa-message"></i></button>
<button data-action="edit-item"><i class="fas fa-edit"></i></button>
<button data-action="destroy-item"><i class="fas fa-trash"></i></button>
</div>
Expand All @@ -108,6 +104,7 @@
<span>{{item.name}}</span>
</div>
<div class="item-list__column">
<button data-action="post-item"><i class="fas fa-message"></i></button>
<button data-action="edit-item"><i class="fas fa-edit"></i></button>
<button data-action="destroy-item"><i class="fas fa-trash"></i></button>
</div>
Expand Down
10 changes: 4 additions & 6 deletions template/actor/character-sheet.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
<span>{{item.system.cost.amount}}{{#if item.system.cost.type}} {{localize (concat 'UA.' (replace item.system.cost.type ' ' '') '_Abbreviation')}}{{/if}}</span>
</div>
<div class="item-list__column">
<button data-action="post-item"><i class="fas fa-message"></i></button>
<button data-action="edit-item"><i class="fas fa-edit"></i></button>
<button data-action="destroy-item"><i class="fas fa-trash"></i></button>
</div>
Expand Down Expand Up @@ -240,6 +241,7 @@
<span>{{item.system.cost.amount}}{{#if item.system.cost.type}} {{localize (concat 'UA.' (replace item.system.cost.type ' ' '') '_Abbreviation')}}{{/if}}</span>
</div>
<div class="item-list__column">
<button data-action="post-item"><i class="fas fa-message"></i></button>
<button data-action="edit-item"><i class="fas fa-edit"></i></button>
<button data-action="destroy-item"><i class="fas fa-trash"></i></button>
</div>
Expand All @@ -256,9 +258,6 @@
<div class="item-list__column">
<span>{{localize 'UA.Artifact'}}</span>
</div>
<div class="item-list__column">
<span>{{localize 'UA.Power'}}</span>
</div>
<div class="item-list__column">
<span>{{localize 'UA.Charges'}}</span>
</div>
Expand All @@ -269,13 +268,11 @@
<div class="item-list__column">
<span>{{item.name}}</span>
</div>
<div class="item-list__column">
<span>{{item.system.power}}</span>
</div>
<div class="item-list__column">
<span>{{#if item.system.charges.isHidden}}&quest;{{else}}{{#if item.system.charges.isEternal}}&infin;{{else}}{{item.system.charges.amount}}{{/if}}{{/if}}</span>
</div>
<div class="item-list__column">
<button data-action="post-item"><i class="fas fa-message"></i></button>
<button data-action="edit-item"><i class="fas fa-edit"></i></button>
<button data-action="destroy-item"><i class="fas fa-trash"></i></button>
</div>
Expand All @@ -298,6 +295,7 @@
<span>{{item.name}}</span>
</div>
<div class="item-list__column">
<button data-action="post-item"><i class="fas fa-message"></i></button>
<button data-action="edit-item"><i class="fas fa-edit"></i></button>
<button data-action="destroy-item"><i class="fas fa-trash"></i></button>
</div>
Expand Down

0 comments on commit 74ce2cf

Please sign in to comment.