Источник шаблона: newsfeed/category.html

{% extends 'newsfeed/base.html' %} {% load staticfiles %} {% load newsfeed_extras %} {% load thumbnail i18n %} {% block title %} <title>{{ object_list.category.0.title_ru|safe }} - UzNews.uz</title> {% endblock %} {% block menu_scroll %} {% get_scroll_menu object_list.category.0.id %} {% endblock %} {% block menu %} {% get_menu object_list.category.0.id %} {% endblock %} {% block before_banner %} {% if object_list.articleshead %} <!-- CATEGORY HEADER AND LINK TO ITSELF PAGE--> <div class="header"> <h1 class="contentHeader">{{ object_list.category.0.title_ru }}</h1> </div> <div class="wrapper"> <!-- TODAY'S PICTURE BIG ARTICLE--> {% for article in object_list.articleshead %} {% if forloop.first %} <!-- BIG ARTICLE BLOCK FOR TODAY'S PICTURE--> <div class="article top big"> <!-- ARTICLE TAGS--> <div class="articleTags"> {% if object_list.category.0.alias == 'popular' or object_list.category.0.alias == 'interesting' %} <!-- ARTICLE CATEGORY TAG--> <a href="{% url 'newsfeed:category' article.category.id %}" class="articleTag category">{{ article.category.title_ru|upper }}</a> {% endif %} {% if article.type_artc_new == 3 %} <!-- ARTICLE ONLINE TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag online">ОНЛАЙН</a> {% else %} {% if article.num_video > 0 %} <!-- ARTICLE VIDEO COUNT TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag video">{{ article.num_video }}</a> {% else %} {% if article.num_photo > 1 %} <!-- ARTICLE PHOTO COUNT TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag photo">{{ article.num_photo }}</a> {% endif %} {% endif %} {% endif %} <div class="clear"></div> </div> <!-- ARTICLE IMAGE [NEEDS TO SMALL IMAGE IN SRC ATTRIBUTE]--> <a href="{% url 'newsfeed:article' article.id %}" class="articleImage"> {% thumbnail article.image_name "600x335" crop="center" as im %} <img src="{{ im.url }}" class="image"/> {% endthumbnail %} </a> <!-- ARTICLE HEADER--> <a href="{% url 'newsfeed:article' article.id %}" class="articleHeader">{{ article.title_ru|safe }}</a> <!-- ARTICLE DESCRIPTION--> <div class="articleDescription dot">{{ article.desc_ru|safe }}</div> <!-- ARTICLE INFORMATION--> <div class="articleInfo"> <!-- ARTICLE PUBLISHING DATE--> <div class="articleDate">{{ article.date|mydate }}</div> <!-- ARTICLE VIEWS COUNT--> <div class="articleViews">{{ article.views }}</div> <!-- ARTICLE COMMENTARIES COUNT--> <a href="{% url 'newsfeed:article' article.id %}#commentaries" class="articleComments">{{ article.num_comm }}</a> <div class="clear"></div> </div> </div> {% else %} {% if forloop.counter0 <= 2 %} <!-- MEDIUM SIZE ARTICLE BLOCK FOR TODAY'S PICTURE BLOCK--> <div class="article top medium"> <!-- ARTICLE TAGS--> <div class="articleTags"> {% if object_list.category.0.alias == 'popular' or object_list.category.0.alias == 'interesting' %} <!-- CATEGORY TAG--> <a href="{% url 'newsfeed:category' article.category.id %}" class="articleTag category">{{ article.category.title_ru|upper }}</a> {% endif %} {% if article.type_artc_new == 3 %} <!-- ARTICLE ONLINE TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag online">ОНЛАЙН</a> {% else %} {% if article.num_video > 0 %} <!-- ARTICLE VIDEO COUNT TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag video">{{ article.num_video }}</a> {% else %} {% if article.num_photo > 1 %} <!-- ARTICLE PHOTO COUNT TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag photo">{{ article.num_photo }}</a> {% endif %} {% endif %} {% endif %} <div class="clear"></div> </div> <!-- ARTICLE IMAGE--> <a href="{% url 'newsfeed:article' article.id %}" class="articleImage"> {% thumbnail article.image_name "290x162" crop="center" as im %} <img src="{{ im.url }}" alt="{{ article.title_ru|safe }}" class="image"/> {% endthumbnail %} </a> <!-- ARTICLE HEADER--> <a href="{% url 'newsfeed:article' article.id %}" class="articleHeader">{{ article.title_ru|safe }}</a> <!-- ARTICLE INFORMATION--> <div class="articleInfo"> <!-- ARTICLE PUBLISHING DATE--> <div class="articleDate">{{ article.date|mydate }}</div> <!-- ARTICLE VIEWS COUNT--> <div class="articleViews">{{ article.views }}</div> <!-- ARTICLE COMMENTS COUNT--> <a href="{% url 'newsfeed:article' article.id %}#commentaries" class="articleComments">{{ article.num_comm }}</a> </div> </div> {% else %} {% if forloop.counter0 > 2 and forloop.counter0 <= 5 %} <!-- SMALL ARTICLE BLOCK FOR SPECIAL OR TODAY'S PICTURE CATEGORIES--> <div class="article top small"> <!-- ARTICLE TAGS--> <div class="articleTags"> {% if object_list.category.0.alias == 'popular' or object_list.category.0.alias == 'interesting' %} <!-- CATEGORY TAG--> <a href="{% url 'newsfeed:category' article.category.id %}" class="articleTag category">{{ article.category.title_ru|upper }}</a> {% endif %} {% if article.type_artc_new == 3 %} <!-- ARTICLE ONLINE TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag online">ОНЛАЙН</a> {% else %} {% if article.num_video > 0 %} <!-- ARTICLE VIDEO COUNT TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag video">{{ article.num_video }}</a> {% else %} {% if article.1.num_photo > 1 %} <!-- ARTICLE PHOTO COUNT TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag photo">{{ article.num_photo }}</a> {% endif %} {% endif %} {% endif %} <div class="clear"></div> </div> <!-- ARTICLE IMAGE--> <a href="{% url 'newsfeed:article' article.id %}" class="articleImage"> {% thumbnail article.image_name "290x162" crop="center" as im %} <img src="{{ im.url }}" alt="{{ article.title_ru }}" class="image"/> {% endthumbnail %} </a> <!-- ARTICLE HEADER--> <a href="{% url 'newsfeed:article' article.id %}" title="{{ article.title_ru|safe }}" class="articleHeader dot undot">{{ article.title_ru|safe }}</a> <!-- ARTICLE DESCRIPTION--> <div class="articleDescription dot">{{ article.desc_ru|safe }}</div> <!-- ARTICLE INFORMATION--> <div class="articleInfo"> <!-- ARTICLE PUBLISHING DATE--> <div class="articleDate">{{ article.date|mydate }}</div> <!-- ARTICLE VIEWS COUNT--> <div class="articleViews">{{ article.views }}</div> <!-- ARTICLE COMMENTARIES COUNT--> <a href="{% url 'newsfeed:article' article.id %}#commentaries" class="articleComments">{{ article.num_comm }}</a> </div> </div> {% endif %} {% endif %} {% endif %} {% endfor %} <div class="clear"></div> </div> {% endif %} {% endblock %} {% block posters_upper %} {% if object_list.articles %} <div class="rec posterWidget" data-zone="4" data-key="d41d8cd98f00b204e9800998ecf8427e"> </div> <div class="rec mobile posterWidget" data-zone="10" data-key="d41d8cd98f00b204e9800998ecf8427e"> </div> {% endif %} {% endblock %} {% block between_banner %} {% if object_list.articles %} <div class="wrapper"> {% for article in object_list.articles %} {% if forloop.counter0 < 3 %} {% if article.type_artc_new == 2 %} <!-- PARTNER'S ARTICLE BLOCK--> <div class="article partner"> <!-- ARTICLE IMAGE [NEEDS TO ".gradient" BLOCK INSIDE]--> <a href="{% url 'newsfeed:article' article.id %}" class="articleImage wide"> {% thumbnail article.image_name "848x180" crop="center" as im %} <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt="{{ article.title_ru|safe }}"/> {% endthumbnail %} <div class="gradient"></div> </a> <!-- ARTICLE HEADER--> <a href="{% url 'newsfeed:article' article.id %}" class="articleHeader">{{ article.title_ru|safe }}</a> <!--ARTICLE DESCRIPTION--> <div class="articleDescription dot">{{article.desc_ru|safe}}</div> <!-- ARTICLE INFORMATION--> <div class="articleInfo"> <!-- ARTICLE PUBLISHING DATE--> <div class="articleDate">{{ article.date|mydate }}</div> <!-- ARTICLE VIEWS COUNT--> <div class="articleViews">{{ article.views }}</div> <!-- ARTICLE COMMENTARIES COUNT--> <a href="{% url 'newsfeed:article' article.id %}#commentaries" class="articleComments">{{ article.num_comm }}</a> </div> <div class="clear"></div> </div> {% else %} {% if article.image_name == '' %} <!-- USUAL ARTICLE WITHOUT IMAGE--> <div class="article"> <!-- ARTICLE HEADER--> <a href="{% url 'newsfeed:article' article.id %}" class="articleHeader">{{ article.title_ru|safe }}</a> <!-- ARTICLE DESCRIPTION--> <div class="articleDescription dot">{{ article.desc_ru|safe }}</div> <!-- ARTICLE INFORMATION--> <div class="articleInfo"> <!-- ARTICLE PUBLISHING DATE--> <div class="articleDate">{{ article.date|mydate }}</div> <!-- ARTICLE VIEWS COUNT--> <div class="articleViews">{{ article.views }}</div> <!-- ARTICLE COMMENTARIES COUNT--> <a href="{% url 'newsfeed:article' article.id %}#commentaries" class="articleComments">{{ article.num_comm }}</a> </div> <div class="clear"></div> </div> {% else %} <!-- USUAL ARTICLE BLOCK--> <div class="article"> <!-- ARTICLE TAGS--> <div class="articleTags"> {% if object_list.category.0.alias == 'popular' or object_list.category.0.alias == 'interesting' %} <!-- CATEGORY TAG--> <a href="{% url 'newsfeed:category' article.category.id %}" class="articleTag category">{{ article.category.title_ru|upper }}</a> {% endif %} {% if article.type_artc_new == 3 %} <!-- ARTICLE ONLINE TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag online">ОНЛАЙН</a> {% else %} {% if article.num_video > 0 %} <!-- ARTICLE VIDEO COUNT TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag video">{{ article.num_video }}</a> {% else %} {% if article.0.num_photo > 1 %} <!-- ARTICLE PHOTO COUNT TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag photo">{{ article.num_photo }}</a> {% endif %} {% endif %} {% endif %} <div class="clear"></div> </div> <!-- ARTICLE IMAGE--> <a href="{% url 'newsfeed:article' article.id %}" class="articleImage"> {% thumbnail article.image_name "280x162" crop="center" as im %} <img src="{{ im.url }}" alt="{{ article.title_ru }}" class="image"/> {% endthumbnail %} </a> <!-- ARTICLE HEADER--> <a href="{% url 'newsfeed:article' article.id %}" class="articleHeader">{{ article.title_ru|safe }}</a> <!-- ARTICLE DESCRIPTION--> <div class="articleDescription dot">{{ article.desc_ru|safe }}</div> <!-- ARTICLE INFORMATION--> <div class="articleInfo"> <!-- ARTICLE PUBLISHING DATE--> <div class="articleDate">{{ article.date|mydate }}</div> <!-- ARTICLE VIEWS COUNT--> <div class="articleViews">{{ article.views }}</div> <!-- ARTICLE COMMENTS COUNT--> <a href="{% url 'newsfeed:article' article.id %}#commentaries" class="articleComments">{{ article.num_comm }}</a> <div class="clear"></div> </div> </div> {% endif %} {% endif %} {% endif %} {% endfor %} </div> {% endif %} {% endblock %} {% block posters_lower %} {% if object_list.articles|length > 3 %} <div class="rec posterWidget" data-zone="5" data-key="d41d8cd98f00b204e9800998ecf8427e"> </div> <div class="rec mobile posterWidget" data-zone="11" data-key="d41d8cd98f00b204e9800998ecf8427e"> </div> {% endif %} {% endblock %} {% block after_banner %} {% if object_list.articles|length > 3 %} <div class="wrapper"> {% for article in object_list.articles %} {% if forloop.counter0 >= 3 %} {% if article.type_artc_new == 2 %} <!-- PARTNER'S ARTICLE BLOCK--> <div class="article partner"> <!-- ARTICLE IMAGE [NEEDS TO ".gradient" BLOCK INSIDE]--> <a href="{% url 'newsfeed:article' article.id %}" class="articleImage wide"> {% thumbnail article.image_name "848x180" crop="center" as im %} <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt="{{ article.title_ru }}" class="image"/> {% endthumbnail %} <div class="gradient"></div> </a> <!-- ARTICLE HEADER--> <a href="{% url 'newsfeed:article' article.id %}" class="articleHeader">{{ article.title_ru|safe }}</a> <!--ARTICLE DESCRIPTION--> <div class="articleDescription dot">{{article.desc_ru|safe}}</div> <!-- ARTICLE INFORMATION--> <div class="articleInfo"> <!-- ARTICLE PUBLISHING DATE--> <div class="articleDate">{{ article.date|mydate }}</div> <!-- ARTICLE VIEWS COUNT--> <div class="articleViews">{{ article.views }}</div> <!-- ARTICLE COMMENTARIES COUNT--> <a href="{% url 'newsfeed:article' article.id %}#commentaries" class="articleComments">{{ article.num_comm }}</a> </div> <div class="clear"></div> </div> {% else %} {% if article.image_name == '' %} <!-- USUAL ARTICLE WITHOUT IMAGE--> <div class="article"> <!-- ARTICLE HEADER--> <a href="{% url 'newsfeed:article' article.id %}" class="articleHeader">{{ article.title_ru|safe }}</a> <!-- ARTICLE DESCRIPTION--> <div class="articleDescription dot">{{ article.desc_ru|safe }}</div> <!-- ARTICLE INFORMATION--> <div class="articleInfo"> <!-- ARTICLE PUBLISHING DATE--> <div class="articleDate">{{ article.date|mydate }}</div> <!-- ARTICLE VIEWS COUNT--> <div class="articleViews">{{ article.views }}</div> <!-- ARTICLE COMMENTARIES COUNT--> <a href="{% url 'newsfeed:article' article.id %}#commentaries" class="articleComments">{{ article.num_comm }}</a> </div> <div class="clear"></div> </div> {% else %} <!-- USUAL ARTICLE BLOCK--> <div class="article"> <!-- ARTICLE TAGS--> <div class="articleTags"> {% if object_list.category.0.alias == 'popular' or object_list.category.0.alias == 'interesting' %} <!-- CATEGORY TAG--> <a href="{% url 'newsfeed:category' article.category.id %}" class="articleTag category">{{ article.category.title_ru|upper }}</a> {% endif %} {% if article.type_artc_new == 3 %} <!-- ARTICLE ONLINE TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag online">ОНЛАЙН</a> {% else %} {% if article.num_video > 0 %} <!-- ARTICLE VIDEO COUNT TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag video">{{ article.num_video }}</a> {% else %} {% if article.0.num_photo > 1 %} <!-- ARTICLE PHOTO COUNT TAG--> <a href="{% url 'newsfeed:article' article.id %}" class="articleTag photo">{{ article.num_photo }}</a> {% endif %} {% endif %} {% endif %} <div class="clear"></div> </div> <!-- ARTICLE IMAGE--> <a href="{% url 'newsfeed:article' article.id %}" class="articleImage"> {% thumbnail article.image_name "280x162" crop="center" as im %} <img src="{{ im.url }}" alt="{{ article.title_ru }}" class="image"/> {% endthumbnail %} </a> <!-- ARTICLE HEADER--> <a href="{% url 'newsfeed:article' article.id %}" class="articleHeader">{{ article.title_ru|safe }}</a> <!-- ARTICLE DESCRIPTION--> <div class="articleDescription dot">{{ article.desc_ru|safe }}</div> <!-- ARTICLE INFORMATION--> <div class="articleInfo"> <!-- ARTICLE PUBLISHING DATE--> <div class="articleDate">{{ article.date|mydate }}</div> <!-- ARTICLE VIEWS COUNT--> <div class="articleViews">{{ article.views }}</div> <!-- ARTICLE COMMENTS COUNT--> <a href="{% url 'newsfeed:article' article.id %}#commentaries" class="articleComments">{{ article.num_comm }}</a> <div class="clear"></div> </div> </div> {% endif %} {% endif %} {% endif %} {% endfor %} <input id="categoryMore" name="loadMore" type="button" value="{% trans 'ПОКАЗАТЬ ЕЩЕ' %}" start="10" article="{{ object_list.articleshead.0.id }}" category="{{ object_list.category.0.id }}" class="loadMore button key"/> </div> {% endif %} {% endblock %}