2 Commits

Author SHA1 Message Date
erjemin 17d45d1c05 fix: медленный '?'-запрос в базе заменили на рандом по ip (должно не тормозить в проде) + таймауты
Build and Push Docker Image / build-and-push (push) Successful in 1m13s
2026-07-05 21:29:35 +03:00
erjemin e55ea68d05 ---: minor 2026-03-25 14:32:14 +03:00
17 changed files with 76 additions and 125 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ upstream dq-django {
# 2. Конфигурируем сервер # 2. Конфигурируем сервер
server { server {
server_name dq.cube2.ru dq2.cube2.ru; # Основное доменное имя server_name dq.cube2.ru; # Основное доменное имя
# Слушаем 80 порт (Certbot потом добавит сюда редирект на 443 и настройки SSL) # Слушаем 80 порт (Certbot потом добавит сюда редирект на 443 и настройки SSL)
listen 80; listen 80;
+6 -2
View File
@@ -16,8 +16,12 @@
<meta property="og:image" content="{{ request.scheme }}://{{ request.get_host }}{{ IMAGE.url }}"/>{% endif %} <meta property="og:image" content="{{ request.scheme }}://{{ request.get_host }}{{ IMAGE.url }}"/>{% endif %}
{# Шутка #}<meta name="generator" content="Microsoft FrontPage 1.0"/> {# Шутка #}<meta name="generator" content="Microsoft FrontPage 1.0"/>
{# Canonical #}{% if DQ and DQ_SLUG %}<link rel="canonical" href="{{ request.scheme }}://{{ request.get_host }}/{{ DQ.id }}_{{ DQ_SLUG }}"/>{% else %}<link rel="canonical" href="{{ request.build_absolute_uri }}"/>{% endif %} {# Canonical #}{% if DQ and DQ_SLUG %}<link rel="canonical" href="{{ request.scheme }}://{{ request.get_host }}/{{ DQ.id }}_{{ DQ_SLUG }}"/>{% else %}<link rel="canonical" href="{{ request.build_absolute_uri }}"/>{% endif %}
{# Favicons #}<link rel="shortcut icon" type="image/x-icon" href="{% static 'img/favicon.ico' %}"/> {# Favicons #}<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="icon" type="image/png" href="{% static 'img/favicon.png' %}"/> {# Favicons #}<link rel="icon" type="image/png" href="/favicon.png"/>
{# Favicons #}<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
{# Favicons #}<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"/>
{# Favicons #}<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
{# Favicons #}<link rel="manifest" href="/site.webmanifest" />
{# Technical Meta #}<meta http-equiv="Last-Modified" content="{% block Last4Meta %}{% endblock %}"/> {# Technical Meta #}<meta http-equiv="Last-Modified" content="{% block Last4Meta %}{% endblock %}"/>
{# Для ИИ #}<link rel="help" type="text/markdown" href="/llms.txt"/> {# Для ИИ #}<link rel="help" type="text/markdown" href="/llms.txt"/>
{# CSS #}<link rel="stylesheet" href="{% static 'css/dicquo.css' %}"/> {# CSS #}<link rel="stylesheet" href="{% static 'css/dicquo.css' %}"/>
+34 -11
View File
@@ -12,6 +12,7 @@ from django.core.exceptions import ObjectDoesNotExist
from django.views.generic import DetailView, TemplateView from django.views.generic import DetailView, TemplateView
import time import time
import pytils import pytils
import random
from web.models import TbDictumAndQuotes, TbImages, TbAuthor from web.models import TbDictumAndQuotes, TbImages, TbAuthor
@@ -98,9 +99,11 @@ class CommonContextMixin:
# --- 4. ВЫБОР КАРТИНКИ --- # --- 4. ВЫБОР КАРТИНКИ ---
if dq.kImages_id is None: if dq.kImages_id is None:
if len(tags) != 0: if len(tags) != 0:
tagged_image = TbImages.objects.filter(tags__name__in=tags).order_by('?').first() # Используем Python random вместо order_by('?') для производительности
if tagged_image: tagged_images = list(TbImages.objects.filter(tags__name__in=tags).values_list('id', 'imFile'))
context.update({'IMAGE': tagged_image.imFile}) if tagged_images:
tagged_image = tagged_images[random.randint(0, len(tagged_images) - 1)]
context.update({'IMAGE': tagged_image[1]})
else: else:
context.update({'IMAGE': dq.kImages.imFile}) context.update({'IMAGE': dq.kImages.imFile})
@@ -110,7 +113,13 @@ class CommonContextMixin:
# --- 6. ВЫБОР СЛЕДУЮЩЕЙ ЦИТАТЫ --- # --- 6. ВЫБОР СЛЕДУЮЩЕЙ ЦИТАТЫ ---
# Сначала пробуем найти следующую цитату, которую мы еще не видели # Сначала пробуем найти следующую цитату, которую мы еще не видели
dq_next = queryset.exclude(id__in=seen_ids).order_by('?').first() # Используем Python random вместо order_by('?') для производительности
unseen_ids = queryset.exclude(id__in=seen_ids).values_list('id', flat=True)
if unseen_ids:
dq_next_id = list(unseen_ids)[random.randint(0, len(unseen_ids) - 1)]
dq_next = queryset.filter(id=dq_next_id).first()
else:
dq_next = None
# Если таких нет (мы посмотрели все цитаты в этом контексте/теге) # Если таких нет (мы посмотрели все цитаты в этом контексте/теге)
if dq_next is None: if dq_next is None:
@@ -123,7 +132,12 @@ class CommonContextMixin:
# Вариант: Очистить seen_ids, чтобы в следующий раз (на некст странице) список был пуст? # Вариант: Очистить seen_ids, чтобы в следующий раз (на некст странице) список был пуст?
# Или просто выбрать любую КРОМЕ текущей? # Или просто выбрать любую КРОМЕ текущей?
dq_next = queryset.exclude(id=dq.id).order_by('?').first() other_ids = list(queryset.exclude(id=dq.id).values_list('id', flat=True))
if other_ids:
dq_next_id = other_ids[random.randint(0, len(other_ids) - 1)]
dq_next = queryset.filter(id=dq_next_id).first()
else:
dq_next = None
# Если мы действительно прошли весь цикл по тегу, логично сбросить seen_ids, # Если мы действительно прошли весь цикл по тегу, логично сбросить seen_ids,
# чтобы пользователь мог заново проходить этот список случайно, а не "застревать" на последних. # чтобы пользователь мог заново проходить этот список случайно, а не "застревать" на последних.
@@ -200,13 +214,19 @@ class IndexView(CommonContextMixin, TemplateView):
if active_qs is not None: if active_qs is not None:
# Если мы в режиме фильтрации, тоже стараемся не показывать то, что уже видели # Если мы в режиме фильтрации, тоже стараемся не показывать то, что уже видели
dq = active_qs.exclude(id__in=seen_ids).order_by('?').first() unseen_ids = list(active_qs.exclude(id__in=seen_ids).values_list('id', flat=True))
if unseen_ids:
dq = active_qs.filter(id=unseen_ids[random.randint(0, len(unseen_ids) - 1)]).first()
else:
dq = None
# Если после фильтрации ничего не осталось (мы просмотрели все цитаты тега) # Если после фильтрации ничего не осталось (мы просмотрели все цитаты тега)
if dq is None: if dq is None:
# Сбрасываем историю и берем любую # Сбрасываем историю и берем любую
self.request.session['seen_ids'] = [] self.request.session['seen_ids'] = []
dq = active_qs.order_by('?').first() all_ids = list(active_qs.values_list('id', flat=True))
if all_ids:
dq = active_qs.filter(id=all_ids[random.randint(0, len(all_ids) - 1)]).first()
if dq is None: if dq is None:
# Если тег не задан, или по тегу ничего не нашлось совсем # Если тег не задан, или по тегу ничего не нашлось совсем
@@ -214,11 +234,14 @@ class IndexView(CommonContextMixin, TemplateView):
active_qs = TbDictumAndQuotes.objects.all() active_qs = TbDictumAndQuotes.objects.all()
# Случайная цитата (с учетом истории, чтобы главная страница тоже не зацикливалась) # Случайная цитата (с учетом истории, чтобы главная страница тоже не зацикливалась)
dq = active_qs.exclude(id__in=seen_ids).order_by('?').first() unseen_ids = list(active_qs.exclude(id__in=seen_ids).values_list('id', flat=True))
if unseen_ids:
if dq is None: dq = active_qs.filter(id=unseen_ids[random.randint(0, len(unseen_ids) - 1)]).first()
else:
self.request.session['seen_ids'] = [] self.request.session['seen_ids'] = []
dq = active_qs.order_by('?').first() all_ids = list(active_qs.values_list('id', flat=True))
if all_ids:
dq = active_qs.filter(id=all_ids[random.randint(0, len(all_ids) - 1)]).first()
if dq: if dq:
# Используем миксин, ОБЯЗАТЕЛЬНО передаем active_qs # Используем миксин, ОБЯЗАТЕЛЬНО передаем active_qs
+4 -5
View File
@@ -1,4 +1,3 @@
% cat docker-compose.yaml
# ============================================================================== # ==============================================================================
# Docker Compose для PRODUCTION # Docker Compose для PRODUCTION
# Этот файл запускается на боевом сервере. # Этот файл запускается на боевом сервере.
@@ -49,7 +48,7 @@ services:
mkdir -p /app/public/media/errors && mkdir -p /app/public/media/errors &&
cp /home/app/web/dicquo/templates/static_404.html /app/public/media/errors/404.html && cp /home/app/web/dicquo/templates/static_404.html /app/public/media/errors/404.html &&
cp /home/app/web/dicquo/templates/static_500.html /app/public/media/errors/500.html && cp /home/app/web/dicquo/templates/static_500.html /app/public/media/errors/500.html &&
gunicorn --workers 3 --bind 0.0.0.0:8000 dicquo.wsgi:application" gunicorn --workers 2 --timeout 15 --bind 0.0.0.0:8000 dicquo.wsgi:application"
# 4. Проброс портов (Внешний Nginx -> localhost:8010) # 4. Проброс портов (Внешний Nginx -> localhost:8010)
ports: ports:
@@ -92,9 +91,9 @@ services:
healthcheck: healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/').read()"] test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/').read()"]
interval: 30s # Проверка каждые 30 секунд interval: 30s # Проверка каждые 30 секунд
timeout: 3s # Таймаут ответа - 3 секунды timeout: 5s # Таймаут ответа - 5 секунд
start_period: 10s # Даем 10 секунд на стартап перед первой проверкой start_period: 60s # Даем 60 секунд на стартап (миграции + collectstatic + gunicorn запуск)
retries: 3 # Unhealthy после 3 неудачных попыток retries: 5 # Unhealthy после 5 неудачных попыток
# 9. Логирование (Ротация) # 9. Логирование (Ротация)
logging: logging:
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

+1 -53
View File
@@ -1,53 +1 @@
<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="50" height="46" viewBox="0 0 1512 1386" shape-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd"><defs><linearGradient id="A" gradientUnits="userSpaceOnUse" x1="1476.52" y1="1395.4" x2="1034.86" y2="872.762"><stop offset="0" stop-color="#ef7f1a"></stop><stop offset=".349" stop-color="#ffed00"></stop><stop offset=".949" stop-color="#cc6f3c"></stop></linearGradient><linearGradient id="B" gradientUnits="userSpaceOnUse" x1="1023.98" y1="1127.45" x2="575.667" y2="596.929"><stop offset="0" stop-color="#ef7f1a"></stop><stop offset=".059" stop-color="#cc6f3c"></stop><stop offset=".671" stop-color="#ffed00"></stop><stop offset="1" stop-color="#cc6f3c"></stop></linearGradient><linearGradient id="C" href="#A" x1="1398.9" y1="1160.31" x2="613.548" y2="230.976"></linearGradient><linearGradient id="D" href="#A" x1="805.595" y1="948.571" x2="21.024" y2="20.143"></linearGradient><linearGradient id="E" gradientUnits="userSpaceOnUse" x1="381.071" y1="958.69" x2="89.071" y2="613.119"><stop offset="0" stop-color="#ef7f1a"></stop><stop offset=".831" stop-color="#ffed00"></stop><stop offset=".949" stop-color="#cc6f3c"></stop></linearGradient></defs><path d="M746 677L405 970c21-19 37-44 49-75 14-37 20-83 20-137 0-47-6-92-19-135s-32-82-58-118-57-67-95-95c-38-27-84-50-139-68L27 298c-6-2-12-2-18 1-1 0-2 1-3 2L351 5c1-1 2-2 4-2 6-3 12-3 18-1l136 44c55 18 101 41 139 68s69 59 95 95c25 36 45 75 58 118s19 88 19 135c0 54-7 100-20 137-12 34-30 60-53 79z" fill="url(#D)"></path><path d="M1005 1173c12-10 22-22 30-35 10-16 18-34 25-54 6-20 11-41 14-65 3-23 4-48 4-73 0-50-6-97-17-141-12-44-29-83-51-119-23-35-51-66-85-92s-74-47-119-62c-48-16-90-22-126-17-36 4-66 17-91 40l345-295c24-22 54-34 90-39 36-4 78 2 126 17 45 15 85 35 119 62 34 26 63 57 85 92 23 35 40 75 51 119s17 90 17 141c0 26-2 50-4 73-3 23-8 45-14 65s-15 38-25 54c-9 14-20 27-33 37l-341 292z" fill="url(#C)"></path><path d="M409 739c0-38-5-74-14-109-10-35-24-68-44-97-20-30-45-56-75-79s-69-42-116-58l-99-33v538l100 33c44 14 81 21 111 20s56-9 76-25 35-40 46-71c10-31 15-71 15-118zm65 18c0 54-7 100-20 137-14 37-34 65-60 84-27 19-59 30-98 31s-86-7-140-24L29 943c-6-2-12-6-18-13S1 914 1 902V319c0-12 3-19 10-22 6-3 12-3 18-1l136 44c55 18 101 41 139 68s69 59 95 95c25 36 45 75 58 118s19 88 19 135z" fill="#ae4a84" fill-rule="nonzero"></path><path d="M1343 884l-333 285c-3 3-7 6-10 9 26 30 49 54 68 73l48 43c13 10 22 18 29 23s12 9 15 13 5 8 6 13 2 10 2 17c0 5 0 10-1 13s-2 6-4 8l-2 2 344-294c1 0 1-1 2-2 2-2 3-5 4-8 1-4 1-8 1-13 0-7-1-12-2-17s-3-9-6-13-8-8-15-13-17-13-29-23c-13-10-29-25-48-43-20-19-42-43-68-73z" fill="url(#A)"></path><path d="M1015 931c0-38-4-75-11-111s-19-69-36-99-38-57-66-80c-27-23-61-41-102-54-40-13-74-17-101-11-28 6-50 18-67 38-17 19-29 44-37 75s-11 65-11 101c0 39 3 77 10 113s18 69 35 99c16 30 38 57 66 80 27 23 62 41 103 55 41 13 75 17 103 11s50-19 67-39 29-45 36-76 11-65 11-102zm153 430c0 5 0 10-1 13s-2 6-4 8-3 3-5 3c-2 1-3 0-5 0-4-1-12-7-26-16-13-10-29-22-48-39-19-16-39-35-61-57s-44-46-66-72c-17 6-39 9-65 9-27 0-58-6-94-18-48-16-89-37-124-63-35-27-63-57-85-93-22-35-38-75-49-119-10-44-16-91-16-142s6-95 18-132 29-67 53-88 53-34 89-38 78 2 126 17c45 15 85 35 119 62 34 26 63 57 85 92 23 35 40 75 51 119s17 90 17 141c0 26-2 50-4 73-3 23-8 45-14 65s-15 38-25 54-22 29-36 40c26 30 49 54 68 73l48 43c13 10 22 18 29 23s12 9 15 13 5 8 6 13 2 10 2 17z" fill="#ae4a84" fill-rule="nonzero"></path><path d="M1015 931c0-38-4-75-11-111s-19-69-36-99-38-57-66-80c-27-23-61-41-102-54-40-13-74-17-101-11-28 6-50 18-67 38-17 19-29 44-37 75s-11 65-11 101c0 39 3 77 10 113s18 69 35 99c16 30 38 57 66 80 27 23 62 41 103 55 41 13 75 17 103 11s50-19 67-39 29-45 36-76 11-65 11-102z" fill="url(#B)"></path><path d="M61 900l330-283c1 4 2 8 4 12 9 35 14 72 14 109 0 48-5 87-15 118s-25 55-46 71c-20 16-45 24-76 25s-67-6-111-20L61 899z" fill="url(#E)"></path><path d="M61 900l330-283c-9-31-23-59-40-85-20-30-45-56-75-79s-69-42-116-58l-99-33v538z" fill="#ffd900"></path></svg>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Creator: CorelDRAW X6 -->
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="120px" height="120px" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
viewBox="0 0 1512 1386"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<style type="text/css">
<![CDATA[
.fil6 {fill:#FFD900}
.fil2 {fill:#AE4A84;fill-rule:nonzero}
.fil3 {fill:url(#id0)}
.fil4 {fill:url(#id1)}
.fil1 {fill:url(#id2)}
.fil0 {fill:url(#id3)}
.fil5 {fill:url(#id4)}
]]>
</style>
<linearGradient id="id0" gradientUnits="userSpaceOnUse" x1="1476.52" y1="1395.4" x2="1034.86" y2="872.762">
<stop offset="0" style="stop-color:#EF7F1A"/>
<stop offset="0.34902" style="stop-color:#FFED00"/>
<stop offset="0.94902" style="stop-color:#CC6F3C"/>
<stop offset="1" style="stop-color:#CC6F3C"/>
</linearGradient>
<linearGradient id="id1" gradientUnits="userSpaceOnUse" x1="1023.98" y1="1127.45" x2="575.667" y2="596.929">
<stop offset="0" style="stop-color:#EF7F1A"/>
<stop offset="0.0588235" style="stop-color:#CC6F3C"/>
<stop offset="0.670588" style="stop-color:#FFED00"/>
<stop offset="1" style="stop-color:#CC6F3C"/>
</linearGradient>
<linearGradient id="id2" gradientUnits="userSpaceOnUse" xlink:href="#id0" x1="1398.9" y1="1160.31" x2="613.548" y2="230.976">
</linearGradient>
<linearGradient id="id3" gradientUnits="userSpaceOnUse" xlink:href="#id0" x1="805.595" y1="948.571" x2="21.0238" y2="20.1429">
</linearGradient>
<linearGradient id="id4" gradientUnits="userSpaceOnUse" x1="381.071" y1="958.69" x2="89.0714" y2="613.119">
<stop offset="0" style="stop-color:#EF7F1A"/>
<stop offset="0.831373" style="stop-color:#FFED00"/>
<stop offset="0.94902" style="stop-color:#CC6F3C"/>
<stop offset="1" style="stop-color:#CC6F3C"/>
</linearGradient>
</defs>
<g id="Layer_x0020_1">
<metadata id="CorelCorpID_0Corel-Layer"/>
<path class="fil0" d="M746 677l-341 293c21,-19 37,-44 49,-75 14,-37 20,-83 20,-137 0,-47 -6,-92 -19,-135 -13,-43 -32,-82 -58,-118 -26,-36 -57,-67 -95,-95 -38,-27 -84,-50 -139,-68l-136 -44c-6,-2 -12,-2 -18,1 -1,0 -2,1 -3,2l345 -296c1,-1 2,-2 4,-2 6,-3 12,-3 18,-1l136 44c55,18 101,41 139,68 38,27 69,59 95,95 25,36 45,75 58,118 13,43 19,88 19,135 0,54 -7,100 -20,137 -12,34 -30,60 -53,79z"/>
<path class="fil1" d="M1005 1173c12,-10 22,-22 30,-35 10,-16 18,-34 25,-54 6,-20 11,-41 14,-65 3,-23 4,-48 4,-73 0,-50 -6,-97 -17,-141 -12,-44 -29,-83 -51,-119 -23,-35 -51,-66 -85,-92 -34,-26 -74,-47 -119,-62 -48,-16 -90,-22 -126,-17 -36,4 -66,17 -91,40l345 -295c24,-22 54,-34 90,-39 36,-4 78,2 126,17 45,15 85,35 119,62 34,26 63,57 85,92 23,35 40,75 51,119 11,44 17,90 17,141 0,26 -2,50 -4,73 -3,23 -8,45 -14,65 -6,20 -15,38 -25,54 -9,14 -20,27 -33,37l-341 292z"/>
<path class="fil2" d="M409 739c0,-38 -5,-74 -14,-109 -10,-35 -24,-68 -44,-97 -20,-30 -45,-56 -75,-79 -30,-23 -69,-42 -116,-58l-99 -33 0 538 100 33c44,14 81,21 111,20 30,-1 56,-9 76,-25 20,-16 35,-40 46,-71 10,-31 15,-71 15,-118zm65 18c0,54 -7,100 -20,137 -14,37 -34,65 -60,84 -27,19 -59,30 -98,31 -39,1 -86,-7 -140,-24l-127 -42c-6,-2 -12,-6 -18,-13 -6,-7 -10,-16 -10,-28l0 -583c0,-12 3,-19 10,-22 6,-3 12,-3 18,-1l136 44c55,18 101,41 139,68 38,27 69,59 95,95 25,36 45,75 58,118 13,43 19,88 19,135z"/>
<path class="fil3" d="M1343 884l-333 285c-3,3 -7,6 -10,9 26,30 49,54 68,73 20,18 36,33 48,43 13,10 22,18 29,23 7,5 12,9 15,13 3,4 5,8 6,13 1,5 2,10 2,17 0,5 0,10 -1,13 -1,3 -2,6 -4,8 -1,1 -1,1 -2,2l344 -294c1,0 1,-1 2,-2 2,-2 3,-5 4,-8 1,-4 1,-8 1,-13 0,-7 -1,-12 -2,-17 -1,-5 -3,-9 -6,-13 -3,-4 -8,-8 -15,-13 -7,-5 -17,-13 -29,-23 -13,-10 -29,-25 -48,-43 -20,-19 -42,-43 -68,-73z"/>
<path class="fil2" d="M1015 931c0,-38 -4,-75 -11,-111 -7,-36 -19,-69 -36,-99 -17,-30 -38,-57 -66,-80 -27,-23 -61,-41 -102,-54 -40,-13 -74,-17 -101,-11 -28,6 -50,18 -67,38 -17,19 -29,44 -37,75 -8,31 -11,65 -11,101 0,39 3,77 10,113 7,36 18,69 35,99 16,30 38,57 66,80 27,23 62,41 103,55 41,13 75,17 103,11 28,-6 50,-19 67,-39 17,-20 29,-45 36,-76 7,-31 11,-65 11,-102zm153 430c0,5 0,10 -1,13 -1,3 -2,6 -4,8 -2,2 -3,3 -5,3 -2,1 -3,0 -5,0 -4,-1 -12,-7 -26,-16 -13,-10 -29,-22 -48,-39 -19,-16 -39,-35 -61,-57 -22,-22 -44,-46 -66,-72 -17,6 -39,9 -65,9 -27,0 -58,-6 -94,-18 -48,-16 -89,-37 -124,-63 -35,-27 -63,-57 -85,-93 -22,-35 -38,-75 -49,-119 -10,-44 -16,-91 -16,-142 0,-51 6,-95 18,-132 12,-37 29,-67 53,-88 24,-21 53,-34 89,-38 36,-4 78,2 126,17 45,15 85,35 119,62 34,26 63,57 85,92 23,35 40,75 51,119 11,44 17,90 17,141 0,26 -2,50 -4,73 -3,23 -8,45 -14,65 -6,20 -15,38 -25,54 -10,16 -22,29 -36,40 26,30 49,54 68,73 20,18 36,33 48,43 13,10 22,18 29,23 7,5 12,9 15,13 3,4 5,8 6,13 1,5 2,10 2,17z"/>
<path class="fil4" d="M1015 931c0,-38 -4,-75 -11,-111 -7,-36 -19,-69 -36,-99 -17,-30 -38,-57 -66,-80 -27,-23 -61,-41 -102,-54 -40,-13 -74,-17 -101,-11 -28,6 -50,18 -67,38 -17,19 -29,44 -37,75 -8,31 -11,65 -11,101 0,39 3,77 10,113 7,36 18,69 35,99 16,30 38,57 66,80 27,23 62,41 103,55 41,13 75,17 103,11 28,-6 50,-19 67,-39 17,-20 29,-45 36,-76 7,-31 11,-65 11,-102z"/>
<path class="fil5" d="M61 900l330 -283c1,4 2,8 4,12 9,35 14,72 14,109 0,48 -5,87 -15,118 -10,31 -25,55 -46,71 -20,16 -45,24 -76,25 -31,1 -67,-6 -111,-20l-100 -33z"/>
<path class="fil6" d="M61 900l330 -283c-9,-31 -23,-59 -40,-85 -20,-30 -45,-56 -75,-79 -30,-23 -69,-42 -116,-58l-99 -33 0 538z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

+23
View File
@@ -0,0 +1,23 @@
{
"name": "DicQuo",
"short_name": "DicQuo",
"description": "Коллекция цитат и афоризмов.",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#ffffff",
"icons": [
{
"src": "/favicon.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/web-app-manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
}
+6
View File
@@ -302,6 +302,12 @@ footer button:hover {
main > article > div > div > div > img { main > article > div > div > div > img {
height: 36vmax; height: 36vmax;
} }
/* Для мобильных путь иконка будет поменьше и поскромнее */
header > #logo a > img {
width:25px;
height:23px;
}
} }
/* --- ВЫРАВНИВАНИЕ СИМВОЛОВ ВИСЯЧЕЙ ПУНКТУАЦИИ (Hanging Punctuation) ТИПОГРАФА ETPGRF --- */ /* --- ВЫРАВНИВАНИЕ СИМВОЛОВ ВИСЯЧЕЙ ПУНКТУАЦИИ (Hanging Punctuation) ТИПОГРАФА ETPGRF --- */
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

+1 -53
View File
@@ -1,53 +1 @@
<?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="50" height="46" viewBox="0 0 1512 1386" shape-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd"><defs><linearGradient id="A" gradientUnits="userSpaceOnUse" x1="1476.52" y1="1395.4" x2="1034.86" y2="872.762"><stop offset="0" stop-color="#ef7f1a"/><stop offset=".349" stop-color="#ffed00"/><stop offset=".949" stop-color="#cc6f3c"/></linearGradient><linearGradient id="B" gradientUnits="userSpaceOnUse" x1="1023.98" y1="1127.45" x2="575.667" y2="596.929"><stop offset="0" stop-color="#ef7f1a"/><stop offset=".059" stop-color="#cc6f3c"/><stop offset=".671" stop-color="#ffed00"/><stop offset="1" stop-color="#cc6f3c"/></linearGradient><linearGradient id="C" href="#A" x1="1398.9" y1="1160.31" x2="613.548" y2="230.976"/><linearGradient id="D" href="#A" x1="805.595" y1="948.571" x2="21.024" y2="20.143"/><linearGradient id="E" gradientUnits="userSpaceOnUse" x1="381.071" y1="958.69" x2="89.071" y2="613.119"><stop offset="0" stop-color="#ef7f1a"/><stop offset=".831" stop-color="#ffed00"/><stop offset=".949" stop-color="#cc6f3c"/></linearGradient></defs><path d="M746 677L405 970c21-19 37-44 49-75 14-37 20-83 20-137 0-47-6-92-19-135s-32-82-58-118-57-67-95-95c-38-27-84-50-139-68L27 298c-6-2-12-2-18 1-1 0-2 1-3 2L351 5c1-1 2-2 4-2 6-3 12-3 18-1l136 44c55 18 101 41 139 68s69 59 95 95c25 36 45 75 58 118s19 88 19 135c0 54-7 100-20 137-12 34-30 60-53 79z" fill="url(#D)"/><path d="M1005 1173c12-10 22-22 30-35 10-16 18-34 25-54 6-20 11-41 14-65 3-23 4-48 4-73 0-50-6-97-17-141-12-44-29-83-51-119-23-35-51-66-85-92s-74-47-119-62c-48-16-90-22-126-17-36 4-66 17-91 40l345-295c24-22 54-34 90-39 36-4 78 2 126 17 45 15 85 35 119 62 34 26 63 57 85 92 23 35 40 75 51 119s17 90 17 141c0 26-2 50-4 73-3 23-8 45-14 65s-15 38-25 54c-9 14-20 27-33 37l-341 292z" fill="url(#C)"/><path d="M409 739c0-38-5-74-14-109-10-35-24-68-44-97-20-30-45-56-75-79s-69-42-116-58l-99-33v538l100 33c44 14 81 21 111 20s56-9 76-25 35-40 46-71c10-31 15-71 15-118zm65 18c0 54-7 100-20 137-14 37-34 65-60 84-27 19-59 30-98 31s-86-7-140-24L29 943c-6-2-12-6-18-13S1 914 1 902V319c0-12 3-19 10-22 6-3 12-3 18-1l136 44c55 18 101 41 139 68s69 59 95 95c25 36 45 75 58 118s19 88 19 135z" fill="#ae4a84" fill-rule="nonzero"/><path d="M1343 884l-333 285c-3 3-7 6-10 9 26 30 49 54 68 73l48 43c13 10 22 18 29 23s12 9 15 13 5 8 6 13 2 10 2 17c0 5 0 10-1 13s-2 6-4 8l-2 2 344-294c1 0 1-1 2-2 2-2 3-5 4-8 1-4 1-8 1-13 0-7-1-12-2-17s-3-9-6-13-8-8-15-13-17-13-29-23c-13-10-29-25-48-43-20-19-42-43-68-73z" fill="url(#A)"/><path d="M1015 931c0-38-4-75-11-111s-19-69-36-99-38-57-66-80c-27-23-61-41-102-54-40-13-74-17-101-11-28 6-50 18-67 38-17 19-29 44-37 75s-11 65-11 101c0 39 3 77 10 113s18 69 35 99c16 30 38 57 66 80 27 23 62 41 103 55 41 13 75 17 103 11s50-19 67-39 29-45 36-76 11-65 11-102zm153 430c0 5 0 10-1 13s-2 6-4 8-3 3-5 3c-2 1-3 0-5 0-4-1-12-7-26-16-13-10-29-22-48-39-19-16-39-35-61-57s-44-46-66-72c-17 6-39 9-65 9-27 0-58-6-94-18-48-16-89-37-124-63-35-27-63-57-85-93-22-35-38-75-49-119-10-44-16-91-16-142s6-95 18-132 29-67 53-88 53-34 89-38 78 2 126 17c45 15 85 35 119 62 34 26 63 57 85 92 23 35 40 75 51 119s17 90 17 141c0 26-2 50-4 73-3 23-8 45-14 65s-15 38-25 54-22 29-36 40c26 30 49 54 68 73l48 43c13 10 22 18 29 23s12 9 15 13 5 8 6 13 2 10 2 17z" fill="#ae4a84" fill-rule="nonzero"/><path d="M1015 931c0-38-4-75-11-111s-19-69-36-99-38-57-66-80c-27-23-61-41-102-54-40-13-74-17-101-11-28 6-50 18-67 38-17 19-29 44-37 75s-11 65-11 101c0 39 3 77 10 113s18 69 35 99c16 30 38 57 66 80 27 23 62 41 103 55 41 13 75 17 103 11s50-19 67-39 29-45 36-76 11-65 11-102z" fill="url(#B)"/><path d="M61 900l330-283c1 4 2 8 4 12 9 35 14 72 14 109 0 48-5 87-15 118s-25 55-46 71c-20 16-45 24-76 25s-67-6-111-20L61 899z" fill="url(#E)"/><path d="M61 900l330-283c-9-31-23-59-40-85-20-30-45-56-75-79s-69-42-116-58l-99-33v538z" fill="#ffd900"/></svg>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Creator: CorelDRAW X6 -->
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="50px" height="46px" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
viewBox="0 0 1512 1386"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<style type="text/css">
<![CDATA[
.fil6 {fill:#FFD900}
.fil2 {fill:#AE4A84;fill-rule:nonzero}
.fil3 {fill:url(#id0)}
.fil4 {fill:url(#id1)}
.fil1 {fill:url(#id2)}
.fil0 {fill:url(#id3)}
.fil5 {fill:url(#id4)}
]]>
</style>
<linearGradient id="id0" gradientUnits="userSpaceOnUse" x1="1476.52" y1="1395.4" x2="1034.86" y2="872.762">
<stop offset="0" style="stop-color:#EF7F1A"/>
<stop offset="0.34902" style="stop-color:#FFED00"/>
<stop offset="0.94902" style="stop-color:#CC6F3C"/>
<stop offset="1" style="stop-color:#CC6F3C"/>
</linearGradient>
<linearGradient id="id1" gradientUnits="userSpaceOnUse" x1="1023.98" y1="1127.45" x2="575.667" y2="596.929">
<stop offset="0" style="stop-color:#EF7F1A"/>
<stop offset="0.0588235" style="stop-color:#CC6F3C"/>
<stop offset="0.670588" style="stop-color:#FFED00"/>
<stop offset="1" style="stop-color:#CC6F3C"/>
</linearGradient>
<linearGradient id="id2" gradientUnits="userSpaceOnUse" xlink:href="#id0" x1="1398.9" y1="1160.31" x2="613.548" y2="230.976">
</linearGradient>
<linearGradient id="id3" gradientUnits="userSpaceOnUse" xlink:href="#id0" x1="805.595" y1="948.571" x2="21.0238" y2="20.1429">
</linearGradient>
<linearGradient id="id4" gradientUnits="userSpaceOnUse" x1="381.071" y1="958.69" x2="89.0714" y2="613.119">
<stop offset="0" style="stop-color:#EF7F1A"/>
<stop offset="0.831373" style="stop-color:#FFED00"/>
<stop offset="0.94902" style="stop-color:#CC6F3C"/>
<stop offset="1" style="stop-color:#CC6F3C"/>
</linearGradient>
</defs>
<g id="Layer_x0020_1">
<metadata id="CorelCorpID_0Corel-Layer"/>
<path class="fil0" d="M746 677l-341 293c21,-19 37,-44 49,-75 14,-37 20,-83 20,-137 0,-47 -6,-92 -19,-135 -13,-43 -32,-82 -58,-118 -26,-36 -57,-67 -95,-95 -38,-27 -84,-50 -139,-68l-136 -44c-6,-2 -12,-2 -18,1 -1,0 -2,1 -3,2l345 -296c1,-1 2,-2 4,-2 6,-3 12,-3 18,-1l136 44c55,18 101,41 139,68 38,27 69,59 95,95 25,36 45,75 58,118 13,43 19,88 19,135 0,54 -7,100 -20,137 -12,34 -30,60 -53,79z"/>
<path class="fil1" d="M1005 1173c12,-10 22,-22 30,-35 10,-16 18,-34 25,-54 6,-20 11,-41 14,-65 3,-23 4,-48 4,-73 0,-50 -6,-97 -17,-141 -12,-44 -29,-83 -51,-119 -23,-35 -51,-66 -85,-92 -34,-26 -74,-47 -119,-62 -48,-16 -90,-22 -126,-17 -36,4 -66,17 -91,40l345 -295c24,-22 54,-34 90,-39 36,-4 78,2 126,17 45,15 85,35 119,62 34,26 63,57 85,92 23,35 40,75 51,119 11,44 17,90 17,141 0,26 -2,50 -4,73 -3,23 -8,45 -14,65 -6,20 -15,38 -25,54 -9,14 -20,27 -33,37l-341 292z"/>
<path class="fil2" d="M409 739c0,-38 -5,-74 -14,-109 -10,-35 -24,-68 -44,-97 -20,-30 -45,-56 -75,-79 -30,-23 -69,-42 -116,-58l-99 -33 0 538 100 33c44,14 81,21 111,20 30,-1 56,-9 76,-25 20,-16 35,-40 46,-71 10,-31 15,-71 15,-118zm65 18c0,54 -7,100 -20,137 -14,37 -34,65 -60,84 -27,19 -59,30 -98,31 -39,1 -86,-7 -140,-24l-127 -42c-6,-2 -12,-6 -18,-13 -6,-7 -10,-16 -10,-28l0 -583c0,-12 3,-19 10,-22 6,-3 12,-3 18,-1l136 44c55,18 101,41 139,68 38,27 69,59 95,95 25,36 45,75 58,118 13,43 19,88 19,135z"/>
<path class="fil3" d="M1343 884l-333 285c-3,3 -7,6 -10,9 26,30 49,54 68,73 20,18 36,33 48,43 13,10 22,18 29,23 7,5 12,9 15,13 3,4 5,8 6,13 1,5 2,10 2,17 0,5 0,10 -1,13 -1,3 -2,6 -4,8 -1,1 -1,1 -2,2l344 -294c1,0 1,-1 2,-2 2,-2 3,-5 4,-8 1,-4 1,-8 1,-13 0,-7 -1,-12 -2,-17 -1,-5 -3,-9 -6,-13 -3,-4 -8,-8 -15,-13 -7,-5 -17,-13 -29,-23 -13,-10 -29,-25 -48,-43 -20,-19 -42,-43 -68,-73z"/>
<path class="fil2" d="M1015 931c0,-38 -4,-75 -11,-111 -7,-36 -19,-69 -36,-99 -17,-30 -38,-57 -66,-80 -27,-23 -61,-41 -102,-54 -40,-13 -74,-17 -101,-11 -28,6 -50,18 -67,38 -17,19 -29,44 -37,75 -8,31 -11,65 -11,101 0,39 3,77 10,113 7,36 18,69 35,99 16,30 38,57 66,80 27,23 62,41 103,55 41,13 75,17 103,11 28,-6 50,-19 67,-39 17,-20 29,-45 36,-76 7,-31 11,-65 11,-102zm153 430c0,5 0,10 -1,13 -1,3 -2,6 -4,8 -2,2 -3,3 -5,3 -2,1 -3,0 -5,0 -4,-1 -12,-7 -26,-16 -13,-10 -29,-22 -48,-39 -19,-16 -39,-35 -61,-57 -22,-22 -44,-46 -66,-72 -17,6 -39,9 -65,9 -27,0 -58,-6 -94,-18 -48,-16 -89,-37 -124,-63 -35,-27 -63,-57 -85,-93 -22,-35 -38,-75 -49,-119 -10,-44 -16,-91 -16,-142 0,-51 6,-95 18,-132 12,-37 29,-67 53,-88 24,-21 53,-34 89,-38 36,-4 78,2 126,17 45,15 85,35 119,62 34,26 63,57 85,92 23,35 40,75 51,119 11,44 17,90 17,141 0,26 -2,50 -4,73 -3,23 -8,45 -14,65 -6,20 -15,38 -25,54 -10,16 -22,29 -36,40 26,30 49,54 68,73 20,18 36,33 48,43 13,10 22,18 29,23 7,5 12,9 15,13 3,4 5,8 6,13 1,5 2,10 2,17z"/>
<path class="fil4" d="M1015 931c0,-38 -4,-75 -11,-111 -7,-36 -19,-69 -36,-99 -17,-30 -38,-57 -66,-80 -27,-23 -61,-41 -102,-54 -40,-13 -74,-17 -101,-11 -28,6 -50,18 -67,38 -17,19 -29,44 -37,75 -8,31 -11,65 -11,101 0,39 3,77 10,113 7,36 18,69 35,99 16,30 38,57 66,80 27,23 62,41 103,55 41,13 75,17 103,11 28,-6 50,-19 67,-39 17,-20 29,-45 36,-76 7,-31 11,-65 11,-102z"/>
<path class="fil5" d="M61 900l330 -283c1,4 2,8 4,12 9,35 14,72 14,109 0,48 -5,87 -15,118 -10,31 -25,55 -46,71 -20,16 -45,24 -76,25 -31,1 -67,-6 -111,-20l-100 -33z"/>
<path class="fil6" d="M61 900l330 -283c-9,-31 -23,-59 -40,-85 -20,-30 -45,-56 -75,-79 -30,-23 -69,-42 -116,-58l-99 -33 0 538z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB