diff --git a/lpon_site/lpon_site/urls.py b/lpon_site/lpon_site/urls.py index b171319..fc76536 100644 --- a/lpon_site/lpon_site/urls.py +++ b/lpon_site/lpon_site/urls.py @@ -18,10 +18,20 @@ from django.contrib import admin from django.urls import path, include, re_path from django.conf import settings from django.conf.urls.static import static +from django.views.static import serve from frontend import views urlpatterns = [ + # Раздача статических файлов из корня каталога PUBLIC_DIR (favicon.ico, favicon.png, favicon.svg, robots.txt и др.) + # Роут с точкой в имени файла строго отделяет файлы от слагов хабов/статей. + re_path( + r'^(?P[-a-zA-Z0-9_]+\.[a-zA-Z0-9]+)$', + serve, + {'document_root': settings.PUBLIC_DIR}, + name='public_root_files', + ), + # Админ-сайт с переименованными приложениями (переопределен в frontend/apps.py) path(settings.ADMIN_URL, admin.site.urls), diff --git a/lpon_site/templates/404.html b/lpon_site/templates/404.html index f42e017..e8e7c9b 100644 --- a/lpon_site/templates/404.html +++ b/lpon_site/templates/404.html @@ -11,9 +11,9 @@ {# Шутка #} - - - {% if IS_DEBUG %}{% comment %} + + + {% if IS_DEBUG %}{% comment %} Переключение dev/prod стилей Tailwind CSS происходит АВТОМАТИЧЕСКИ через переменную IS_DEBUG (см. контексный-процессор frontend/context_processors.py), DEV: tailwindcss из CDN, компилируется прямо в браузере. Удобно diff --git a/lpon_site/templates/_base.html b/lpon_site/templates/_base.html index 15eeea2..a8aab0b 100644 --- a/lpon_site/templates/_base.html +++ b/lpon_site/templates/_base.html @@ -26,9 +26,12 @@ {# Шутка #} - - - {% if IS_DEBUG %}{% comment %} + + + + + + {% if IS_DEBUG %}{% comment %} Переключение dev/prod стилей Tailwind CSS происходит АВТОМАТИЧЕСКИ через переменную IS_DEBUG (см. контексный-процессор frontend/context_processors.py), DEV: tailwindcss из CDN, компилируется прямо в браузере. Удобно diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png new file mode 100644 index 0000000..8832e6c Binary files /dev/null and b/public/apple-touch-icon.png differ diff --git a/public/favicon.gif b/public/favicon.gif deleted file mode 100644 index 959a7d4..0000000 Binary files a/public/favicon.gif and /dev/null differ diff --git a/public/favicon.ico b/public/favicon.ico index c5360d3..192fc6f 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/favicon.png b/public/favicon.png index 4462a59..081c516 100644 Binary files a/public/favicon.png and b/public/favicon.png differ diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000..6b83a82 --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1 @@ +RealFaviconGeneratorhttps://realfavicongenerator.net \ No newline at end of file diff --git a/public/site.webmanifest b/public/site.webmanifest new file mode 100644 index 0000000..02cc03b --- /dev/null +++ b/public/site.webmanifest @@ -0,0 +1,21 @@ +{ + "name": "LPON.ru", + "short_name": "LPON", + "icons": [ + { + "src": "/web-app-manifest-192x192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "/web-app-manifest-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} \ No newline at end of file diff --git a/public/web-app-manifest-192x192.png b/public/web-app-manifest-192x192.png new file mode 100644 index 0000000..fa7a0df Binary files /dev/null and b/public/web-app-manifest-192x192.png differ diff --git a/public/web-app-manifest-512x512.png b/public/web-app-manifest-512x512.png new file mode 100644 index 0000000..77afc4e Binary files /dev/null and b/public/web-app-manifest-512x512.png differ