mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2026-04-06 21:15:20 +02:00
fix: card hover preview broken for example cards in theme browser
Some checks are pending
CI / build (push) Waiting to run
Some checks are pending
CI / build (push) Waiting to run
This commit is contained in:
parent
33aced3c97
commit
1554212bc4
3 changed files with 3 additions and 3 deletions
|
|
@ -15,7 +15,7 @@ _No unreleased changes yet_
|
|||
_No unreleased changes yet_
|
||||
|
||||
### Fixed
|
||||
_No unreleased changes yet_
|
||||
- **Card hover preview in theme browser (#70)**: Example card thumbnails in the theme detail/browser page were showing the wrong card image (a fuzzy search for "Card") when hovered. The `<img>` elements inside `.ex-card` containers lacked `data-card-name` attributes, so the hover system fell back to the literal string "Card". Added `data-card-name`, `data-original-name`, `data-role`, and `data-tags` to example card `<img>` elements in `detail_fragment.html` to match the existing commander image pattern.
|
||||
|
||||
### Removed
|
||||
_No unreleased changes yet_
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ _No unreleased changes yet_
|
|||
_No unreleased changes yet_
|
||||
|
||||
### Fixed
|
||||
_No unreleased changes yet_
|
||||
- Card hover preview now works correctly for example cards in the theme browser
|
||||
|
||||
### Removed
|
||||
_No unreleased changes yet_
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@
|
|||
{% for c in theme.example_cards %}
|
||||
{% set base_c = (c.split(' - Synergy (')[0] if ' - Synergy (' in c else c) %}
|
||||
<div class="ex-card text-center" style="position:relative" data-card-name="{{ base_c }}" data-role="example_card" data-tags="{{ theme.synergies|join(', ') }}" data-original-name="{{ c }}">
|
||||
<img class="card-thumb w-full h-auto border border-[var(--border)] rounded-[10px]" loading="lazy" decoding="async" alt="{{ c }} image" src="{{ base_c|card_image('small') }}" />
|
||||
<img class="card-thumb w-full h-auto border border-[var(--border)] rounded-[10px]" loading="lazy" decoding="async" alt="{{ c }} image" src="{{ base_c|card_image('small') }}" data-card-name="{{ base_c }}" data-original-name="{{ c }}" data-role="example_card" data-tags="{{ theme.synergies|join(', ') }}" />
|
||||
<div class="card-price-overlay" data-price-for="{{ base_c }}" aria-hidden="true"></div>
|
||||
<div class="text-[11px] mt-1 whitespace-nowrap overflow-hidden text-ellipsis font-semibold card-ref" data-card-name="{{ base_c }}" data-tags="{{ theme.synergies|join(', ') }}" data-original-name="{{ c }}">{{ c }}</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue