Generate grid

This commit is contained in:
thibaud-leclere
2026-01-31 16:17:24 +01:00
parent 1ebf8b99b3
commit a196fac6c6
10 changed files with 158 additions and 40 deletions

View File

@@ -1 +1,26 @@
{% extends 'base.html.twig' %}
{% block body %}
<table id="actors">
{% set iActor = 0 %}
{% for mainChar in mainActor.name|split('') %}
{% if not mainChar|match('/[a-zA-Z]/') %}
<tr><td></td></tr>
{% else %}
{% set actor = actors[iActor] %}
<tr>
{% set i = 0 %}
{% set start = middle - actor.pos %}
{% for c in range(0, width) %}
{% if c >= start and c - start < actor.actor.name|length %}
<td {% if c - start == actor.pos %}style="color:red;"{% endif %}>{{ actor.actor.name|slice(c - start, 1)|upper }}</td>
{% else %}
<td></td>
{% endif %}
{% endfor %}
</tr>
{% set iActor = iActor + 1 %}
{% endif %}
{% endfor %}
</table>
{% endblock %}