96 lines
11 KiB
Django/Jinja
96 lines
11 KiB
Django/Jinja
{% extends "base.jinja2" %}{% load static %}{% load thumbnail %}{% load slug_ru %}
|
||
|
||
{% block page_title %}{% if EMPTY_STATE_TITLE %}{{ EMPTY_STATE_TITLE }}{% elif SELECTED_TAGS %}Тема: {% for I in SELECTED_TAGS %}{{ I.name }} - {% endfor %}{% elif TAGS_L %}Тема: {% for I in TAGS_IN_PAGE %}{% if I.slug in TAGS_L %}{{ I.name }} - {% endif %}{% endfor %}{% endif %}{% if PAGE_OF_LIST and not EMPTY_STATE_TITLE %}Страница {{ PAGE_OF_LIST|add:'1' }}{% elif not SELECTED_TAGS and not EMPTY_STATE_TITLE %}Главная{% endif %} | CADpoint{% endblock %}
|
||
{% block meta_title %}{% if EMPTY_STATE_TITLE %}{{ EMPTY_STATE_TITLE }}{% elif SELECTED_TAGS %}Тема: {% for I in SELECTED_TAGS %}{{ I.name }} - {% endfor %}{% elif TAGS_L %}Тема: {% for I in TAGS_IN_PAGE %}{% if I.slug in TAGS_L %}{{ I.name }} - {% endif %}{% endfor %}{% endif %}{% if PAGE_OF_LIST and not EMPTY_STATE_TITLE %}Страница {{ PAGE_OF_LIST|add:'1' }}{% elif not SELECTED_TAGS and not EMPTY_STATE_TITLE %}Главная{% endif %} | CADpoint{% endblock %}
|
||
{% block og_title %}{% if EMPTY_STATE_TITLE %}{{ EMPTY_STATE_TITLE }}{% elif SELECTED_TAGS %}Тема: {% for I in SELECTED_TAGS %}{{ I.name }} - {% endfor %}{% elif TAGS_L %}Тема: {% for I in TAGS_IN_PAGE %}{% if I.slug in TAGS_L %}{{ I.name }} - {% endif %}{% endfor %}{% endif %}{% if PAGE_OF_LIST and not EMPTY_STATE_TITLE %}Страница {{ PAGE_OF_LIST|add:'1' }}{% elif not SELECTED_TAGS and not EMPTY_STATE_TITLE %}Главная{% endif %} | CADpoint{% endblock %}
|
||
{% block twitter_title %}{% if EMPTY_STATE_TITLE %}{{ EMPTY_STATE_TITLE }}{% elif SELECTED_TAGS %}Тема: {% for I in SELECTED_TAGS %}{{ I.name }} - {% endfor %}{% elif TAGS_L %}Тема: {% for I in TAGS_IN_PAGE %}{% if I.slug in TAGS_L %}{{ I.name }} - {% endif %}{% endfor %}{% endif %}{% if PAGE_OF_LIST and not EMPTY_STATE_TITLE %}Страница {{ PAGE_OF_LIST|add:'1' }}{% elif not SELECTED_TAGS and not EMPTY_STATE_TITLE %}Главная{% endif %} | CADpoint{% endblock %}
|
||
{% block Description %}{% if EMPTY_STATE_MESSAGE %}{{ EMPTY_STATE_MESSAGE }}{% else %}CADpoint / {% if SELECTED_TAGS %}тег: {% for I in SELECTED_TAGS %}{{ I.name }} / {% endfor %}{% elif TAGS_L %}тег: {% for I in TAGS_IN_PAGE %}{% if I.slug in TAGS_L %}{{ I.name }} / {% endif %}{% endfor %}{% endif %}{% if PAGE_OF_LIST and not SELECTED_TAGS %}Страница {{ PAGE_OF_LIST|add:'1' }}{% elif not SELECTED_TAGS %}Главная{% endif %}{% endif %}{% endblock %}
|
||
{% block meta_description %}{% if EMPTY_STATE_MESSAGE %}{{ EMPTY_STATE_MESSAGE }}{% else %}CADpoint / {% if SELECTED_TAGS %}тег: {% for I in SELECTED_TAGS %}{{ I.name }} / {% endfor %}{% elif TAGS_L %}тег: {% for I in TAGS_IN_PAGE %}{% if I.slug in TAGS_L %}{{ I.name }} / {% endif %}{% endfor %}{% endif %}{% if PAGE_OF_LIST and not SELECTED_TAGS %}Страница {{ PAGE_OF_LIST|add:'1' }}{% elif not SELECTED_TAGS %}Главная{% endif %}{% endif %}{% endblock %}
|
||
{% block og_description %}{% if EMPTY_STATE_MESSAGE %}{{ EMPTY_STATE_MESSAGE }}{% else %}CADpoint / {% if SELECTED_TAGS %}тег: {% for I in SELECTED_TAGS %}{{ I.name }} / {% endfor %}{% elif TAGS_L %}тег: {% for I in TAGS_IN_PAGE %}{% if I.slug in TAGS_L %}{{ I.name }} / {% endif %}{% endfor %}{% endif %}{% if PAGE_OF_LIST and not SELECTED_TAGS %}Страница {{ PAGE_OF_LIST|add:'1' }}{% elif not SELECTED_TAGS %}Главная{% endif %}{% endif %}{% endblock %}
|
||
{% block twitter_description %}{% if EMPTY_STATE_MESSAGE %}{{ EMPTY_STATE_MESSAGE }}{% else %}CADpoint / {% if SELECTED_TAGS %}тег: {% for I in SELECTED_TAGS %}{{ I.name }} / {% endfor %}{% elif TAGS_L %}тег: {% for I in TAGS_IN_PAGE %}{% if I.slug in TAGS_L %}{{ I.name }} / {% endif %}{% endfor %}{% endif %}{% if PAGE_OF_LIST and not SELECTED_TAGS %}Страница {{ PAGE_OF_LIST|add:'1' }}{% elif not SELECTED_TAGS %}Главная{% endif %}{% endif %}{% endblock %}
|
||
{% block Keywords %}cadpoint, {% if SELECTED_TAGS %}{% for I in SELECTED_TAGS %}{{ I.name }}, {% endfor %}{% else %}{% for I in TAGS_IN_PAGE %}{{ I.name }}, {% endfor %}{% endif %}новости{% if PAGE_OF_LIST %} , стр. {{ PAGE_OF_LIST|add:'1' }}{% endif %}{% endblock %}
|
||
|
||
{% block CONTENT %}{# <!-- ХЛЕБНЫЕ КРОШКИ: НАЧАЛО -->#}
|
||
<div class="container bread-crumb">
|
||
<div class="row">
|
||
<nav class="col-12 х" aria-label="breadcrumb">
|
||
<ol class="breadcrumb">
|
||
<li class="breadcrumb-item nw s"><a href="/"><i class="bi bi-house-door" title="Главная"></i> Главная</a></li>{% if SELECTED_TAGS %}{% for t in SELECTED_TAGS %}
|
||
<li class="breadcrumb-item nw s"><a href="{{ TAGS_S|rm_tag:t.slug }}"><i class="bi bi-tag" title="тэг"></i> {{ t.name }}</a></li>{% endfor %}{% else %}{% for t in TAGS_IN_PAGE %}{% if t.slug in TAGS_L %}
|
||
<li class="breadcrumb-item nw s"><a href="{{ TAGS_S|rm_tag:t.slug }}"><i class="bi bi-tag" title="тэг"></i> {{ t.name }}</a></li>{% endif %}{% endfor %}{% endif %}{% if PAGE_OF_LIST %}
|
||
<li class="breadcrumb-item active nw s" aria-current="page">Страница {{ PAGE_OF_LIST|add:'1' }}</li>{% endif %}
|
||
</ol>
|
||
</nav>
|
||
</div>
|
||
</div>{#<!-- ХЛЕБНЫЕ КРОШКИ: КОНЕЦ -->#}
|
||
{#<!-- POINT-СРАНИЦА: НАЧАЛО -->#}<div class="container lenta">
|
||
<div class="row">
|
||
{#<!-- БОКОВАЯ НАВИГАЦИЯ: НАЧАЛО-->#}<nav class="col-12 col-lg-3 l-menu">
|
||
<h6>Теги текущей страницы:</h6>
|
||
{% include "blocks/tags-cloud.jinja2" %}
|
||
</nav>{#<!-- боковая навигация: конец-->#}
|
||
<div class="col-12 col-lg-9">
|
||
{% for i in LENTA %}<div class="row default-list">
|
||
<div class="col-md-4 d-none d-md-block{% if forloop.counter|divisibleby:2 %} order-last{% endif %}">
|
||
<a href="/item/{{ i.id }}-{{ i.szContentSlug }}?p={{ PAGE_OF_LIST }}&n={{ forloop.counter }}">{% if i.imgContentPreview is None %}
|
||
<img src="{% static 'img/og-cadpoint-default.png' %}" alt="" />{% else %}
|
||
<img srcset="{% thumbnail i.imgContentPreview 340x340 upscale %} 640w, {% thumbnail i.imgContentPreview 680x680 upscale %} 1200w"
|
||
sizes="(min-width: 1024px) 1200px, (min-width: 320px) 640px, 100vw"
|
||
src="{% thumbnail i.imgContentPreview 680x680 upscale %}"
|
||
alt="{{ i.szContentHead|safe_html_ss }}"
|
||
title="{{ i.szContentHead|safe_html_ss }}" />{% endif %}
|
||
</a>
|
||
</div>
|
||
<div class="col-12 col-md-8">
|
||
<time datetime="{{ i.tdContentPublishUp|date:'Y-m-d' }}">{{ i.tdContentPublishUp|date:'d E Y' }} <small>({{ i.tdContentPublishUp|date:'l'|lower }})</small></time>
|
||
<h3><a href="/item/{{ i.id }}-{{ i.szContentSlug }}?p={{ PAGE_OF_LIST }}&n={{ forloop.counter }}">{{ i.szContentHead|safe }}</a></h3>
|
||
<nav class="sm-tags">{% for t in i.tags.all%}{% if t.slug in TAGS_L %}<span class="active"><i class="bi bi-tag" title="тег" ></i> {{ t.name|lower }}</span>   {% else %}<a href="/tag_{{ t.slug|lower }}"><i class="bi bi-tag" title="тег" ></i> {{ t.name|lower }}</a>   {% endif %}{% endfor %}</nav>
|
||
{{ i.szContentIntro|safe }}
|
||
<p class="next"><a href="/item/{{ i.id }}-{{ i.szContentSlug }}?p={{ PAGE_OF_LIST }}&n={{ forloop.counter }}">Читать дальше →</a></p>
|
||
</div>
|
||
</div>{% endfor %}{% if LENTA %}{# НАВИГАЦИЯ ПО СТРАНИЦАМ СО СПИСКАМИ КОНТЕНТА ИЗ ПРОИЗВОЛЬНОЙ КАТЕГОРИИ: НАЧАЛО #}
|
||
<div class="row">
|
||
<nav class="col-12" aria-label="Навигация по страницам">
|
||
<ul class="pagination justify-content-center">
|
||
{% if PAGE_OF_LIST == 0 %}<li class="page-item disabled">
|
||
<a class="page-link" href="#" tabindex="-1" aria-disabled="true"><i class="bi bi-arrow-left px-2" title="Назад"></i> 1</a>
|
||
</li>{% else %}<li class="page-item">
|
||
<a class="page-link" href="{% if TAGS_L %}{{ TAGS_S }}{% endif %}/p0"><i class="bi bi-arrow-left px-2" title="Назад"></i> 1</a>
|
||
</li>
|
||
{% endif %}{% if PAGE_OF_LIST|add:'-3' > 0 and PAGE_OF_LIST|add:'-2' <= TOTAL_PAGE %}<li class="page-item"><a class="page-link" href="{% if TAGS_L %}{{ TAGS_S }}{% endif %}/p{{ PAGE_OF_LIST|add:'-3' }}">…</a></li>
|
||
{% endif %}{% if PAGE_OF_LIST|add:'-2' > 0 and PAGE_OF_LIST|add:'-1' <= TOTAL_PAGE %}<li class="page-item"><a class="page-link" href="{% if TAGS_L %}{{ TAGS_S }}{% endif %}/p{{ PAGE_OF_LIST|add:'-2' }}">{{ PAGE_OF_LIST|add:'-1' }}</a></li>
|
||
{% endif %}{% if PAGE_OF_LIST|add:'-1' > 0 and PAGE_OF_LIST <= TOTAL_PAGE %}<li class="page-item"><a class="page-link" href="{% if TAGS_L %}{{ TAGS_S }}{% endif %}/p{{ PAGE_OF_LIST|add:'-1' }}">{{ PAGE_OF_LIST }}</a></li>
|
||
{% endif %}{% if PAGE_OF_LIST != 0 and PAGE_OF_LIST != TOTAL_PAGE %}<li class="page-item disabled"><a class="page-link" href="#" aria-disabled="true">{{ PAGE_OF_LIST|add:'1' }}</a></li>
|
||
{% endif %}{% if PAGE_OF_LIST|add:'1' > 0 and PAGE_OF_LIST|add:'2' <= TOTAL_PAGE %}<li class="page-item"><a class="page-link" href="{% if TAGS_L %}{{ TAGS_S }}{% endif %}/p{{ PAGE_OF_LIST|add:'1' }}">{{ PAGE_OF_LIST|add:'2' }}</a></li>
|
||
{% endif %}{% if PAGE_OF_LIST|add:'2' > 0 and PAGE_OF_LIST|add:'3' <= TOTAL_PAGE %}<li class="page-item"><a class="page-link" href="{% if TAGS_L %}{{ TAGS_S }}{% endif %}/p{{ PAGE_OF_LIST|add:'2' }}">{{ PAGE_OF_LIST|add:'3' }}</a></li>
|
||
{% endif %}{% if PAGE_OF_LIST|add:'3' > 0 and PAGE_OF_LIST|add:'4' <= TOTAL_PAGE %}<li class="page-item"><a class="page-link" href="{% if TAGS_L %}{{ TAGS_S }}{% endif %}/p{{ PAGE_OF_LIST|add:'3' }}">…</a></li>
|
||
{% endif %}{% if PAGE_OF_LIST < TOTAL_PAGE %}<li class="page-item">
|
||
<a class="page-link" href="{% if TAGS_L %}{{ TAGS_S }}{% endif %}/p{{ TOTAL_PAGE }}">{{ TOTAL_PAGE|add:'1' }} <i class="bi bi-arrow-right px-2" title="Дальше"></i></a>
|
||
</li>{% else %}<li class="page-item disabled">
|
||
<a class="page-link" href="#" tabindex="-1" aria-disabled="true">{{ TOTAL_PAGE|add:'1' }} <i class="bi bi-arrow-right px-2" title="Дальше"></i></a>
|
||
</li>{% endif %}
|
||
</ul>
|
||
</nav>
|
||
</div>{# НАВИГАЦИЯ ПО СТРАНИЦАМ СО СПИСКАМИ КОНТЕНТА ИЗ ПРОИЗВОЛЬНОЙ КАТЕГОРИИ: КОНЕЦ #}{% endif %}
|
||
{% if not LENTA %}
|
||
<div class="row default-list">
|
||
<div class="col-12">
|
||
<div class="alert alert-warning mb-0" role="alert">
|
||
<h3 class="h5 mb-2">{% if EMPTY_STATE_TITLE %}{{ EMPTY_STATE_TITLE }}{% else %}Новостей не найдено{% endif %}</h3>
|
||
<p class="mb-0">{% if EMPTY_STATE_MESSAGE %}{{ EMPTY_STATE_MESSAGE }}{% else %}По выбранному разделу пока нет новостей.{% endif %}</p>
|
||
<p class="mb-0 mt-3">
|
||
<a href="/">На главную</a>
|
||
<span class="mx-2">·</span>
|
||
<a href="/alltags">Все теги</a>
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
</div>{#<!-- POINT-СРАНИЦА: КОНЕЦ -->#}{% endblock %}
|
||
|
||
{% block Top_JS1 %}<script type="text/javascript">
|
||
</script>{% endblock %}
|