mod: Улучшены SEO и LLMO
This commit is contained in:
@@ -7,12 +7,18 @@
|
|||||||
width="50" height="46"/>
|
width="50" height="46"/>
|
||||||
</a>
|
</a>
|
||||||
<div>
|
<div>
|
||||||
<nobr id="stats-menu" style="display: none; color: silver; font-size: 0.9em; margin-right: 15px;">
|
<span id="stats-menu" style="display: none; color: silver; font-size: 0.9em; margin-right: 15px; text-align: right;">
|
||||||
{% if ticks %}<i class="stats-icon icon-time" title="Generation time"></i> {{ ticks|floatformat:1 }}ms{% endif %}
|
<!-- Манифест проекта -->
|
||||||
{% if DQ %} | <i class="stats-icon icon-views" title="Views"></i> {{ DQ.iViewCounter }}{% endif %}
|
<div style="margin-bottom: 5px; color: #aaa; font-style: italic; max-width: 300px; display: inline-block;">
|
||||||
| <a href="/add_quote/" style="color: silver; text-decoration: none;" title="Добавить цитату">Добавить цитату</i></a> |
|
Dicquo — это коллекция отобранных вручную цитат, оформленных с уважением к типографике. Место для вдумчивого чтения.
|
||||||
</nobr>
|
</div>
|
||||||
<a href="#" onclick="var m=document.getElementById('stats-menu'); m.style.display = (m.style.display === 'none' ? 'inline' : 'none'); return false;" style="color: silver; text-decoration: none; font-size: 1.2em;">≡</a>
|
<br/>
|
||||||
|
<!-- Статистика -->
|
||||||
|
{% if ticks %}<i class="stats-icon icon-time" title="Время генерации"></i>{{ ticks|floatformat:1 }}ms{% endif %}
|
||||||
|
{% if DQ %} | <i class="stats-icon icon-views" title="Просмотры"></i>{{ DQ.iViewCounter }}{% endif %}
|
||||||
|
| <a href="/add_quote/" style="color: silver; text-decoration: none;" title="Добавить цитату"><i class="stats-icon icon-add"></i></a> |
|
||||||
|
</span>
|
||||||
|
<a href="#" onclick="var m=document.getElementById('stats-menu'); m.style.display = (m.style.display === 'none' ? 'inline-block' : 'none'); return false;" style="color: silver; text-decoration: none; font-size: 1.2em;">≡</a>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,30 +3,36 @@
|
|||||||
|
|
||||||
{% block Last4Meta %}{{ DQ.dtEdited|date:"Y-m-d" }}{% endblock %}
|
{% 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 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 Keywords %}афоризмы, цитаты, мудрость, философия, {% for i in TAGS %}{{ i.name|safe }}, {% endfor %}высказывания{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block CopyrightAuthor4Meta %}{% if AUTHOR %}, {{ AUTHOR.szAuthor }} (слова){% endif %}{% endblock %}
|
{% block CopyrightAuthor4Meta %}{% if AUTHOR %}, {{ AUTHOR.szAuthor }} (автор){% endif %}{% endblock %}
|
||||||
|
|
||||||
<!--- ТИТУЛ --->
|
<!--- ТИТУЛ --->
|
||||||
{% block Title %}DQ: {{ DQ.szContent }}{% if AUTHOR %} ({{ AUTHOR.szAuthor }}){% endif %}{% endblock %}
|
{% block Title %}{% if AUTHOR %}{{ AUTHOR.szAuthor }} — {% endif %}{{ DQ.szContent|truncatewords:7 }} | Dicquo{% endblock %}
|
||||||
|
|
||||||
{% block ExtraHead %}
|
{% block ExtraHead %}
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
{
|
{
|
||||||
"@context": "https://schema.org",
|
"@context": "https://schema.org",
|
||||||
"@type": "CreativeWork",
|
"@type": "Quotation",
|
||||||
"name": "Dictum & Quotes #{{ DQ.id }}",
|
"name": "Цитата #{{ DQ.id }}",
|
||||||
"text": "{{ DQ.szContent|escapejs }}",
|
"text": "{{ DQ.szContent|escapejs }}",
|
||||||
{% if AUTHOR %}"author": {
|
"creator": {
|
||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
"name": "{{ AUTHOR.szAuthor|escapejs }}"
|
"name": "{% if AUTHOR %}{{ AUTHOR.szAuthor|escapejs }}{% else %}Неизвестный автор{% endif %}"
|
||||||
},{% endif %}
|
},
|
||||||
|
"url": "{{ request.build_absolute_uri }}",
|
||||||
{% if IMAGE %}"image": "{{ request.scheme }}://{{ request.get_host }}{{ IMAGE.url }}",{% 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 %}",
|
"keywords": "афоризмы, цитаты, {% for i in TAGS %}{{ i.name|escapejs }}{% if not forloop.last %}, {% endif %}{% endfor %}",
|
||||||
"inLanguage": "ru",
|
"inLanguage": "ru",
|
||||||
|
"isPartOf": {
|
||||||
|
"@type": "WebSite",
|
||||||
|
"name": "Dicquo",
|
||||||
|
"url": "{{ request.scheme }}://{{ request.get_host }}"
|
||||||
|
},
|
||||||
"dateCreated": "{{ DQ.dtCreated|date:'Y-m-d' }}",
|
"dateCreated": "{{ DQ.dtCreated|date:'Y-m-d' }}",
|
||||||
"dateModified": "{{ DQ.dtEdited|date:'Y-m-d' }}"
|
"dateModified": "{{ DQ.dtEdited|date:'Y-m-d' }}"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,16 +68,19 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
document.body.addEventListener('click', function(e) {
|
document.body.addEventListener('click', function(e) {
|
||||||
// Find if a link was clicked (bubble up)
|
// Find if a link was clicked (bubble up)
|
||||||
const link = e.target.closest('a');
|
const link = e.target.closest('a');
|
||||||
if (link && link.href && link.target !== '_blank' && !link.href.startsWith('#') && !link.href.includes('javascript:')) {
|
if (link && link.href && link.target !== '_blank') {
|
||||||
// Check if it is an internal link (same domain)
|
const hrefAttr = link.getAttribute('href');
|
||||||
if (new URL(link.href).origin === window.location.origin) {
|
if (hrefAttr && !hrefAttr.startsWith('#') && !link.href.includes('javascript:')) {
|
||||||
e.preventDefault(); // Stop immediate navigation
|
// Check if it is an internal link (same domain)
|
||||||
document.body.style.opacity = 0; // Start Fade Out
|
if (new URL(link.href).origin === window.location.origin) {
|
||||||
|
e.preventDefault(); // Stop immediate navigation
|
||||||
|
document.body.style.opacity = 0; // Start Fade Out
|
||||||
|
|
||||||
// Wait for transition (matches CSS transition time 1.5s)
|
// Wait for transition (matches CSS transition time 1.5s)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = link.href;
|
window.location.href = link.href;
|
||||||
}, 900);
|
}, 900);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user