{% extends "base.twig" %}
{% import 'macros/assets.twig' as assets %}

{% block title %}Índice de series{% endblock %}
{% block css %}
  {{ assets.css('shows_list') }}
{% endblock %}

{% block content %}
  <div class='content limited-width'>
    <h1>Índice de series</h1>

    <div id="letter-container">
      {% for letter, shows in shows_by_letter  %}
      <a class="letter" data-letter="{{letter}}" href="/shows#{{letter}}">{{ letter|upper }}</a>
      {% endfor %}
    </div>

    {% for letter, shows in shows_by_letter  %}
    <div class="shows-in-letter hidden" id="{{ letter }}">
      <ul>
        {% for i in range(0, shows|length - 1) %}
        {% set show = shows[i].show %}
        {% set seasons = shows[i].season_count %}
        <li>
          <a href='shows/{{ show.id }}'>
            <span>{{ show.name }}</span>
            {% if seasons != 1 %}
            <span class="season-info text small">({{ seasons }} temporadas)</span>
            {% else %}
            <span class="season-info text small">(1 temporada)</span>
            {% endif %}
          </a>
        </li>
        {% endfor %}
      </ul>
    </div>
    {% endfor %}
  </div>
{% endblock %}
{% block scripts %}
  {{ assets.js('shows_list') }}
{% endblock %}
{% extends "base.twig" %}
{% import 'macros/assets.twig' as assets %}

{% block title %}Índice de series{% endblock %}
{% block css %}
  {{ assets.css('shows_list') }}
{% endblock %}

{% block content %}
  <div class='content limited-width'>
    <h1>Índice de series</h1>

    <div id="letter-container">
      {% for letter, shows in shows_by_letter  %}
      <button class="letter" data-letter="{{letter}}">{{ letter|upper }}</button>
      {% endfor %}
    </div>

    {% for letter, shows in shows_by_letter  %}
    <div class="shows-in-letter hidden" id="{{ letter }}">
      <ul>
        {% for i in range(0, shows|length - 1) %}
        {% set show = shows[i].show %}
        {% set seasons = shows[i].season_count %}
        <li>
          <a href='shows/{{ show.id }}'>
            <span>{{ show.name }}</span>
            {% if seasons != 1 %}
            <span class="season-info text small">({{ seasons }} temporadas)</span>
            {% else %}
            <span class="season-info text small">(1 temporada)</span>
            {% endif %}
          </a>
        </li>
        {% endfor %}
      </ul>
    </div>
    {% endfor %}
  </div>
{% endblock %}
{% block scripts %}
  {{ assets.js('shows_list') }}
{% endblock %}
Remove jumping to show list after clicking a letter
Remove jumping to show list after clicking a letter
