diff --git a/d2warehouse/app/main.py b/d2warehouse/app/main.py index 9adb262..c1ad25c 100644 --- a/d2warehouse/app/main.py +++ b/d2warehouse/app/main.py @@ -222,7 +222,10 @@ def list_storage(stash_name: str): items[row["id"]] = Item.load_from_db(row["id"], db=db) return render_template( - "list_storage.html", stash_name=stash_name, storage_items=items + "list_storage.html", + stash_name=stash_name, + storage_items=items, + storage_count=lambda x: storage_count(x, stash_name), ) @@ -254,7 +257,10 @@ def list_storage_category(stash_name: str, category: str): items[row["id"]] = Item.load_from_db(row["id"], db=db) return render_template( - "list_storage.html", stash_name=stash_name, storage_items=items + "list_storage.html", + stash_name=stash_name, + storage_items=items, + storage_count=lambda x: storage_count(x, stash_name), ) diff --git a/d2warehouse/app/static/style.css b/d2warehouse/app/static/style.css index fe92afe..1f6e000 100644 --- a/d2warehouse/app/static/style.css +++ b/d2warehouse/app/static/style.css @@ -47,6 +47,27 @@ body { display: none; } +.storage-item-entry { + position: relative; + width: fit-content; +} + +.item-hover { + display: none; + position: absolute; + left: 0; + top: 30px; + z-index: 1000; + background: #222; + border: 1px solid #555; + padding: 8px; + min-width: 300px; +} + +.storage-item-entry:hover .item-hover { + display: block; +} + .item .name { font-weight: bold; } diff --git a/d2warehouse/app/templates/item.html b/d2warehouse/app/templates/item.html index 81aef81..08f312a 100644 --- a/d2warehouse/app/templates/item.html +++ b/d2warehouse/app/templates/item.html @@ -1,16 +1,13 @@ - - +