khguide/templates/macros/kh2/macros.html

25 lines
602 B
HTML
Raw Normal View History

2025-02-08 13:35:55 +02:00
{% macro drop(label) %}
<div class="category">
<img
src="../assets/materials/{{ category.kind }}/{{ label }}.webp"
width="64"
height="64"
/>
<h1>{{ category.kind|capitalize +}} {{+ label|capitalize }}</h1>
</div>
<div class="enemies">
{% for drop in category.drops(label) %}
<div class="drop">
<img
src="../assets/enemies/{{ drop.from|lower }}.webp"
width="256"
height="256"
onerror="this.src = '../assets/enemies/unknown.webp'"
/>
<span>{{ drop.from +}}</span>
<span>{{+ drop.chance }}%</span>
</div>
{% endfor %}
</div>
{% endmacro %}