Skip to content

Commit

Permalink
[foundryvtt#729] Add list of contents to container sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
arbron committed Dec 29, 2022
1 parent 53266f6 commit e84ecf8
Show file tree
Hide file tree
Showing 10 changed files with 583 additions and 219 deletions.
220 changes: 131 additions & 89 deletions dnd5e.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@
/* ----------------------------------------- */
/* Sheet Styles */
/* ----------------------------------------- */
:root {
/* ----------------------------------------- */
/* Encumbrance & Capacity Bars */
/* ----------------------------------------- */
--dnd5e-capacity-container-background-color: #7a7971;
--dnd5e-capacity-container-border-color: #191813;
--dnd5e-capacity-background-color: #6c8aa5;
--dnd5e-capacity-border-color: #cde4ff;
--dnd5e-capacity-text-color: #eeeeee;
}
/* ----------------------------------------- */
/* Flexbox */
/* ----------------------------------------- */
Expand Down Expand Up @@ -1083,95 +1093,6 @@ h5 {
flex: 0 0 20px;
justify-content: flex-end;
}
.dnd5e.sheet.actor .inventory-filters .currency {
flex: 0 0 100%;
list-style: none;
margin: 4px 0 8px;
padding: 0;
font-size: 12px;
}
.dnd5e.sheet.actor .inventory-filters .currency label {
flex: 0;
margin-left: 8px;
text-align: right;
line-height: 20px;
color: #7a7971;
}
.dnd5e.sheet.actor .inventory-filters .currency input[type="text"],
.dnd5e.sheet.actor .inventory-filters .currency input[type="number"] {
flex: 0 0 48px;
text-align: center;
margin-left: 8px;
border-bottom: 2px groove #eeede0;
}
.dnd5e.sheet.actor .inventory-list {
padding: 0 5px;
}
.dnd5e.sheet.actor .inventory-list .item .item-name {
cursor: pointer;
}
.dnd5e.sheet.actor .inventory-list .item .item-name.rollable:hover .item-image {
background-image: url("../../icons/svg/d20-grey.svg") !important;
}
.dnd5e.sheet.actor .inventory-list .item .item-name.rollable .item-image:hover {
background-image: url("../../icons/svg/d20-black.svg") !important;
}
.dnd5e.sheet.actor .inventory-list .item .item-name i.attuned {
color: #7a7971;
}
.dnd5e.sheet.actor .inventory-list .item .item-name i.not-attuned {
color: #44191A;
}
.dnd5e.sheet.actor .inventory-list .item .item-uses input {
width: 24px;
text-align: center;
}
.dnd5e.sheet.actor .inventory-list .item .item-properties {
margin-top: 3px;
}
.dnd5e.sheet.actor .inventory-list .item .item-recharge {
flex: 0 0 80px;
text-align: right;
font-size: 11px;
white-space: nowrap;
}
.dnd5e.sheet.actor .inventory-list .inventory-header .item-controls a.item-create {
flex: 0 0 100%;
}
.dnd5e.sheet.actor .inventory-list .item-detail {
flex: 0 0 70px;
font-size: 12px;
text-align: center;
border-right: 1px solid #c9c7b8;
word-break: break-word;
white-space: nowrap;
overflow: hidden;
}
.dnd5e.sheet.actor .inventory-list .item-detail:last-child {
border-right: none;
}
.dnd5e.sheet.actor .inventory-list .item-detail.item-action {
flex: 0 0 100px;
}
.dnd5e.sheet.actor .inventory-list .item-detail.attunement {
flex: 0 0 24px;
}
.dnd5e.sheet.actor .inventory-list .item-weight {
flex: 0 0 60px;
border-left: 1px solid #c9c7b8;
border-right: 1px solid #c9c7b8;
}
.dnd5e.sheet.actor .inventory-list .item-controls {
flex: 0 0 44px;
}
.dnd5e.sheet.actor .inventory-list .item-summary {
flex: 0 0 100%;
font-size: 12px;
line-height: 16px;
padding: 0.25em 0.5em;
color: #191813;
border-top: 1px solid #c9c7b8;
}
.dnd5e.sheet.actor .encumbrance {
flex: 0 0 12px;
background: #7a7971;
Expand Down Expand Up @@ -1721,6 +1642,127 @@ h5 {
.dnd5e.sheet.item .loot-header {
margin-bottom: 10px;
}
.inventory-list {
padding: 0 5px;
}
.inventory-list .item .item-name {
cursor: pointer;
}
.inventory-list .item .item-name.rollable:hover .item-image {
background-image: url("../../icons/svg/d20-grey.svg") !important;
}
.inventory-list .item .item-name.rollable .item-image:hover {
background-image: url("../../icons/svg/d20-black.svg") !important;
}
.inventory-list .item .item-name i.attuned {
color: #7a7971;
}
.inventory-list .item .item-name i.not-attuned {
color: #44191A;
}
.inventory-list .item .item-uses input {
width: 24px;
text-align: center;
}
.inventory-list .item .item-properties {
margin-top: 3px;
}
.inventory-list .item .item-recharge {
flex: 0 0 80px;
text-align: right;
font-size: 11px;
white-space: nowrap;
}
.inventory-list .inventory-header .item-controls a.item-create {
flex: 0 0 100%;
}
.inventory-list .item-detail {
flex: 0 0 70px;
font-size: 12px;
text-align: center;
border-right: 1px solid #c9c7b8;
word-break: break-word;
white-space: nowrap;
overflow: hidden;
}
.inventory-list .item-detail:last-child {
border-right: none;
}
.inventory-list .item-detail.item-action {
flex: 0 0 100px;
}
.inventory-list .item-detail.attunement {
flex: 0 0 24px;
}
.inventory-list .item-weight {
flex: 0 0 60px;
border-left: 1px solid #c9c7b8;
border-right: 1px solid #c9c7b8;
}
.inventory-list .item-controls {
flex: 0 0 44px;
}
.inventory-list .item-summary {
flex: 0 0 100%;
font-size: 12px;
line-height: 16px;
padding: 0.25em 0.5em;
color: #191813;
border-top: 1px solid #c9c7b8;
}
.capacity {
flex: 0 0 12px;
margin-inline-end: 18px;
contain: content;
}
.capacity meter {
width: 100%;
background: var(--dnd5e-capacity-container-background-color);
border: 1px solid var(--dnd5e-capacity-container-border-color);
border-radius: 3px;
}
.capacity meter::-moz-meter-bar,
.capacity meter::-webkit-meter-bar {
height: calc(100% - 2px);
background: var(--dnd5e-capacity-background-color);
border: 1px solid var(--dnd5e-capacity-border-color);
border-radius: 2px;
}
.capacity label {
position: absolute;
top: 0;
right: 0;
padding-inline: 5px;
text-align: right;
color: var(--dnd5e-capacity-text-color);
text-shadow: 0 0 5px #000;
}
.inventory .inventory-header {
margin: 0 8px;
flex: 0 0 20px;
justify-content: flex-end;
}
.inventory .currency {
flex: 0 0 100%;
justify-content: flex-end;
margin: 4px 0 8px;
padding: 0;
font-size: var(--font-size-12);
}
.inventory .currency label {
flex: 0;
margin-left: 8px;
text-align: right;
line-height: 20px;
color: #7a7971;
}
.inventory .currency input[type="text"],
.inventory .currency input[type="number"] {
flex: 0 0 48px;
text-align: center;
margin-left: 8px;
border-bottom: 2px groove #eeede0;
}
/* ----------------------------------------- */
/* SRD Compendium */
/* ----------------------------------------- */
Expand Down
101 changes: 0 additions & 101 deletions less/actors.less
Original file line number Diff line number Diff line change
Expand Up @@ -470,107 +470,6 @@
margin: 0 8px;
flex: 0 0 20px;
justify-content: flex-end;

.currency {
flex: 0 0 100%;
list-style: none;
margin: 4px 0 8px;
padding: 0;
font-size: 12px;

label {
flex: 0;
margin-left: 8px;
text-align: right;
line-height: 20px;
color: @colorTan;
}
input[type="text"], input[type="number"] {
flex: 0 0 48px;
text-align: center;
margin-left: 8px;
border-bottom: @borderGroove;
}
}
}

// Inventory item lists
.inventory-list {
padding: 0 5px;
.item {
.item-name {
cursor: pointer;
&.rollable:hover .item-image {
background-image: url("../../icons/svg/d20-grey.svg") !important;
}
&.rollable .item-image:hover {
background-image: url("../../icons/svg/d20-black.svg") !important;
}
i.attuned { color: @colorTan; }
i.not-attuned { color: @colorCrimson; }
}

// Item uses
.item-uses input {
width: 24px;
text-align: center;
}

// Item Dropdown Properties
.item-properties {
margin-top: 3px;
}

// Charged
.item-recharge {
flex: 0 0 80px;
text-align: right;
font-size: 11px;
white-space: nowrap;
}
}

// Inventory Header
.inventory-header {
.item-controls a.item-create {
flex: 0 0 100%;
}
}

// Item Detail Sections
.item-detail {
flex: 0 0 70px;
font-size: 12px;
text-align: center;
border-right: 1px solid @colorFaint;
word-break: break-word;
white-space: nowrap;
overflow: hidden;
&:last-child { border-right: none; }
&.item-action {flex: 0 0 100px}
&.attunement {flex: 0 0 24px}
}

.item-weight {
flex: 0 0 60px;
border-left: 1px solid @colorFaint;
border-right: 1px solid @colorFaint;
}

// Item Control Buttons
.item-controls {
flex: 0 0 44px;
}

// Item Dropdown Summary
.item-summary {
flex: 0 0 100%;
font-size: 12px;
line-height: 16px;
padding: 0.25em 0.5em;
color: @colorDark;
border-top: 1px solid @colorFaint;
}
}

/* Encumbrance Bar */
Expand Down
1 change: 1 addition & 0 deletions less/dnd5e.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
@import "actors.less";
@import "advancement.less";
@import "items.less";
@import "inventory.less";
@import "journal.less";
@import "chat.less";
@import "character.less";
Expand Down
Loading

0 comments on commit e84ecf8

Please sign in to comment.