color: #6d251c;
grid-column: 1 / -1;
}
+
+ .requirement-title::after {
+ content: ': ';
+ }
}
}
\ No newline at end of file
nav {
- text-align: center;
- padding: 1rem 0;
+ text-align: center;
+ padding: 1rem 0;
- li {
- display: inline-block;
- list-style: none;
+ li {
+ display: inline-block;
+ list-style: none;
- &:before {
- content: '[';
- }
+ &:before {
+ content: '[';
+ }
- &:after {
- content: ']';
- }
+ &:after {
+ content: ']';
}
+ }
- a {
- text-decoration: none;
+ a {
+ text-decoration: none;
- &.active {
- font-weight: bold;
- text-decoration: underline;
- }
+ &.active {
+ font-weight: bold;
+ text-decoration: underline;
}
+ }
- &.filter {
- margin: 0;
- text-align: right;
- border: 0;
- padding: 0;
- position: relative;
- bottom: 5px;
-
- a {
- border-bottom-width: 0;
- z-index: 1;
- padding: 0.6rem;
- position: relative;
-
- &.active {
- background-color: #fff;
- border: solid #6d251c;
- border-width: 1px 1px 0;
- z-index: 4;
- }
- }
+ &.filter {
+ margin: 0;
+ text-align: right;
+ border: 0;
+ padding: 0;
+ position: relative;
+ bottom: 5px;
+
+ a {
+ border-bottom-width: 0;
+ z-index: 1;
+ padding: 0.6rem;
+ position: relative;
+
+ &.active {
+ background-color: #fff;
+ border: solid #6d251c;
+ border-width: 1px 1px 0;
+ z-index: 4;
+ }
}
+ }
}
.filter-container {
- .listing {
- border: solid 1px #6d251c;
- z-index: 2;
- position: relative;
- background-color: #fff;
- max-height: 400px;
- width: 100%;
- overflow: auto;
+ .listing {
+ border: solid 1px #6d251c;
+ z-index: 2;
+ position: relative;
+ background-color: #fff;
+ max-height: 400px;
+ width: 100%;
+ overflow: auto;
- .filter-result {
- display: none;
+ .filter-result {
+ display: none;
- &.active {
- display: block !important;
- }
- }
+ &.active {
+ display: block !important;
+ }
}
+ }
}
#main-nav {
- margin-bottom: 1rem;
- position: relative;
+ margin-bottom: 1rem;
+ position: relative;
- section {
- min-height: 344px;
- }
+ section {
+ min-height: 344px;
+ }
}
.tab {
- display: none;
+ display: none;
- &.active {
- display: block;
- }
+ &.active {
+ display: block;
+ }
}
.list-item {
- display: flex;
- text-align: left;
- padding: 0.5rem;
- overflow: hidden;
+ display: flex;
+ text-align: left;
+ padding: 0.5rem;
+ overflow: hidden;
- &:nth-child(even) {
- background-color: #f2f0ec;
- }
+ &:nth-child(even) {
+ background-color: #f2f0ec;
+ }
- .icon-wrapper {
- position: relative;
- margin-right: 0.5rem;
- width: 77px;
-
- .icon {
- width: 64px;
- height: 64px;
- padding: 0;
- background-repeat: no-repeat;
- background-size: contain;
- position: relative;
- border: solid 1px #6d251c;
- box-sizing: border-box;
- }
+ .icon-wrapper {
+ position: relative;
+ margin-right: 0.5rem;
+ width: 77px;
+
+ .icon {
+ width: 64px;
+ height: 64px;
+ padding: 0;
+ background-repeat: no-repeat;
+ background-size: contain;
+ position: relative;
+ border: solid 1px #6d251c;
+ box-sizing: border-box;
+ }
- .actions {
- margin-top: 0.2rem;
+ .actions {
+ margin-top: 0.2rem;
- button {
- width: 100%;
- font-size: 0.7rem;
- padding: 0.3rem 0.5rem;
- }
+ button {
+ width: 100%;
+ font-size: 0.7rem;
+ padding: 0.3rem 0.5rem;
+ }
- }
}
+ }
- .details {
- padding: 0 0.4rem;
- line-height: 1rem;
- flex-grow: 2;
- width: 100%;
+ .details {
+ padding: 0 0.4rem;
+ line-height: 1rem;
+ flex-grow: 2;
+ width: 100%;
- &>div {
- margin-bottom: 4px;
- }
+ &>div {
+ margin-bottom: 4px;
+ }
- .name {
- font-weight: bold;
- background: linear-gradient(90deg, #ecd4a8 0%, transparent 40%);
- border-bottom: 2px solid #6d251c;
- padding: 4px;
- font-size: 0.9rem;
- }
+ .name {
+ font-weight: bold;
+ background: linear-gradient(90deg, #ecd4a8 0%, transparent 40%);
+ border-bottom: 2px solid #6d251c;
+ padding: 4px;
+ font-size: 0.9rem;
+ }
- .stat-mods {
- font-size: 0.8rem;
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
- gap: 0.2rem;
+ .stat-mods {
+ font-size: 0.8rem;
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
+ gap: 0.2rem;
+ margin: 0.5rem 0;
+
+ .requirement {
+ display: grid;
+ grid-template-columns: auto 1fr;
+ gap: 0.2rem;
+ border: solid 1px #b19e81;
+ font-size: 0.7rem;
+
+ .requirement-title {
+ text-transform: uppercase;
+ background-color: #e2d6c3;
+ border-right: solid 1px #b19e81;
+ padding: 0.1rem 0.2rem;
+ width: 35px;
+ text-align: center;
}
- .requirements {
- font-size: 0.8rem;
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
- gap: 0.2rem;
-
- .requirement-title {
- font-weight: bold;
- text-transform: capitalize;
- }
+ .requirement-value {
+ padding: 0.1rem;
+ background-color: #fefbf4;
}
+ }
+ }
+ .requirements {
+ font-size: 0.8rem;
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
+ gap: 0.2rem;
+ .requirement-title {
+ font-weight: bold;
+ text-transform: capitalize;
+ }
}
-
+ }
}
\ No newline at end of file
const diff = effectiveDamage - val;
// calculate any stat boost from the player
- return `<div class="requirement"><span class="requirement-title">${name}</span>:
-<span class="requirement-value tooltip ${typeof val === 'number' ? (val > 0 ? "success": "error") : ""}" title="${val}(item) + ${diff}(from stats)">${valSign}${effectiveDamage}</span></div>`;
+ return `<div class="requirement"><span class="requirement-title">${name}</span><span class="requirement-value tooltip ${typeof val === 'number' ? (val > 0 ? "success": "error") : ""}" title="${val}(item) + ${diff}(from stats)">${valSign}${effectiveDamage}</span></div>`;
}
if(typeof val === 'number') {
valSign = val > 0 ? '+' : '-';
}
- return `<div class="requirement"><span class="requirement-title">${name}</span>: <span class="requirement-value ${typeof val === 'number' ? (val > 0 ? "success": "error") : ""}">${valSign}${val}${percent ? '%' : ''}</span></div>`;
+ return `<div class="requirement"><span class="requirement-title">${name}</span><span class="requirement-value ${typeof val === 'number' ? (val > 0 ? "success": "error") : ""}">${valSign}${val}${percent ? '%' : ''}</span></div>`;
}
function renderInventoryItem(player: Player, item: EquippedItemDetails , action: (item: EquippedItemDetails) => string): string {
valSign = val > 0 ? '+' : '-';
}
- return `<span title="${title}"><span class="requirement-title">${display}</span>: <span class="requirement-value ${opts.unsigned ? '' : (val > 0 ? "success": "error")}">${opts.unsigned ? val : `${valSign}${val}`}</span></span>`;
+ return `<div class="requirement" title="${title}"><span class="requirement-title">${display}</span><span class="requirement-value ${opts.unsigned ? '' : (val > 0 ? "success": "error")}">${opts.unsigned ? val : `${valSign}${val}`}</span></div>`;
}
function renderStatBoost(name: ItemStatBoostAbbr, val: number | string, title?: string): string {
if(typeof val === 'number') {
valSign = val > 0 ? '+' : '-';
}
- return `<div class="requirement"><span class="requirement-title" title="${title}">${name}</span>: <span class="requirement-value ${typeof val === 'number' ? (val > 0 ? "success": "error") : ""}">${valSign}${val}</span></div>`;
+ return `<div class="requirement"><span class="requirement-title" title="${title}">${name}</span><span class="requirement-value ${typeof val === 'number' ? (val > 0 ? "success": "error") : ""}">${valSign}${val}</span></div>`;
}
function renderRequirement(name: string, val: number | string, currentVal?: number): string {
if (currentVal && typeof val === 'number') {
colorIndicator = currentVal >= val ? 'success' : 'error';
}
- return `<div class="requirement"><span class="requirement-title">${name}</span>: <span class="requirement-value ${colorIndicator}">${val.toLocaleString()}</span></div>`;
+ return `<div class="requirement"><span class="requirement-title">${name}</span><span class="requirement-value ${colorIndicator}">${val.toLocaleString()}</span></div>`;
}
function renderShopItem(item: (ShopItem & Item), action: (item: (ShopItem & Item)) => string): string {
return `
<div class="details">
- <div class="name">${item.name}${item.equipment_slot === 'TWO_HANDED' ? ' (2H)': ''}</div>
+ <div class="name">${item.name}${item.equipment_slot === 'TWO_HANDED' ? ' (2H)': ''}
+ <span class="right store-cost">${item.cost.toLocaleString()}G</span>
+ </div>
<div class="stat-mods">
${item.boosts.defence ? renderStatBoost('DEF', item.boosts.defence) : ''}
${item.boosts.strength ? renderStatBoost('STR', item.boosts.strength) : ''}
${item.boosts.damage_mitigation ? renderStatBoost('MIT', item.boosts.damage_mitigation.toString())+'%' : ''}
${renderStat(isSpell ? 'Uses': 'Durability', isSpell ? 'Uses': 'DUR', item.maxAp, { unsigned: true })}
</div>
- ${item.hasOwnProperty('id') ? `<div class="store-cost">${item.cost.toLocaleString()}G</div>` : ''}
<div class="requirements">
${item.requirements.level ? renderRequirement('LVL', item.requirements.level, player.level): ''}
${item.requirements.strength ? renderRequirement('STR', item.requirements.strength, player.strength): ''}