Template source: category.html

{% extends 'base.html' %} {% load staticfiles i18n publication_tags crispy_forms_filters front_tags %} {% block title %}{% if not all_cat %}{{ category.title }}{% else %}Today's Stories{% endif %} | {{ block.super }}{% endblock %} {% block content %} <main id="category" class="sectionpadding"> <section> <div class="container-fluid"> <div class="title-row"> <h1 class="{% if cat_color_class %}{{ cat_color_class }}{% else %}maincolor{% endif %}"> {% if not all_cat %}{{ category.title }}{% else %}Today's Stories{% endif %} </h1> <div class="btn-rss {% if cat_color_class %}{{ cat_color_class }}-bg{% else %}mainbg{% endif %} pull-right"> {% if not all_cat %} {% if category.parent %} <a href="{% url 'category_feed' category.parent.slug %}"> {% else %} <a href="{% url 'category_feed' category.slug %}"> {% endif %} {% else %} <a href="{% url 'category_feed' %}"> {% endif %} Subscribe RSS <i class="fa fa-rss" aria-hidden="true"></i> </a> </div> {% if not category.parent %} <div class="category-newsletter-container"> <span class="{% if cat_color_class %}{{ cat_color_class }}{% else %}maincolor{% endif %}"> </span> <form action="" method="post" id="form_add_sub_cat"> {% csrf_token %} <input name="category-constant_contact" value="{{ category.title }}" type="text" hidden/> {{ newsletter_form.constant_contact }} <div class="form-group"> {% if sub_response %} <span class="confirm-sub-message"> {{ sub_response.message }} </span> {% endif %} {% if not all_cat %} {{ newsletter_form.email| custom_placeholder_cat:category.title }} {% else %} {{ newsletter_form.email| custom_placeholder_cat:"Today's Storie" }} {% endif %} <button class="btn">{% trans "Subscribe" %}</button> <div class="clearfix"></div> </div> </form> <div class="clearfix"></div> </div> {% endif %} <div class="clearfix"></div> </div> {% if is_city %} {% include '_city_articles.html' with cities=category.get_children cat_color_class=cat_color_class %} {% else %} <div class="row article-row"> {% for article in article_list %} {% if article.large %} <div class="col col-sm-40"> {% if not all_cat %} {% include '_article_card_square.html' with force_category=category %} {% elif article.get_city_category %} {% include '_article_card_square.html' with city_category=article.get_city_category %} {% else %} {% include '_article_card_square.html' %} {% endif %} </div> {% else %} <div class="col col-sm-15"> {% if not all_cat %} {% include '_article_card.html' with force_category=category %} {% elif article.get_city_category %} {% include '_article_card.html' with city_category=article.get_city_category %} {% else %} {% include '_article_card.html' %} {% endif %} </div> {% endif %} {% endfor %} </div> <div class="row"> <div class="pagination"> <span class="step-links"> {% if articles.has_previous %} <a class="btn page-btn" href="?page={{ articles.previous_page_number }}"> <i class="fa fa-angle-left"></i></a> {% endif %} <span class="current"> Page {{ articles.number }} {% trans 'of' %} {{ articles.paginator.num_pages }} </span> {% if articles.has_next %} <a class="btn page-btn" href="?page={{ articles.next_page_number }}"><i class="fa fa-angle-right"></i></a> {% endif %} </span> </div> </div> {% endif %} </div> </section> </main> {% endblock %}