mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2026-04-06 05:07:16 +02:00
feat: add hover-intent prefetch for Open Deck button (WEB_PREFETCH=1) (#68)
This commit is contained in:
parent
1f01d8b493
commit
e8b8fab3f8
11 changed files with 138 additions and 5 deletions
|
|
@ -399,6 +399,9 @@
|
|||
{% endif %}
|
||||
<!-- Toast after reload, setup poller, nav highlighter moved to app.ts -->
|
||||
<!-- Hover card panel system moved to cardHover.ts -->
|
||||
{% if prefetch_enabled %}
|
||||
<script src="/static/js/prefetch-hover.js?v=20260401-1"></script>
|
||||
{% endif %}
|
||||
<!-- Price tooltip: lightweight fetch on mouseenter for .card-name-price-hover -->
|
||||
<script>
|
||||
(function(){
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
{% endif %}
|
||||
<form action="/decks/view" method="get" style="display:inline; margin:0;">
|
||||
<input type="hidden" name="name" value="{{ it.name }}" />
|
||||
<button type="submit" aria-label="Open deck {{ it.commander }}">Open</button>
|
||||
<button type="submit" aria-label="Open deck {{ it.commander }}"{% if prefetch_enabled %} data-prefetch="1" data-prefetch-url="/decks/view?name={{ it.name|urlencode }}"{% endif %}>Open</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue