luckymeowth/themes/lucky/templates/shortcodes/ptcg_card.html
Felipe Contreras Salinas a3e89e1e11 refactors y mejoras varias al tema (#4)
Reviewed-on: https://codeberg.org/LuckyMeowth/luckymeowth/pulls/4
Co-authored-by: Felipe Contreras Salinas <felipe@bstr.cl>
Co-committed-by: Felipe Contreras Salinas <felipe@bstr.cl>
2025-07-27 05:21:04 +02:00

19 lines
716 B
HTML

{%- import "macros/ptcg.html" as ptcg -%}
{% if nth == 1 and config.mode == "serve" %}
<script src="{{ get_url(path='ptcg-icons.js') }}" async></script>
{% endif %}
{%- set card = load_data(path="@/ptcg/cards/" ~ id ~ ".toml") -%}
{% if not display %}<div class="ptcg-card-popover" popover="auto" id="{{ id }}">{% endif %}
<div class="ptcg-card">
{{ ptcg::card_pic(id=id) }}
<div class="card-info">
{% if card.kind == "pokemon" %}
{{ ptcg::pokemon_card_info(card=card) }}
{% elif card.kind == "trainer" %}
{{ ptcg::trainer_card_info(card=card) }}
{% elif card.kind == "energy" %}
{{ ptcg::energy_card_info(card=card) }}
{% endif %}
</div>
</div>
{% if not display %}</div>{% endif %}