{% extends "base.html" %}
{% load static %}

{% block Last4Meta %}{{ DQ.dtEdited|date:"Y-m-d" }}{% endblock %}

{% block Description %}{% if DQ.szIntro %}{{ DQ.szIntro }} {% endif %}{{ DQ.szContent }}{% if AUTHOR %} ({{ AUTHOR.szAuthor }}){% endif %}{% endblock %}

{% block Keywords %}Цитаты, {% for i in TAGS %}{{ i.name|safe }}, {% endfor %}Высказвания{% endblock %}


{% block CopyrightAuthor4Meta %}{% if AUTHOR %}, {{ AUTHOR.szAuthor }} (слова){% endif %}{% endblock %}

<!--- ТИТУЛ --->
{% block Title %}DQ: {{ DQ.szContent }}{% if AUTHOR %} ({{ AUTHOR.szAuthor }}){% endif %}{% endblock %}

{% block ExtraHead %}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "CreativeWork",
  "name": "Dictum & Quotes #{{ DQ.id }}",
  "text": "{{ DQ.szContent|escapejs }}",
  {% if AUTHOR %}"author": {
    "@type": "Person",
    "name": "{{ AUTHOR.szAuthor|escapejs }}"
  },{% endif %}
  {% if IMAGE %}"image": "{{ request.scheme }}://{{ request.get_host }}{{ IMAGE.url }}",{% endif %}
  "keywords": "{% for i in TAGS %}{{ i.name|escapejs }}{% if not forloop.last %}, {% endif %}{% endfor %}",
  "inLanguage": "ru",
  "dateCreated": "{{ DQ.dtCreated|date:'Y-m-d' }}",
  "dateModified": "{{ DQ.dtEdited|date:'Y-m-d' }}"
}
</script>
{% endblock %}


{% block CONTENT %}{% include "blocks/header_nav.html" %}
<div class="container main-content">
  <!-- Основной контент: Текст + Картинка -->
  <div class="content-row">

    <!-- Текстовая колонка -->
    <div class="text-col">
        <!-- Интро/Вступление -->
        {% if DQ.szIntroHTML %}
        <div id="info">{{ DQ.szIntroHTML|safe }}</div>
        {% endif %}

        <!-- Цитата: Семантический blockquote -->
        <blockquote id="bb" style="border:none; margin:0; padding:0;">
            {{ DQ.szContentHTML|safe }}
        </blockquote>

        <!-- Автор: Семантический cite -->
        <div id="author">
            <cite>
              {% if AUTHOR %}
                {{ AUTHOR.szAuthorHTML|default:AUTHOR.szAuthor|safe }}
              {% endif %}
            </cite>
        </div>
    </div>

    <!-- Колонка с картинкой (если есть) -->
    {% if IMAGE %}
    <div class="image-col" id="image">
        <center>
          <div style="background:rgba({% for i in CLR %}{% if forloop.counter <= 3 %}{{ i|stringformat:"02d" }}{% if forloop.counter < 3 %},{%endif %}{% endif %}{% empty %}87,00,00{% endfor %},0.7);">
             <div><img src="{{IMAGE.url}}" alt="{% if AUTHOR %}{{ AUTHOR.szAuthor }}{% else %}Dictum & Quotes{% endif %}" title="{% if AUTHOR %}{{ AUTHOR.szAuthor }}{% else %}Dictum & Quotes{% endif %}" /></div>
          </div>
        </center>
    </div>
    {% endif %}
  </div>

  <!-- Блок тегов и навигации -->
  <div class="tags">
      {% for i in TAGS %}<a href="/?tag={{ i.slug }}">{{ i.name|safe }}</a> {% endfor %}
      <div id="next"><a href="/{{ NEXT }}_{{ NEXT_TXT }}{% if CURRENT_TAG %}?tag={{ CURRENT_TAG }}{% endif %}">&rightarrow;</a></div>
  </div>
</div>


<script type="text/javascript">
   setTimeout('location.replace("/{{ NEXT }}_{{ NEXT_TXT }}{% if CURRENT_TAG %}?tag={{ CURRENT_TAG }}{% endif %}")', 15000);
   /*Изменить текущий адрес страницы через 3 секунды (3000 миллисекунд)*/
</script>
<noscript>
   <meta http-equiv="refresh" content="15; url=/{{ NEXT}}_{{ NEXT_TXT }}{% if CURRENT_TAG %}?tag={{ CURRENT_TAG }}{% endif %}">
</noscript>


{% if not cookie_accept %}{% include "blocks/cookie_warning.html" %}{% endif %}
{% endblock %}
