{% extends "layout.html" %}
{% block title %}{{ username }}'s Living Dex{% endblock %}
{% block content %}

<ul>
{% for pokemon in dex %}

{% if loop.index0 % 30 == 0 %}
<h2>
    Box {{loop.index}} - {{loop.index0 + 30}}
</h2>
{% endif %}
<li
id={{ loop.index }}
{% if pokemon == 0 %}
class='pokemonCell uncaught'
{% else %}
class='pokemonCell caught'
{% endif %}
>
<div class=pokemonCellNumber>{{ loop.index }}</div>
<div class=pokemonCellName>{{ pokemonNames[loop.index - 1] }}</div>
</li>

{% if loop.index % 6 == 0 %}
<br>
{% endif %}

{% endfor %}
</ul>

{% endblock %}
{% block footer %}
<script type="text/javascript">var user = "{{ username }}";</script>
{% if session.username == username%}
<script src="{{ url_for('static', filename='editdex.js' ) }}"></script>
{% endif %}
{% endblock %}

{% extends "layout.html" %}
{% block title %}{{ username }}'s Living Dex{% endblock %}
{% block content %}

<ul>
{% for pokemon in dex %}

{% if loop.index0 % 30 == 0 %}
<div class='boxTitle'>
{% set boxStartIndex = loop.index %}
{% set boxEndIndex = loop.index0 + 30 %}
{{("%03d")|format(boxStartIndex)}} - {{("%03d")|format(boxEndIndex)}}
</div>
{% endif %}
<li
id={{ loop.index }}
{% if pokemon == 0 %}
class='pokemonCell uncaught'
{% else %}
class='pokemonCell caught'
{% endif %}
>
<div class='pokemonCellNumber'>{{ ("%03d")|format(loop.index) }}</div>
<div class='pokemonCellName'>{{ pokemonNames[loop.index - 1] }}</div>
</li>

{% if loop.index % 6 == 0 %}
<br>
{% endif %}

{% endfor %}
</ul>

{% endblock %}
{% block footer %}
<script type="text/javascript">var user = "{{ username }}";</script>
{% if session.username == username%}
<script src="{{ url_for('static', filename='editdex.js' ) }}"></script>
{% endif %}
{% endblock %}

Add leading 0's to box titles and dex numbers
Add leading 0's to box titles and dex numbers
