mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-17 16:10:12 +01:00
refactor(web): consolidate inline JavaScript to TypeScript modules
Migrated app.js and components.js to TypeScript. Extracted inline scripts from base.html to cardHover.ts and cardImages.ts modules for better maintainability and code reuse.
This commit is contained in:
parent
ed381dfdce
commit
9379732eec
8 changed files with 1050 additions and 634 deletions
|
|
@ -4,7 +4,10 @@
|
|||
{% set display_label = record.name if '//' in record.name else record.display_name %}
|
||||
{% set placeholder_pixel = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==" %}
|
||||
<article class="commander-row" data-commander-slug="{{ record.slug }}" data-hover-simple="true">
|
||||
<div class="commander-thumb">
|
||||
<div class="commander-thumb"
|
||||
data-card-name="{{ record.name }}"
|
||||
data-original-name="{{ record.name }}"
|
||||
{% if record.layout %}data-layout="{{ record.layout }}"{% endif %}>
|
||||
{% set small = record.display_name|card_image('small') %}
|
||||
{% set normal = record.display_name|card_image('normal') %}
|
||||
<img
|
||||
|
|
@ -16,8 +19,9 @@
|
|||
decoding="async"
|
||||
width="160"
|
||||
height="223"
|
||||
data-card-name="{{ record.display_name }}"
|
||||
data-card-name="{{ record.name }}"
|
||||
data-original-name="{{ record.name }}"
|
||||
{% if record.layout %}data-layout="{{ record.layout }}"{% endif %}
|
||||
data-hover-simple="true"
|
||||
class="commander-thumb-img"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue