Minor UI tweaking

Fix some wrapping issues with long ID descriptions
This commit is contained in:
hppeng 2022-01-06 11:18:44 -08:00
parent f292b3d4a9
commit 839620b8ba
4 changed files with 628 additions and 627 deletions

View file

@ -425,11 +425,11 @@ input.equipment-input {
}
.dark-shadow {
box-shadow: 0rem 0rem 1.25rem 0.1875rem black;
box-shadow: 0rem 0rem 0.5rem 0.075rem black;
}
.dark-shadow-sm {
box-shadow: 0rem 0rem 0.625rem 0.125rem black;
box-shadow: 0rem 0rem 0.25rem 0.05rem black;
}
.border-dark-7 {

View file

@ -26,7 +26,6 @@
<hr/>
</div>
<div class="container py-5 vh-100 mx-0 mx-lg-auto">
<div class="row h-100 row-cols-1">
<div class="col">
<div class="row h-100 gx-lg-5 gy-3 mx-2 mx-lg-0">
<div class="col-xl-6">
@ -292,10 +291,10 @@
</div>
<div class="row align-items-center">
<div class="col-auto px-1 text-nowrap scaled-font">
<button class="border-dark text-light dark-5 rounded scaled-font rounded" onclick="copyBuild()">Copy short</button>
<button class="border-dark text-light dark-5 rounded scaled-font rounded" id=copy-button onclick="copyBuild()">Copy short</button>
</div>
<div class="col-auto px-1 text-nowrap scaled-font">
<button class="border-dark text-light dark-5 rounded scaled-font rounded" onclick="shareBuild()">Copy for sharing</button>
<button class="border-dark text-light dark-5 rounded scaled-font rounded" id=share-button onclick="shareBuild()">Copy for sharing</button>
</div>
</div>
</div>
@ -752,7 +751,6 @@
</footer>
</div>
</div>
</div>
<div class="container h-75 mx-0 mx-lg-auto dark-2 border border-4 scaled-font align-self-center" style="position: fixed; z-index: 2; overflow: auto; display: none;" id="search-container">
<div class="row justify-content-end">
<div class="col-auto">

View file

@ -740,9 +740,9 @@ function calculateBuildStats() {
}
for (let i in player_build.items) {
if (player_build.items[i].get("id") > 9999) {
continue;
}
// if (player_build.items[i].get("id") > 9999) {
// continue;
// }
displaysq2ExpandedItem(player_build.items[i], buildFields[i]);
collapse_element("#"+equipment_keys[i]+"-tooltip");
}

View file

@ -462,6 +462,7 @@ function displaysq2RolledID(item, id, elemental_format) {
let min_elem = document.createElement('div');
min_elem.classList.add('col', 'text-start');
min_elem.style.cssText += "flex-grow: 0";
let id_min = item.get("minRolls").get(id)
let style = id_min < 0 ? "negative" : "positive";
if(reversedIDs.includes(id)){
@ -472,7 +473,8 @@ function displaysq2RolledID(item, id, elemental_format) {
item_div.appendChild(min_elem);
let desc_elem = document.createElement('div');
desc_elem.classList.add('col', 'text-center', 'text-nowrap');
desc_elem.classList.add('col', 'text-center');//, 'text-nowrap');
desc_elem.style.cssText += "flex-grow: 1";
//TODO elemental format jank
if (elemental_format) {
apply_sq2_elemental_format(desc_elem, id);
@ -485,6 +487,7 @@ function displaysq2RolledID(item, id, elemental_format) {
let max_elem = document.createElement('div');
let id_max = item.get("maxRolls").get(id)
max_elem.classList.add('col', 'text-end');
max_elem.style.cssText += "flex-grow: 0";
style = id_max < 0 ? "negative" : "positive";
if (reversedIDs.includes(id)) {
style === "positive" ? style = "negative" : style = "positive";