Template source: _city_articles.html

{% load i18n publication_tags front_tags %} {% for city in cities %} <section class="cat-box line-bottom"> <div class="container-fluid"> <div class="cat-box-title"> <h2 class="no-padding {{ category.color_class }} no-margin" {% if city in city_category_slugs %}id="city-desktop"{% endif %}> {% if city.slug in city_category_slugs %} {{ city }} {% else %} <a href="{% url 'category_single' city.slug %}"> {{ city.title }} </a> {% endif %} </h2> <span> <a href="{% url 'category_single' city.slug %}" class="{{ cat_color_class }}"> {% trans "Show more" %} {{ city.title }} <i class="fa fa-angle-right"></i> </a> </span> </div> <div class="cat-box-gallery"> <div class="row article-row"> {% for city_articles_row in cities_articles|get_item:city %} {% for article in city_articles_row.articles %} {% if forloop.counter == city_articles_row.random %} <div class="col-sm-40"> {% include '_article_card_square.html' with article=article city_category=articles.get_city_category %} </div> {% else %} <div class="col-sm-15"> {% include '_article_card.html' with article=article city_category=articles.get_city_category %} </div> {% endif %} {% endfor %} {% endfor %} </div> </div> </div> </section> {% endfor %}