{% for row in range(dimensions) %} {% for column in range(dimensions) %} {% if grid[row][column] != empty %} {# There is a word in this cell #}
{% if (row, column) in starting_word_positions %} {# Start of a word #}
{{ starting_word_matrix[row][column] }}
{% endif %}
{% else %} {# This cell will have no characters #}
{% endif %} {% endfor %} {% endfor %}
{% set ns = namespace(tab_index_counter = 14) %}
{# Column one for across definitions #}

    {{ _('Across') }}

    {% for dict_ in definitions_a %} {% for num_label, definition in dict_.items()%}
  • {{ num_label }} {{ definition[1] }}
  • {% set ns.tab_index_counter = ns.tab_index_counter + 1 %} {% endfor %} {% endfor %}
{# Column two for downward definitions #}

    {{ _('Down') }}

    {% for dict_ in definitions_d %} {% for num_label, definition in dict_.items()%}
  • {{ num_label }} {{ definition[1] }}
  • {% set ns.tab_index_counter = ns.tab_index_counter + 1 %} {% endfor %} {% endfor %}
{# Reveal, check, and clear dropdowns and their respective buttons #}
{# Popup that displays on loading the web app - displays the crossword name, category and word count #} {# Popup that displays on completion of the crossword #}