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

{% extends 'newsfeed/base.html' %} {% load staticfiles i18n %} {% load newsfeed_extras %} {% load thumbnail %} {% block title %} <title>{{ obj_artc.title_ru|safe }} - UzNews.uz</title> {% endblock %} {% block open_graph %} <!-- OPEN GRAPH PROTOCOL FOR SHARING:--> <meta property='og:title' content='{{ obj_artc.title_ru|striptags|escape }}'/> {% thumbnail obj_artc.image_name "450x236" crop="center" as im %} <meta property='og:image' content='https://{{ host }}{{ im.url }}'/> {% endthumbnail %} <meta property='og:image:width' content='450'/> <meta property='og:image:height' content='236'/> <meta property='og:description' content='{{ obj_artc.desc_ru|striptags|escape }}'/> <meta property='og:type' content='article'/> <meta property='og:url' content='{% current_url %}'/> <meta property='og:site_name' content='{{ host }}'/> <meta property='fb:admins' content='USER_ID'/> <meta property='fb:app_id' content='BMdIBMRxqvj'/> {% endblock %} {% block branding %} <script>(function (b, i, t, s) { b[s] = b[s] || []; if (!b._pstrs) { b._pstrs = 1; var o = i, c = o.createElement(t), f = 'getElementsByTagName'; c.type = 'text/javascript'; c.charset = 'UTF-8'; c.async = true; c.src = s; var h = o[f]('body')[0]; h.appendChild(c); } })(window, document, 'script', 'https://adclick.uz/static/reclame/scripts/posters.js');</script> <div id="branding" class="posterWidget brandingWrapper" data-zone="3" data-key="d41d8cd98f00b204e9800998ecf8427e"> </div> <div id="mobileBranding" class="posterWidget brandingWrapper" data-zone="9" data-key="d41d8cd98f00b204e9800998ecf8427e"> </div> {% endblock branding %} {% block menu_scroll %} {% get_scroll_menu obj_artc.category.id %} {% endblock %} {% block menu %} {% get_menu obj_artc.category.id %} {% endblock %} {% block main %} <div class="main oneArticle bar"> <!-- ARTICLE INFORMATION--> <div class="header"> <!-- ARTICLE CATEGORY--> <a href="{% url 'newsfeed:category' obj_artc.category.id %}" class="contentHeader">{{obj_artc.category.title_ru}}</a> <div class="articleInfo"> {% if obj_artc.source_name %} <!-- ARTICLE SOURCE OR AUTHOR--> <a href="{{ obj_artc.source_link }}" rel="nofollow" target="_blank" class="articleSource">{{ obj_artc.source_name }}</a> {% endif %} <!-- ARTICLE PUBLICATION'S DATE--> <div class="articleDate">{{ obj_artc.date|mydate|lower }}</div> <!-- ARTICLE VIEWS COUNT--> <div class="articleViews">{{ obj_artc.views }}</div> <!-- ARTICLE COMMENTARIES COUNT--> <a href="#commentaries" class="articleComments commentsCount">{{ obj_artc.num_comm }}</a> <div class="clear"></div> </div> <div class="clear"></div> </div> <div class="wrapper"> <div class="article one"> <!-- ARTICLE HEADER--> <h1 class="articleHeader">{{ obj_artc.title_ru|safe }}</h1> <!-- ARTICLE DESCRIPTION--> <div class="articleDescription">{{ obj_artc.desc_ru|safe}}</div> <!-- ARTICLE IMAGE [NEEDS: - WRAPPER AS LINK WIDTH '.articleImage .preview' CLASSES, data-rel="lightcase:myCollection, href="PATH TO BIG IMAGE" ATTRIBUTES, - CHILDREN IS IMG ELEMENT WIDTH src="PATH TO MEDIUM IMAGE" ATTRIBUTE, alt="ARTICLE HEADER" ATTRIBUTEs, - CHILDREN IS <div class="imageAuthor" /> ELEMENT WIDTH CHILDREN AS 2 <span /> ELEMENTS WITH NAME OF AUTHOR IMAGE (IF IT IS)] --> {% if obj_artc.image_name != '' %} {% thumbnail obj_artc.image_name "1280x712" crop="center" as im %} <a href="{{ im.url }}" data-rel="lightcase:myCollection" title="{{ obj_artc.title_ru|safe }}" class="articleImage preview"> {% endthumbnail %} {% thumbnail obj_artc.image_name "875x490" crop="center" as im %} <img src="{{im.url}}" alt="{{ obj_artc.title_ru|safe }}"/> {% endthumbnail %} {% if obj_artc.image_author %} <div class="imageAuthor"><span>{% trans 'Фото:' %}</span><span>{{ obj_artc.image_author }}</span></div> {% endif %} </a> {% endif %} {% if obj_artc.author %} <div class="article-author author-box"> <!-- ARTICLE AUTHOR IMAGE--> <div class="author-box__image"> <img src="{{obj_artc.author.photo.url}}" alt="{{obj_artc.author.name}}" /> </div> <div class="author-box__info"> <!-- ARTICLE AUTHOR NAME--> <div class="author-box__name">{{obj_artc.author.name}}</div> <!-- ARTICLE AUTHOR ABOUT INFORMATION--> <div class="author-box__about">{{obj_artc.author.short_description}}</div> <!-- ARTICLE AUTHOR PAGE LINK--> <a href="{% url 'newsfeed:get_author' obj_artc.author.id %}" title="Показать все статьи автора" class="author-box__link">Все статьи автора</a> </div> </div> {% endif %} <!-- ARTICLE TEXT--> <div class="articleText"> {{ obj_artc.text_ru|safe }} </div> </div> <div id="adfox_155740984112876393" style=”overflow:hidden”></div> <script> window.Ya.adfoxCode.createAdaptive({ ownerId: 308813, containerId: 'adfox_155740984112876393', params: { pp: 'g', ps: 'dhag', p2: 'gkaq' } }, ['phone'], { tabletWidth: 830, phoneWidth: 480, isAutoReloads: false }); </script> <div id="inpage_VI-281467-0-485974350"></div> <script type="text/javascript"> if (typeof(pr) == 'undefined') { var pr = Math.floor(Math.random() * 4294967295) + 1; } (function(w, d, n, s, t) { w[n] = w[n] || []; w[n].push(function() { Ya.Context.AdvManager.render({ blockId: "VI-281467-0", renderTo: 'inpage_VI-281467-0-485974350', inpage: { slide: true, visibleAfterInit: false, adFoxUrl: "//ads.adfox.ru/239538/getCode?p1=cbhgv&p2=foun&puid1=&puid2=&puid3=&puid4=&puid5=&puid6=&puid8=&puid9=&puid10=&puid11=&puid12=&puid13=&puid14=&puid15=&puid16=&puid17=&puid21=&puid22=&puid23=&puid27=&puid30=&puid31=&puid32=&puid34=&puid35=&puid51=&puid52=&puid55=&fmt=1&pr="+pr, insertAfter: 'undefined', insertPosition: '0' }, }, function callback (params) { // callback }); }); t = d.getElementsByTagName("script")[0]; s = d.createElement("script"); s.type = "text/javascript"; s.src = "//an.yandex.ru/system/context.js"; s.async = true; t.parentNode.insertBefore(s, t); })(this, this.document, "yandexContextAsyncCallbacks"); </script> <!-- SHARING BUTTONS--> <script type="text/javascript" async> (function (w, doc) { if (!w.__utlWdgt) { w.__utlWdgt = true; var d = doc, s = d.createElement('script'), g = 'getElementsByTagName'; s.type = 'text/javascript'; s.charset = 'UTF-8'; s.async = true; s.src = ('https:' == w.location.protocol ? 'https' : 'http') + '://w.uptolike.com/widgets/v1/uptolike.js'; var h = d[g]('body')[0]; h.appendChild(s); } })(window, document); </script> <div data-background-alpha="0.0" data-buttons-color="#ffffff" data-counter-background-color="#ffffff" data-share-counter-size="12" data-top-button="false" data-share-counter-type="separate" data-share-style="10" data-mode="share" data-like-text-enable="false" data-mobile-view="false" data-icon-color="#ffffff" data-orientation="horizontal" data-text-color="#ffffff" data-share-shape="rectangle" data-sn-ids="fb.tw.gp.vk.tm." data-share-size="30" data-background-color="#ffffff" data-preview-mobile="false" data-mobile-sn-ids="fb.vk.tw.wh.ok.vb.tm." data-pid="1655246" data-counter-background-alpha="1.0" data-following-enable="false" data-exclude-show-more="true" data-selection-enable="false" class="uptolike-buttons"></div> </div> <div class="rec posterWidget" data-zone="6" data-key="d41d8cd98f00b204e9800998ecf8427e"> </div> <div class="rec mobile posterWidget" data-zone="12" data-key="d41d8cd98f00b204e9800998ecf8427e"> </div> <div id="commentaries"></div> <!--COMMENTARIES BLOCK--> <!--COMMENTARIES BLOCK HEADER--> <div class="header"> <span class="contentHeader">{% trans 'комментарии' %}</span> </div> <div class="wrapper"> {% if obj_comm %} {% for comment in obj_comm %} <!-- COMMENT--> <div class="comment"> <!-- COMMENT AUTHOR NAME--> <div class="commentName">{{ comment.author }}</div> <!-- COMMENT DATE--> <div class="commentDate">{{ comment.date|mydate }}</div> <div class="clear"></div> <!-- COMMENT TEXT--> <div class="commentText">{{ comment.text|striptags }}</div> </div> {% endfor %} {% if next_page_number > 0 %} <input id="commentMore" name="loadMore" type="button" value="{% trans 'ПОКАЗАТЬ ЕЩЕ' %}" article="{{obj_artc.id}}" start="{{ next_page_number }}" class="loadMore button key"/> {% endif %} {% endif %} {% if social_user %} <!-- SPECIAL BLOCK FOR ADDING COMMENT NEEDS TO SHOW WHEN USER HAS AUTHORISED--> <div class="comment add"> <!-- COMMENT ADDING FORM--> <form action="{% url 'newsfeed:addcomment' obj_artc.id %}" method="post"> <!-- COMMENT AUTHOR NAME--> <div id="commentAuthor" class="commentName"></div> <!-- COMMENT TEXT--> <textarea id="commentArea" name="comment" placeholder="{% trans 'Ваше сообщение' %}"></textarea> <!-- COMMENT SUBMIT BUTTON--> <input id="addComment" type="submit" value="{% trans 'Комментировать' %}" class="button key"/> <div class="clear"></div> </form> <div class="clear"></div> </div> {% else %} <div class="rec rtb"> <!-- Yandex.RTB R-A-247206-5 --> <div id="yandex_rtb_R-A-247206-5"></div> <script type="text/javascript"> (function (w, d, n, s, t) { w[n] = w[n] || []; w[n].push(function () { Ya.Context.AdvManager.render({ blockId: "R-A-247206-5", renderTo: "yandex_rtb_R-A-247206-5", async: true }); }); t = d.getElementsByTagName("script")[0]; s = d.createElement("script"); s.type = "text/javascript"; s.src = "//an.yandex.ru/system/context.js"; s.async = true; t.parentNode.insertBefore(s, t); })(this, this.document, "yandexContextAsyncCallbacks"); </script> </div> <div class="rec mobile rtb"></div> <div class="comment add"> <!-- COMMENTS NOTIFICATION--> <div class="someInfo">{% trans 'Приветствуются интересные и осмысленные комментарии по теме материала.' %}</div> <!-- COMMENT ADDING BUTTON [SHOWS ONLY WHEN USER ARE NOT AUTHORISED]--> <input type="button" name="addComment" value="{% trans 'ДОБАВИТЬ КОММЕНТАРИЙ' %}" data-link="#auth" class="addComment button key action"/> </div> <div class="clear"></div> {% endif %} </div> <div class="rec rtb"></div> <div class="rec mobile rtb"> <!-- Yandex.RTB R-A-247206-2 --> <div id="yandex_rtb_R-A-247206-2"></div> <script type="text/javascript"> (function(w, d, n, s, t) { w[n] = w[n] || []; w[n].push(function() { Ya.Context.AdvManager.render({ blockId: "R-A-247206-2", renderTo: "yandex_rtb_R-A-247206-2", async: true }); }); t = d.getElementsByTagName("script")[0]; s = d.createElement("script"); s.type = "text/javascript"; s.src = "//an.yandex.ru/system/context.js"; s.async = true; t.parentNode.insertBefore(s, t); })(this, this.document, "yandexContextAsyncCallbacks"); </script> </div> {% if obj_artc.tags_ru == '' %} {% get_same_articles obj_artc.title_ru obj_artc.id %} {% else %} {% get_same_articles obj_artc.tags_ru obj_artc.id %} {% endif %} <!-- ADDITIONAL BUTTONS--> <div class="activities"> <!-- TELEGRAM CHANNEL LINK--> <div class="activity telegram"> {% get_current_language as lang %} {% if lang == 'ru' %} <a href="https://t.me/uznews" rel="nofollow" class="buttonWrapper"> <img src="{% static 'newsfeed/images/assets/tg.png' %}"/> <span>{% trans 'НАШ КАНАЛ В ТЕЛЕГРАМ' %}</span> <div class="clear"></div> </a> {% else %} <a class="buttonWrapper" href="https://t.me/UzNewsUzb" rel="nofollow"> <img src="{% static 'newsfeed/images/assets/tg.png' %}"> <span>{% trans 'НАШ КАНАЛ В ТЕЛЕГРАМ' %}</span> <div class="clear"></div> </a> {% endif %} </div> <!-- SENT YOUR ARTICLE TO US LINK--> <div class="activity write"> <div class="buttonWrapper"> <span>{% trans 'У ВАС ЕСТЬ НОВОСТЬ?' %}</span> <span>{% trans 'Поделитесь с нами' %}</span> <div data-link="#sender" class="button action key">{% trans 'ВЫСЛАТЬ НОВОСТЬ' %}</div> <div class="clear"></div> </div> </div> <div class="clear"></div> </div> {% if obj_artc.type_artc_new != 1 %} {% if obj_spec %} <!-- SPECIAL PROJECT'S ARTICLE BLOCK--> <div class="article special"> <!-- ARTICLE IMAGE--> <a href="{% url 'newsfeed:article' obj_spec.0.id %}" class="articleImage wide"> {% thumbnail obj_spec.0.image_name "707x148" crop="center" as im %} <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" alt="{{ obj_spec.0.title_ru }}" class="image"/> {% endthumbnail %} <div class="gradient"></div> </a> <!-- ARTICLE HEADER--> <div class="articleHeader"> <span>{% trans 'СПЕЦПРОЕКТ:' %}</span> <span>{{ obj_spec.0.title_ru }}</span> </div> <a href="{% url 'newsfeed:article' obj_spec.0.id %}" class="articleLink key">{% trans 'подробнее' %}</a> </div> {% endif %} {% endif %} </div> {% endblock %}