2019-09-11 05:09:42 +02:00
|
|
|
{% macro figure_layer(figure) %}
|
|
|
|
{% set figure_style %}{% filter cull_whitespace %}
|
2019-09-10 00:52:30 +02:00
|
|
|
{% if figure.opacity!=1 %}opacity: {{ figure.opacity }};{% endif %}
|
|
|
|
{% if figure.color!=1 %}color: {{ figure.color }};{% endif %}
|
|
|
|
transform:
|
|
|
|
{% if figure.offset|any %}translate({{ figure.offset[0]*100 }}%, {{ figure.offset[1]*100 }}%){% endif %}
|
|
|
|
{% if figure.rotation %}rotate({{ figure.rotation }}deg){% endif %}
|
|
|
|
{% if figure.flip_x %}scaleX(-1){% endif %}
|
|
|
|
{% if figure.flip_y %}scaleY(-1){% endif %}
|
|
|
|
{% if figure.scale!=1 %}scale({{ figure.scale }}){% endif %}
|
|
|
|
;
|
2019-09-11 05:09:42 +02:00
|
|
|
{% endfilter %}{% endset %}
|
2019-09-09 18:48:15 +02:00
|
|
|
|
2019-09-10 00:52:30 +02:00
|
|
|
<div style="{{ figure_style }}">
|
2019-09-11 05:09:42 +02:00
|
|
|
{% if figure.type == "material-icons" %}
|
|
|
|
{# https://material.io/icons/ #}
|
2019-09-10 00:52:30 +02:00
|
|
|
<i class="material-icons figure">{{ figure.name }}</i>
|
2019-09-11 05:09:42 +02:00
|
|
|
{% elif figure.type == "mdi" %}
|
|
|
|
{# https://materialdesignicons.com/ #}
|
2019-09-10 00:52:30 +02:00
|
|
|
<i class="mdi mdi-{{ figure.name }}"></i>
|
2019-09-11 05:09:42 +02:00
|
|
|
{% elif figure.type == "fa" %}
|
|
|
|
{# http://fontawesome.io/icons/ #}
|
2019-09-10 00:52:30 +02:00
|
|
|
<i class="fa fa-{{ figure.name }}"></i>
|
2019-09-11 05:09:42 +02:00
|
|
|
{% elif figure.type == "lnr" %}
|
|
|
|
{# https://linearicons.com/free #}
|
2019-09-10 00:52:30 +02:00
|
|
|
<span class="lnr lnr-{{ figure.name }}"></span>
|
2019-09-11 05:09:42 +02:00
|
|
|
{% elif figure.type == "oi" %}
|
|
|
|
{# https://useiconic.com/open #}
|
|
|
|
<span class="oi" data-glyph="{{ figure.name }}"></span>
|
|
|
|
{% elif figure.type == "svg" %}
|
|
|
|
{# /cards/svg #}
|
2019-09-19 02:43:21 +02:00
|
|
|
{% if figure.color == true %}
|
|
|
|
<img src="https://pvv.ntnu.no/~pederbs/cards/svg/data/{{ figure.name }}">
|
|
|
|
{% elif figure.color %}
|
|
|
|
<img src="https://pvv.ntnu.no/~pederbs/cards/svg/data/{{ figure.name }}" class="colored" style="--figure-color: {{ figure.color }}">
|
2019-09-11 05:09:42 +02:00
|
|
|
{% else %}
|
2019-09-19 02:43:21 +02:00
|
|
|
<img src="https://pvv.ntnu.no/~pederbs/cards/svg/data/{{ figure.name }}" class="colored">
|
2019-09-11 05:09:42 +02:00
|
|
|
{% endif %}
|
|
|
|
{% elif figure.type == "img" %}
|
|
|
|
{# /cards/img #}
|
2019-09-19 02:43:21 +02:00
|
|
|
{% if figure.color == true %}
|
|
|
|
<img src="https://pvv.ntnu.no/~pederbs/cards/img/data/{{ figure.name }}" class="colored">
|
|
|
|
{% elif figure.color %}
|
|
|
|
<img src="https://pvv.ntnu.no/~pederbs/cards/img/data/{{ figure.name }}" class="colored" style="--figure-color: {{ figure.color }}">
|
2019-09-11 05:09:42 +02:00
|
|
|
{% else %}
|
2019-09-19 02:43:21 +02:00
|
|
|
<img src="https://pvv.ntnu.no/~pederbs/cards/img/data/{{ figure.name }}">
|
2019-09-11 05:09:42 +02:00
|
|
|
{% endif %}
|
2019-10-06 16:03:07 +02:00
|
|
|
{% elif figure.type == "url" %}
|
2019-10-06 12:58:50 +02:00
|
|
|
{% if figure.color == true %}
|
|
|
|
<img src="{{ figure.name }}" class="colored">
|
|
|
|
{% elif figure.color %}
|
|
|
|
<img src="{{ figure.name }}" class="colored" style="--figure-color: {{ figure.color }}">
|
|
|
|
{% else %}
|
|
|
|
<img src="{{ figure.name }}">
|
|
|
|
{% endif %}
|
2019-09-11 05:09:42 +02:00
|
|
|
{% endif %}
|
2019-09-10 00:52:30 +02:00
|
|
|
</div>
|
2019-09-11 05:09:42 +02:00
|
|
|
{% endmacro %}
|
2019-09-10 00:52:30 +02:00
|
|
|
|
2019-10-06 13:27:33 +02:00
|
|
|
{% macro named_icon_to_emoji(name) %}
|
|
|
|
{% if "AIR" in name | upper %} 🌪
|
|
|
|
{% elif "ALCHEMY" in name | upper %} ⚗️
|
|
|
|
{% elif "ANIMAL" in name | upper %} 🐾
|
|
|
|
{% elif "COMBAT" in name | upper %} ⚔️
|
|
|
|
{% elif "CRAFTING" in name | upper %} ⚒
|
|
|
|
{% elif "DARK" in name | upper %} 💀
|
|
|
|
{% elif "DEFENCE" in name | upper %} 🛡
|
|
|
|
{% elif "EARTH" in name | upper %} 🌱
|
|
|
|
{% elif "FIRE" in name | upper %} 🔥
|
|
|
|
{% elif "HOLY" in name | upper %} ☀️
|
|
|
|
{% elif "INNATE" in name | upper %} 🧙
|
|
|
|
{% elif "MAGIC" in name | upper %} 🔮
|
|
|
|
{% elif "MARKSMANSHIP" in name | upper %} 🎯
|
|
|
|
{% elif "MARTIAL" in name | upper %} 🥊
|
|
|
|
{% elif "META" in name | upper %} 🧩
|
|
|
|
{% elif "PERFORMANCE" in name | upper %} 🎺
|
|
|
|
{% elif "SHAPESHIFTING" in name | upper %} 🐻
|
|
|
|
{% elif "SKULLDUGGERY" in name | upper %} ⚰️
|
|
|
|
{% elif "TECHNIQUE" in name | upper %} 🎲
|
|
|
|
{% elif "WATER" in name | upper %} 🌊
|
|
|
|
{% elif "WEAPONMASTER" in name | upper %} 🤺
|
|
|
|
{% else %} {{name}}
|
|
|
|
{% endif %}
|
|
|
|
{% endmacro %}
|
|
|
|
|
2019-09-19 02:43:21 +02:00
|
|
|
<div class="fjomp_card{{" " + card.style if card.style}}">
|
2019-10-06 13:27:33 +02:00
|
|
|
<header>
|
2019-10-06 22:13:01 +02:00
|
|
|
{{ card.title or xml.name }}
|
2019-10-06 13:27:33 +02:00
|
|
|
</header>
|
|
|
|
{% if card.icon %}
|
|
|
|
<div class="icon">
|
2019-10-06 21:43:37 +02:00
|
|
|
{% if " " in card.icon %}
|
|
|
|
{% for icon in card.icon.split(" ") %}
|
|
|
|
{{ named_icon_to_emoji(icon) }}
|
|
|
|
{% endfor %}
|
|
|
|
{% else %}
|
|
|
|
{{ named_icon_to_emoji(card.icon) }}
|
|
|
|
{% endif %}
|
2019-10-06 13:27:33 +02:00
|
|
|
</div>
|
2019-10-06 22:13:01 +02:00
|
|
|
{% elif xml.symbol %}
|
|
|
|
<div class="icon">
|
|
|
|
{{ xml.symbol }}
|
|
|
|
</div>
|
2019-10-06 13:27:33 +02:00
|
|
|
{% endif %}
|
2019-09-10 00:52:30 +02:00
|
|
|
<figure>
|
2019-09-11 05:09:42 +02:00
|
|
|
{% for figure in card.figures %}
|
|
|
|
{{ figure_layer(figure) }}
|
|
|
|
{% endfor %}
|
2019-09-10 00:52:30 +02:00
|
|
|
</figure>
|
2019-10-06 13:27:33 +02:00
|
|
|
<aside>
|
|
|
|
<ul>
|
2019-10-06 21:43:37 +02:00
|
|
|
{#
|
|
|
|
{% if card.cp %}
|
|
|
|
<li>CP: {{ card.cp }}</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if card.power %}
|
|
|
|
<li>Power: {{ card.power }}</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if card.difficulty %}
|
|
|
|
<li>Difficulty: {{ card.difficulty }}</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if card.playcost %}
|
|
|
|
<li>Playcost: {{ card.playcost }}</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if card.duration %}
|
|
|
|
<li>Duration: {{ card.duration }}</li>
|
|
|
|
{% endif %}
|
|
|
|
{% if card.range %}
|
|
|
|
<li>Range: {{ card.range }}</li>
|
|
|
|
{% endif %}
|
|
|
|
#}
|
|
|
|
{% if xml.playcost %}
|
|
|
|
{% for playcost in xml.playcost.split(",") %}
|
|
|
|
<li>{{ playcost }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2019-10-06 13:27:33 +02:00
|
|
|
{% for property in card.properties %}
|
|
|
|
<li>{{ property }}</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</aside>
|
2019-10-06 12:58:50 +02:00
|
|
|
<div class="costbar">
|
2019-10-06 21:43:37 +02:00
|
|
|
{% for cost in card.costs %}
|
|
|
|
<section>
|
|
|
|
{% if cost.split(" ") | length == 2 and cost.split(" ")[0] | int(-1) != -1 %}
|
|
|
|
<big>{{ cost.split(" ")[0] }}</big><br>
|
|
|
|
<small>{{ cost.split(" ")[1] }}</small>
|
|
|
|
{% else %}
|
|
|
|
{{ cost }}
|
|
|
|
{% endif %}
|
|
|
|
</section>
|
|
|
|
{% endfor %}
|
|
|
|
{% for label, data in [
|
|
|
|
["Difficulty", xml.difficulty],
|
|
|
|
["Power", xml.power],
|
|
|
|
["Range", xml.range],
|
|
|
|
["Duration", xml.duration],
|
|
|
|
["CP", xml.cp]
|
|
|
|
] %}
|
|
|
|
{% if data %}
|
|
|
|
<section>
|
|
|
|
<big>{{ data }}</big><br>
|
|
|
|
<small>{{ label }}</small>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2019-10-06 12:58:50 +02:00
|
|
|
</div>
|
|
|
|
<div class="description">
|
2019-10-06 21:43:37 +02:00
|
|
|
{% if card.flavor %}
|
2019-09-10 00:52:30 +02:00
|
|
|
<center><i>"{{ card.flavor }}"</i></center>
|
2019-10-06 21:43:37 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if card.description %}
|
2019-09-10 00:52:30 +02:00
|
|
|
<center>{{ card.description | markdown | safe }}</center>
|
2019-10-06 22:13:01 +02:00
|
|
|
{% elif xml.description %}
|
|
|
|
<center>{{ xml.description | markdown | safe }}</center>
|
2019-10-06 21:43:37 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if card.steps %}
|
2019-09-10 00:52:30 +02:00
|
|
|
<ul>
|
2019-09-11 05:09:42 +02:00
|
|
|
{% for step in card.steps %}
|
|
|
|
<li>{{ step }}</li>
|
|
|
|
{% endfor %}
|
2019-09-10 00:52:30 +02:00
|
|
|
</ul>
|
2019-10-06 21:43:37 +02:00
|
|
|
{% endif %}
|
2019-10-06 12:58:50 +02:00
|
|
|
</div>
|
2019-09-10 00:52:30 +02:00
|
|
|
</div>
|
|
|
|
|
2019-09-11 05:09:42 +02:00
|
|
|
{# <br><pre>{{ card }}</pre> #}
|