evwiki/templates/result/tiles/batterydetails.html.twig
2025-05-28 09:04:15 +02:00

21 lines
1.1 KiB
Twig

<div class="tile battery-details-tile">
<div class="tile-title">Zellchemie</div>
<div class="battery-info" style="margin-top: 12px; text-align: center;">
<!-- Chemistry Badge -->
{% set chemistryColor = tile.batteryProperties.cellChemistry.value == 'LFP' ? '#28a745' : (tile.batteryProperties.cellChemistry.value == 'NMC' ? '#007acc' : '#6f42c1') %}
<div style="margin-bottom: 12px;">
<span style="background: {{ chemistryColor }}; color: white; padding: 6px 12px; border-radius: 12px; font-size: 14px; font-weight: bold;">
{{ tile.batteryProperties.cellChemistry.value }}
</span>
</div>
<!-- Manufacturer & Model -->
{% if tile.batteryProperties.manufacturer != 'Tesla' or tile.batteryProperties.model != '4680' %}
<div style="font-size: 12px; color: #666;">
{{ tile.batteryProperties.manufacturer }}<br>
{{ tile.batteryProperties.model }}
</div>
{% endif %}
</div>
<small style="color: #666;">Batterietechnologie</small>
</div>