add: кастомные ошибки 404б 403 и 50x
All checks were successful
Build ETPGRF-site / build (push) Successful in 9m19s
All checks were successful
Build ETPGRF-site / build (push) Successful in 9m19s
This commit is contained in:
86
etpgrf_site/typograph/templates/404.html
Normal file
86
etpgrf_site/typograph/templates/404.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Ошибка сервера 404 — ETPGRF</title>
|
||||
<style>
|
||||
body {
|
||||
background-color: #f8f8f2;
|
||||
color: #1f1f19;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: #151111;
|
||||
color: #eceff1;
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3.5rem;
|
||||
font-weight: lighter;
|
||||
margin-bottom: 1rem;
|
||||
color: #00ccff99;
|
||||
margin-left: 28px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 2rem;
|
||||
margin-left: 28px;
|
||||
opacity: 0.8;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 0.75rem 1.5rem;
|
||||
margin-top: 1.5rem;
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
color: #151111;
|
||||
background-color: transparent;
|
||||
border: #4a4a44 dashed 1px;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
h1 {
|
||||
color: #00ccff99;
|
||||
}
|
||||
|
||||
.btn {
|
||||
border: #b0bec5 dashed 1px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="top: 20%; position: relative;">
|
||||
<a href="/">
|
||||
<picture>
|
||||
<source srcset="/static/svg/logo-etpgrf-site-dark.svg" media="(prefers-color-scheme: dark)">
|
||||
<img src="/static/svg/logo-etpgrf-site-light.svg"
|
||||
alt="ETPGRF — единая типографика для веба" width="717" height="151">
|
||||
</picture>
|
||||
</a>
|
||||
<h1>404: Страница не найдена</h1>
|
||||
<p>
|
||||
Запра­шиваемая страница не найдена.<br/>
|
||||
Контент мог быть удалён, перемещён или его тут никогда и не было.<br/>
|
||||
<a class="btn" href="/">На главную</a>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
86
etpgrf_site/typograph/templates/500.html
Normal file
86
etpgrf_site/typograph/templates/500.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Ошибка сервера 500 — ETPGRF</title>
|
||||
<style>
|
||||
body {
|
||||
background-color: #f8f8f2;
|
||||
color: #1f1f19;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: #151111;
|
||||
color: #eceff1;
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3.5rem;
|
||||
font-weight: lighter;
|
||||
margin-bottom: 1rem;
|
||||
color: #00ccff99;
|
||||
margin-left: 28px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 2rem;
|
||||
margin-left: 28px;
|
||||
opacity: 0.8;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 0.75rem 1.5rem;
|
||||
margin-top: 1.5rem;
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
color: #151111;
|
||||
background-color: transparent;
|
||||
border: #4a4a44 dashed 1px;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
h1 {
|
||||
color: #00ccff99;
|
||||
}
|
||||
|
||||
.btn {
|
||||
border: #b0bec5 dashed 1px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="top: 20%; position: relative;">
|
||||
<a href="/">
|
||||
<picture>
|
||||
<source srcset="/static/svg/logo-etpgrf-site-dark.svg" media="(prefers-color-scheme: dark)">
|
||||
<img src="/static/svg/logo-etpgrf-site-light.svg"
|
||||
alt="ETPGRF — единая типографика для веба" width="717" height="151">
|
||||
</picture>
|
||||
</a>
|
||||
<h1>500: Внутренняя ошибка сервера</h1>
|
||||
<p>
|
||||
Извините, что-то сломалось на сервере или пошло не так.<br/>
|
||||
Пожалуйста, попробуйте позже.<br/>
|
||||
<a class="btn" href="/">На главную</a>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
86
etpgrf_site/typograph/templates/typograph/403.html
Normal file
86
etpgrf_site/typograph/templates/typograph/403.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Ошибка сервера 403 — ETPGRF</title>
|
||||
<style>
|
||||
body {
|
||||
background-color: #f8f8f2;
|
||||
color: #1f1f19;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: #151111;
|
||||
color: #eceff1;
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3.5rem;
|
||||
font-weight: lighter;
|
||||
margin-bottom: 1rem;
|
||||
color: #00ccff99;
|
||||
margin-left: 28px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 2rem;
|
||||
margin-left: 28px;
|
||||
opacity: 0.8;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 0.75rem 1.5rem;
|
||||
margin-top: 1.5rem;
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
text-decoration: none;
|
||||
color: #151111;
|
||||
background-color: transparent;
|
||||
border: #4a4a44 dashed 1px;
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
h1 {
|
||||
color: #00ccff99;
|
||||
}
|
||||
|
||||
.btn {
|
||||
border: #b0bec5 dashed 1px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="top: 20%; position: relative;">
|
||||
<a href="/">
|
||||
<picture>
|
||||
<source srcset="/static/svg/logo-etpgrf-site-dark.svg" media="(prefers-color-scheme: dark)">
|
||||
<img src="/static/svg/logo-etpgrf-site-light.svg"
|
||||
alt="ETPGRF — единая типографика для веба" width="717" height="151">
|
||||
</picture>
|
||||
</a>
|
||||
<h1>403: Доступ запрещён, необходимо автори­зоваться</h1>
|
||||
<p>
|
||||
Записанная в адресной строке страница требует аутенти­фикации.<br/>
|
||||
Пожалуйста, войдите в систему и повторите попытку.<br/>
|
||||
<a class="btn" href="/">На главную</a>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -66,14 +66,12 @@
|
||||
<div class="container d-flex justify-content-between align-items-center">
|
||||
<span class="text-muted small nowrap me-2">© Sergei Erjemin, 2025–{% now 'Y' %}.</span>
|
||||
|
||||
<nobr class="text-muted small mx-2"><i class="bi bi-tags me-1" title="Версия библиотеки etpgrf / Версия сайта"></i>v0.1.3 / v0.1.4</nobr>
|
||||
<nobr class="text-muted small mx-2"><i class="bi bi-tags me-1" title="Версия библиотеки etpgrf / Версия сайта"></i>v0.1.3 / v0.1.5</nobr>
|
||||
|
||||
{# Сводная статистика (HTMX) #}
|
||||
<span class="text-muted small ms-2" hx-get="{% url 'stats_summary' %}" hx-trigger="load">
|
||||
...
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{% load typograph_extras %}
|
||||
<nobr class="ms-3 float-end" title="Скопировано в буфер текстов/символов">
|
||||
{% load typograph_extras %}<nobr class="ms-3 float-end" title="Скопировано в буфер текстов/символов">
|
||||
<i class="bi bi-clipboard-check me-1"></i>{{ copied|humanize_num }} / {{ chars_copied|humanize_num }}
|
||||
</nobr>
|
||||
<nobr class="ms-3 float-end" title="На выход получено символов">
|
||||
@@ -10,7 +9,4 @@
|
||||
</nobr>
|
||||
<nobr class="ms-3 float-end" title="Просмотров">
|
||||
<i class="bi bi-eye me-1"></i>{{ views|humanize_num }}
|
||||
</nobr>
|
||||
|
||||
|
||||
|
||||
</nobr>
|
||||
Reference in New Issue
Block a user