Files
2020-dq/dicquo/templates/index.html
erjemin 5bfd50efd5
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m27s
mod: Переработаны дизайн и компоновка. Минималистичный код.
2026-02-22 01:23:46 +03:00

65 lines
3.3 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% load static %}
{% block Last4Meta %}{{ DQ.dtEdited|date:"Y-m-d" }}{% endblock %}
{% block Description %}{% if AUTHOR %}{{ AUTHOR.szAuthor }}: {% endif %}{% if DQ.szIntro %}{{ DQ.szIntro }} {% endif %}{{ DQ.szContent|truncatewords:20 }} — Читайте вдумчивые цитаты и афоризмы на Dicquo.{% endblock %}
{% block Keywords %}афоризмы, цитаты, мудрость, философия, {% for i in TAGS %}{{ i.name|safe }}, {% endfor %}высказывания{% endblock %}
{% block CopyrightAuthor4Meta %}{% if AUTHOR %}, {{ AUTHOR.szAuthor }} (автор){% endif %}{% endblock %}
<!--- ТИТУЛ --->
{% block Title %}{% if AUTHOR %}{{ AUTHOR.szAuthor }} — {% endif %}{{ DQ.szContent|truncatewords:7 }} | Dicquo{% endblock %}
{% block ExtraHead %}<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Quotation",
"name": "Цитата #{{ DQ.id }}",
"text": "{{ DQ.szContent|escapejs }}",
"creator": {
"@type": "Person",
"name": "{% if AUTHOR %}{{ AUTHOR.szAuthor|escapejs }}{% else %}Неизвестный автор{% endif %}"
},
"url": "{{ request.build_absolute_uri }}",
{% 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",
"isPartOf": {
"@type": "WebSite",
"name": "Dicquo",
"url": "{{ request.scheme }}://{{ request.get_host }}"
},
"dateCreated": "{{ DQ.dtCreated|date:'Y-m-d' }}",
"dateModified": "{{ DQ.dtEdited|date:'Y-m-d' }}"
}
</script>{% endblock %}
{% block CONTENT %}<main>{# Основной контент: Текст + Картинка #}
<article>{# Текстовая ряб. Задает высоту двум колонкам: текст и картина #}
<figure>{# КОЛОНКА С ТЕКСТОМ #}{% if DQ.szIntroHTML %}
{# Интро/Вступление (например "Вася Пупкин как-то сказа". Может отсутствовать #}<p>{{ DQ.szIntroHTML|safe }}</p>{% endif %}
<blockquote>{{ DQ.szContentHTML|safe }}</blockquote>{% if AUTHOR %}
<cite>{# Автор #}{{ AUTHOR.szAuthorHTML|default:AUTHOR.szAuthor|safe }}</cite>{% endif %}
</figure>{% if IMAGE %}
<div>{# КОЛОНКА С КАРТИНКОЙ #}
<div style="background:rgba(87,0,0,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>
</div>{% endif %}
</article>
</main>
<nav>
<div>{# ТЕГИ #}{% 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>
</nav>
<noscript>
<meta http-equiv="refresh" content="15; url=/{{ NEXT}}_{{ NEXT_TXT }}{% if CURRENT_TAG %}?tag={{ CURRENT_TAG }}{% endif %}">
</noscript>{% endblock %}